# Documentation for agents URL: https://docs.sigil.ml/agents Markdown: https://docs.sigil.ml/agents.md Search, read and cite the same documentation developers use. ## Readable by people and tools [#readable-by-people-and-tools] Every page has a **Copy Markdown** action and a stable `.md` representation. The page tree drives [llms.txt](/llms.txt), the [complete text](/llms-full.txt), and the [JSON index](/reference/index.json). ## Connect a documentation MCP client [#connect-a-documentation-mcp-client] Configure a Streamable HTTP connection to `/api/mcp` on this documentation domain. The tools are `list_pages`, `get_page` with a documentation pathname, and `search` with a query. These tools only read documentation. ## Load task instructions [#load-task-instructions] The [documentation skill](/skill.md) describes discovery and version-aware usage. Use the per-page references for focused context; the complete export includes every published page. # Architecture URL: https://docs.sigil.ml/architecture Markdown: https://docs.sigil.ml/architecture.md Sigil combines native typed execution with WASM system-contract gates. Native code performs deterministic state transitions; system contracts govern which privileged transitions are allowed. ## Execution model [#execution-model] The node executes strongly typed transactions instead of treating every operation as an opaque contract call. This gives consensus, admission, RPC, and explorer code a canonical vocabulary for balances, staking, DEX pools, compute jobs, labor contracts, Nova parcels, usernames, NFTs, and governance. The system-contract registry defines the genesis policy kernel. Core policy modules include parameters, validator registry, staking, governance, treasury, compute, DEX, and labor. Unsupported proof paths fail closed until the system contract and native verifier both expose deterministic validation material. ## Identity and lineage [#identity-and-lineage] Every account and validator is a DID. HMR, MHR, and ENR roots express human, multi-human, and enterprise lineage. Agent-created descendants retain lineage so accountability is not lost as automation deepens. The Global Anchor Layer verifies root anchoring, revocation, parent signatures, document commitments, and Merkle inclusion before privileged identity paths are accepted. # Compute Marketplace URL: https://docs.sigil.ml/compute Markdown: https://docs.sigil.ml/compute.md Compute jobs are dispatched deterministically to active providers, settle through escrow, and preserve a replayable receipt/proof/challenge trail. ## Launch scope [#launch-scope] T1 signed/optimistic, T2 redundant/quorum, and T3 hardware-attested verification have different prerequisites. Build features, active policy, provider state, verifier material, and trust anchors determine the modes a network can accept. Explorer and clients call sigil\_listProviders, sigil\_listComputeJobs, and the compute audit methods rather than substituting sample provider data. ## Verification boundaries [#verification-boundaries] Compute execution remains off chain. Receipts, commitments, challenges, and accepted settlement records belong to the chain. Lumen has a narrower sampled-commitment verification scope; TEE verification needs a complete trust-material and policy path. * [Compute specification](/build/spec/compute) * [Lumen verification](https://sigil.ml/technology/lumen) * [TEE prerequisites](/build/spec/tee) # DEX URL: https://docs.sigil.ml/dex Markdown: https://docs.sigil.ml/dex.md The Sigil DEX is a deterministic constant-product AMM with typed pool, liquidity, swap, quote, position, and event surfaces. ## Launch scope [#launch-scope] MINT uses the native account ledger. Non-MINT DEX assets are accounted inside durable DEX state until the broader fungible-token bridge/deposit flow is specified. The system-contract gate rejects unsafe pool and swap calls before native settlement mutates balances. ## Execution protections [#execution-protections] Quote and execution are different operations. Check the active asset and pool policy, minimum output or maximum input, liquidity-share bounds, and expiration height. A quote is not a promise of later liquidity or execution. * [DEX overview](https://sigil.ml/dex) * [Currency accounting](/build/spec/mint) # Currency and Supply URL: https://docs.sigil.ml/economics Markdown: https://docs.sigil.ml/economics.md The client registry publishes a configured genesis supply for each network. Keep genesis allocation, reward policy, current balances, and circulating-supply measurements distinct. ## Configured genesis supply [#configured-genesis-supply] Mainnet target supply is 10,000,000,000 MINT. Evolve canary target supply is 150,000,000,000 BITS. Testnet nominal supply mirrors the mainnet count with test SIG and carries no economic claim. One display unit equals one million base units. Public RPC returns base-unit integers; explorers and wallets are responsible for network-aware formatting. | Item | Details | | ---- | ------------------------------------------------------------------------------------------- | | MINT | Production settlement, staking, fees, governance, compute, labor, DEX, and Nova accounting. | | BITS | Canary-only unit used to rehearse economics and releases without implying MINT ownership. | | SIG | Testnet-only unit for faucet, QA, wallets, and integration tests. | ## Top-level split [#top-level-split] The documented launch allocation below is a planning and genesis-review reference. It is not a live balance, circulating-supply, or distribution report. | Item | Details | | --------------------------------- | ------- | | Network ecosystem treasury | 30.0% | | Network rewards reserve | 20.0% | | L1fe Labs, Inc. | 13.0% | | Sigil Foundation | 12.0% | | Founding team 18 | 12.6% | | Friends, family, early supporters | 5.0% | | Strategic advisors and auditors | 3.0% | | Validator bootstrap subsidy | 0.4% | | Launch liquidity and onboarding | 4.0% | ## Integer-safe formatting [#integer-safe-formatting] Use integer-safe arithmetic for base-unit amounts. Do not round or convert balances through floating-point values before signing. Large JSON numbers require a lossless parsing strategy in runtimes with limited integer precision. | Item | Details | | ---- | -------------------------------------------------------------------------------------- | | BITS | 1000000 base units per display unit; configured genesis: 150000000000000000 base units | | MINT | 1000000 base units per display unit; configured genesis: 10000000000000000 base units | | SIG | 1000000 base units per display unit; configured genesis: 10000000000000000 base units | # Sigil Documentation URL: https://docs.sigil.ml/ Markdown: https://docs.sigil.ml/index.md Sigil is a sovereign Layer-1 blockchain for autonomous agents, human-rooted identity, system-contract governance, and on-chain settlement for compute, labor, DEX, and Nova worlds. ## What Sigil is [#what-sigil-is] Sigil is a typed-state blockchain with OAS DIDs, GAL lineage verification, MACA block agreement, durable state, and WASM system-contract policy gates. Each feature has its own build, policy, and activation requirements. The production chain uses MINT. The Evolve canary uses BITS. The testnet uses test-only SIG units. Network-specific metadata is surfaced through public JSON-RPC and should be treated as the source of truth by wallets, explorers, and node tooling. ## Start here [#start-here] Read these pages first if you are evaluating, integrating, or operating Sigil. | Item | Details | | -------------------- | ------------------------------------- | | Architecture | [Architecture](/architecture) | | Networks and RPC | [Networks and RPC](/networks) | | Currency and supply | [Currency and supply](/economics) | | System contracts | [System contracts](/system-contracts) | | Validator operations | [Validator operations](/validators) | | JSON-RPC | [JSON-RPC](/rpc) | ## Build a client [#build-a-client] The developer center provides a network-aware quickstart, working read examples, and a searchable catalog of canonical JSON-RPC method names. * [Quickstart](/build/quickstart) * [RPC reference](/build/rpc) * [Protocol specifications](/build/spec) # Labor Marketplace URL: https://docs.sigil.ml/labor Markdown: https://docs.sigil.ml/labor.md Labor jobs, bids, contracts, milestones, escrow, and disputes are native chain surfaces guarded by the sigil.system.labor policy path. ## Launch scope [#launch-scope] Native execution owns escrow accounting. Funding debits real balances, milestone release credits the worker exactly once, and double-release returns an AlreadySettled failure. Native and deterministic custom-token escrow use distinct ledger paths. Inherited attestation policies can depend on DAO mandate backing and validator features. Unsupported modes and missing policy snapshots fail closed. ## Jobs and open offers [#jobs-and-open-offers] A negotiated job uses bids, a contract, milestones, and escrow. An open offer uses funded bounds, bonded claims, evidence, and the configured attestation mode. Work happens off chain; authorized records and settlement are validated deterministically. * [Labor overview](https://sigil.ml/labor-market) * [Method catalog](/build/rpc) # Networks URL: https://docs.sigil.ml/networks Markdown: https://docs.sigil.ml/networks.md Sigil runs three network classes: production mainnet, Evolve canary, and a public developer testnet. All network labels, RPC URLs, and currencies are explicit. ## Network table [#network-table] Use the chain ID and currency from the selected network. Clients must not reuse balances, faucet flows, or signing previews across networks. | Item | Details | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Evolve Canary | evolve-canary-1 / BITS / [https://sigil-velocity-canary-root-1.fly.dev/rpc](https://sigil-velocity-canary-root-1.fly.dev/rpc) | | Sigil Mainnet | sigil-mainnet-1 / MINT / [https://rpc.sigil.ml/rpc](https://rpc.sigil.ml/rpc) | | Sigil Velocity Testnet | sigil-velocity-testnet-1 / SIG / [https://sigil-velocity-root-1.fly.dev/rpc](https://sigil-velocity-root-1.fly.dev/rpc) | ## Activation states [#activation-states] The network activation gate evaluates validator and stake requirements against current configuration. Render the exact phase and requirements returned by the selected endpoint. Configured targets, active validator counts, and independently verified operator distribution are separate facts. Explorer and wallet clients should call sigil\_getNetworkActivationStatus and render the exact phase returned by the selected network. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNetworkActivationStatus","params":{}}' ``` ## Configuration and availability [#configuration-and-availability] These endpoints and currency labels come from the shared client network registry. A configured endpoint is not a live availability claim. Compare sigil\_getNodeInfo result.chain\_id with the expected value, and display request failures explicitly. Wallet signing previews must bind the same network identity, currency, nonce, and authority used by the transaction. Never reuse a mainnet balance or signer context as a testnet context. * [Current network observations](https://sigil.ml/network/status) * [Read-only quickstart](/build/quickstart) # Nova URL: https://docs.sigil.ml/nova Markdown: https://docs.sigil.ml/nova.md Nova worlds, parcels, buildings, avatars, and region indexes are durable chain state. The Explorer 3D city is a visualization layer, not the source of truth. ## Launch scope [#launch-scope] World, parcel, building, avatar, auction, and permission handlers maintain typed state. Their availability depends on the selected network policy and execution path; a method catalog entry alone is not proof that a write is enabled. Clients should render chain-backed parcel/building/avatar state from nova\_\* RPC methods when available. ## Clients render the records [#clients-render-the-records] World ownership is represented by chain records; a client renders and interacts with those records. Do not substitute a decorative city scene for the actual parcel, permission, or auction state. * [Nova overview](https://sigil.ml/ecosystem/nova) * [Nova methods](/build/rpc#namespace-nova) # JSON-RPC URL: https://docs.sigil.ml/rpc Markdown: https://docs.sigil.ml/rpc.md Sigil public clients use canonical JSON-RPC method names checked into the shared client contract. ## Canonical call shape [#canonical-call-shape] Every public endpoint accepts JSON-RPC 2.0 over HTTP POST at /rpc. Unsupported or unsafe state should fail closed instead of returning mock data. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Core methods [#core-methods] These are the first methods clients should use when bootstrapping a network session. | Item | Details | | --------------------------------- | --------------------------------------------------------------------------------- | | sigil\_getNodeInfo | chain\_id, version, and protocol\_version. Use dedicated methods for other state. | | sigil\_getNetworkActivationStatus | Boot/stake/active/stabilized activation gate. | | sigil\_getLatestBlock | A blocks array with latest\_height and count; use count: 1 for one record. | | sigil\_getValidatorSet | Active validator records. | | sigil\_getBalance | Base-unit account balance. | | sigil\_sendTransaction | Submit a signed transaction. | ## Full method reference [#full-method-reference] The searchable method catalog groups the interface by namespace and provides verified read-only parameter examples. HTTP success and JSON-RPC success are separate checks. * [Search RPC methods](/build/rpc#methods) * [Client error handling example](/build/examples#read-client) # System Contracts URL: https://docs.sigil.ml/system-contracts Markdown: https://docs.sigil.ml/system-contracts.md Sigil uses WASM system contracts as the policy gate for core chain features while preserving deterministic native execution for state mutation. ## Launch system contracts [#launch-system-contracts] The canonical system-contract registry contains service DIDs and ABI definitions for parameters, validators, staking, governance, treasury, compute, DEX, labor, Lumen, and Crucible. A registry entry does not establish that every corresponding transaction is accepted on a particular network. A transaction that touches one of these domains must pass the activated system-contract gate before the native executor mutates state. Policy authorization and deterministic state mutation remain distinct responsibilities. | Item | Details | | -------------------------------- | ---------------------------------------------------------- | | sigil.system.parameters | Protocol parameter authority. | | sigil.system.validator\_registry | Validator registration and operator state. | | sigil.system.staking | Self-bond, delegation accounting, and rotation policy. | | sigil.system.governance | Proposal, vote, execution, and activation-height policy. | | sigil.system.treasury | Treasury-controlled protocol allocations. | | sigil.system.compute | Provider, job, escrow, proof, and challenge gates. | | sigil.system.dex | Pool, swap, liquidity, and DEX asset policy. | | sigil.system.labor | Job, bid, contract, milestone, escrow, and dispute policy. | ## Activation and direct transaction boundaries [#activation-and-direct-transaction-boundaries] The ABI below is the canonical registry interface. Each action still depends on its runtime, authority, policy, and native dispatch. Direct treasury actions, some governance execution variants, and several identity lifecycle variants remain gated; the existence of a service DID does not override those boundaries. * [Protocol execution guide](/build/spec/protocol) * [Treasury design boundary](/build/spec/treasuries) ## Sigil System Parameters [#sigil-system-parameters] Service DID: did:oas:sigil:service:system-parameters. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | --------------------------- | ------------------------------------------- | | schedule\_parameter\_change | governance · key, value, activation\_height | | read\_parameter | view · key | ## Sigil Validator Registry [#sigil-validator-registry] Service DID: did:oas:sigil:service:system-validator-registry. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | ------------------- | --------------------------------------------------------------------------------- | | register\_validator | state · operator\_did, consensus\_public\_key, network\_public\_key, mode, region | | update\_validator | state · operator\_did, metadata | | exit\_validator | state · operator\_did | ## Sigil Staking [#sigil-staking] Service DID: did:oas:sigil:service:system-staking. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | -------------- | ---------------------------------------------- | | stake | state · validator\_did, amount, mode | | unstake | state · validator\_did, amount | | delegate | state · delegator\_did, validator\_did, amount | | undelegate | state · delegator\_did, validator\_did, shares | | claim\_rewards | state · recipient\_did, validator\_did | ## Sigil Governance [#sigil-governance] Service DID: did:oas:sigil:service:system-governance. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | ------- | --------------------------------------------------- | | propose | state · proposal\_type, payload, activation\_height | | vote | state · proposal\_id, choice, weight\_source | | execute | state · proposal\_id | ## Sigil Treasury [#sigil-treasury] Service DID: did:oas:sigil:service:system-treasury. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | ------------------- | ------------------------------------ | | authorize\_transfer | governance · recipient, amount, memo | | read\_budget | view · budget\_id | ## Sigil Compute Marketplace [#sigil-compute-marketplace] Service DID: did:oas:sigil:service:system-compute. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | --------------------- | ------------------------------------------------------------------------------------------------------- | | register\_provider | state · provider\_did, stake\_amount, supported\_models, pricing, verification\_tiers, provider\_pubkey | | update\_provider | state · provider\_did, pricing, supported\_models, verification\_tiers, provider\_pubkey | | fund\_escrow | state · org\_did, amount, mandate\_id, budget\_limit | | withdraw\_escrow | state · org\_did, amount | | settle\_receipt | state · receipt | | open\_challenge | state · receipt\_id, challenger\_did, evidence, deposit | | resolve\_challenge | state · challenge\_id, resolution | | finalize\_maca\_epoch | state · epoch\_id, finalizer\_did, quorum\_threshold\_override | ## Sigil DEX [#sigil-dex] Service DID: did:oas:sigil:service:system-dex. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | create\_pool | state · sender\_did, asset\_a, asset\_b, amount\_a\_desired, amount\_b\_desired, fee\_bps, min\_lp\_shares, expiration\_height | | add\_liquidity | state · sender\_did, pool\_id, amount\_a\_desired, amount\_b\_desired, amount\_a\_min, amount\_b\_min, min\_lp\_shares, expiration\_height | | remove\_liquidity | state · sender\_did, pool\_id, lp\_shares, amount\_a\_min, amount\_b\_min, recipient\_did, expiration\_height | | swap\_exact\_in | state · sender\_did, pool\_id, asset\_in, amount\_in, min\_amount\_out, recipient\_did, expiration\_height | | swap\_exact\_out | state · sender\_did, pool\_id, asset\_out, amount\_out, max\_amount\_in, recipient\_did, expiration\_height | ## Sigil Labor Marketplace [#sigil-labor-marketplace] Service DID: did:oas:sigil:service:system-labor. Runtime: anvil-wasm. Interface version: 1.0.0. | Item | Details | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | post\_job | state · sender\_did, job\_id, poster\_did, budget\_token\_id, budget\_amount, milestone\_total, deadline\_epoch | | cancel\_job | state · sender\_did, job\_id | | submit\_bid | state · sender\_did, bid\_id, job\_id, bidder\_did, proposed\_price, proposed\_token\_id, estimated\_duration\_seconds | | withdraw\_bid | state · sender\_did, bid\_id | | accept\_bid | state · sender\_did, bid\_id, job\_id | | create\_contract | state · sender\_did, contract\_id, job\_id, bid\_id, employer\_did, worker\_did, token\_id, total\_amount, escrow\_account\_did, milestone\_count | | fund\_escrow | state · sender\_did, contract\_id, funding\_treasury\_did, amount | | open\_offer | state · sender\_did, offer\_id, sponsor\_did, token\_id, total\_funding, per\_claim\_payout\_cap, claim\_bond, spam\_fee, max\_claims, claim\_window\_start\_block, claim\_window\_end\_block, verification\_mode | | submit\_claim | state · sender\_did, claim\_id, offer\_id, claimant\_did, requested\_payout, evidence\_count | | attest\_claim | state · sender\_did, attestation\_id, claim\_id, offer\_id, attester\_did, verdict | | cancel\_offer | state · sender\_did, offer\_id, sponsor\_did | | submit\_deliverable | state · sender\_did, contract\_id, milestone\_index, deliverable\_id, payload\_hash, submitted\_by\_did | | attest\_milestone | state · sender\_did, contract\_id, milestone\_index, attester\_did, verdict | | release\_milestone | state · sender\_did, contract\_id, milestone\_index | | raise\_dispute | state · sender\_did, dispute\_id, contract\_id, raiser\_did, evidence\_count | | resolve\_dispute | state · sender\_did, dispute\_id, resolver\_did, resolution\_kind | | submit\_review | state · sender\_did, review\_id, contract\_id, reviewer\_did, subject\_did, score | ## Sigil Lumen Inference Attestation [#sigil-lumen-inference-attestation] Service DID: did:oas:sigil:service:system-lumen. Runtime: anvil-wasm. Interface version: 0.1.0. | Item | Details | | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | verify\_lumen\_attestation | view · job\_id, model\_id, prompt\_hash, output\_hash, seed, precision, polynomial\_digest, provider\_pubkey, provider\_signature | | settle\_lumen\_receipt | state · receipt\_id, job\_id, provider\_did, lumen\_attestation | ## Sigil Crucible Training Coordination [#sigil-crucible-training-coordination] Service DID: did:oas:sigil:service:system-crucible. Runtime: anvil-wasm. Interface version: 0.1.0. | Item | Details | | ---------------------- | --------------------------------------------------------------------------------------------------- | | train\_open | state · coordinator\_did, run\_id, reward\_token\_id, reward\_pool, policy\_version, verifier\_mode | | rollout\_batch\_commit | state · run\_id, batch\_id, artifact\_cid, policy\_version, verifier\_mode | | reward\_batch\_attest | state · run\_id, batch\_id, attestation\_id, verifier\_did | | weights\_publish | state · run\_id, model\_root, artifact\_cid, publisher\_did | | train\_slash | state · run\_id, slash\_id, offender\_did, evidence\_cid | | train\_close | state · run\_id, reason | # Validators URL: https://docs.sigil.ml/validators Markdown: https://docs.sigil.ml/validators.md Validator operation requires the selected network configuration, identity and stake policy, custody, synchronization, and activation checks. Read the current set instead of assuming a fixed validator count. ## Activation gate [#activation-gate] Query sigil\_getValidatorSet and sigil\_getNetworkActivationStatus for current validator records and activation requirements. Preserve the endpoint, chain ID, software version, and observation time alongside your results. The network can be active before it is fully decentralized. Public decentralized labeling is separate from block production and requires the independent operator roster, stake distribution, provider distribution, ASN distribution, region distribution, and attestation URL checks to pass. ## Operator flow [#operator-flow] Use the approved network-specific onboarding procedure to establish root lineage, bind the validator DID, configure custody, and meet staking and registry policy. Generic identity lifecycle commands are not interchangeable with the supported typed paths. Operators should keep infrastructure configuration, key custody, operator records, and distribution evidence current. Complete synchronization and activation checks before serving a node as an operational dependency. ## Read the current validator set [#read-the-current-validator-set] The response includes validators and count. Preserve the response as observed; do not fill an unavailable set with sample operators. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getValidatorSet","params":{}}' ``` # Track the interface, then the release. URL: https://docs.sigil.ml/build/changelog Markdown: https://docs.sigil.ml/build/changelog.md A dated documentation record. Network deployment and software release status should be checked independently. ## September 13, 2026 / Documentation refresh [#september-13-2026--documentation-refresh] Added a network-aware quickstart, copyable read-only examples, a searchable canonical RPC catalog, and readable protocol guides. Network references now use the shared client registry. Feature notes distinguish implemented code paths from enabled network behavior. * [Quickstart](/build/quickstart) * [RPC reference](/build/rpc) * [Protocol specifications](/build/spec) ## Check compatibility with your endpoint [#check-compatibility-with-your-endpoint] Read node and protocol versions from sigil\_getNodeInfo. Keep the client contract version and selected network together with your integration. This page does not claim that a new node binary was released or deployed. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` # Inspect Sigil from your terminal. URL: https://docs.sigil.ml/build/cli Markdown: https://docs.sigil.ml/build/cli.md The source workspace includes sigil-cli. Use explicit endpoints and chain IDs, and begin with read-only node and query commands. ## Run from a Sigil source checkout [#run-from-a-sigil-source-checkout] With a Rust toolchain and the workspace dependencies installed, run the CLI from the Sigil repository root. This builds the local CLI; it does not install an unverified remote binary. ```bash cargo run --manifest-path node/Cargo.toml -p sigil-cli --bin sigil-cli -- --help ``` ## Read node identity [#read-node-identity] The node info command calls sigil\_getNodeInfo. Pass --rpc-url explicitly because the CLI default targets localhost. ```bash cargo run --manifest-path node/Cargo.toml -p sigil-cli --bin sigil-cli -- \ --rpc-url 'https://rpc.sigil.ml/rpc' \ --chain-id 'sigil-mainnet-1' node info ``` ## Read-only commands [#read-only-commands] Use the same global endpoint and chain-ID flags with these subcommands. Replace DID and hash placeholders with records from the selected network. | Item | Details | | ---------------------- | --------------------------------- | | node info | Node version and chain identity. | | node peers | Node peer information. | | status | Synchronization status. | | query block | Latest block window. | | query block --height 1 | A block at an explicit height. | | query balance \ | Balance and nonce for an account. | | query tx \ | A transaction by hash. | ## Before transaction commands [#before-transaction-commands] A command appearing in --help is not a guarantee that the selected network enables its transaction path. Check the matching specification, network policy, signer, nonce, and fee first. Keep private signing material out of command history and logs. * [Transaction and execution boundaries](/build/spec/protocol) * [Network activation](/networks) # Small examples. Real requests. URL: https://docs.sigil.ml/build/examples Markdown: https://docs.sigil.ml/build/examples.md Copy a client, inspect a block, and verify a receipt. Each example reads public state without signing or submitting a transaction. ## A client that checks network identity [#a-client-that-checks-network-identity] Run this JavaScript in Node.js 22+ as an .mjs file. It checks transport status, JSON-RPC errors, and chain identity before reading activation. It prints the response received; it does not assume an active state. ```javascript const endpoint = 'https://rpc.sigil.ml/rpc'; const expectedChainId = 'sigil-mainnet-1'; async function readRpc(method, params = {}) { const response = await fetch(endpoint, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }), signal: AbortSignal.timeout(15000), }); if (!response.ok) throw new Error('HTTP ' + response.status); const envelope = await response.json(); if (envelope.error) { throw new Error(envelope.error.code + ': ' + envelope.error.message); } if (!Object.hasOwn(envelope, 'result')) throw new Error('Missing RPC result'); return envelope.result; } const node = await readRpc('sigil_getNodeInfo'); if (node.chain_id !== expectedChainId) throw new Error('Wrong network'); const activation = await readRpc('sigil_getNetworkActivationStatus'); console.log({ node, activation }); ``` ## Inspect a small block window [#inspect-a-small-block-window] count is a positive integer, capped by the handler at 100. The response contains blocks, latest\_height, and count. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getLatestBlock","params":{"count":3}}' ``` ## Look up a transaction receipt [#look-up-a-transaction-receipt] Replace YOUR\_TRANSACTION\_HASH with a transaction hash from the same network. Check the returned status and receipt instead of treating submission as settlement. A not-found error is distinct from success. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getTransactionReceipt","params":{"hash":"YOUR_TRANSACTION_HASH"}}' ``` * [Evidence anchoring boundaries](https://sigil.ml/evidence) ## Study the reference contract interfaces [#study-the-reference-contract-interfaces] Sigil-FT-1, Sigil-Multisig-1, and Sigil-Vesting-1 are source-workspace reference contracts for the ANVIL WASM runtime. Their ABI takes a JSON string containing a pipe-delimited command; it is not an Ethereum ABI. | Item | Details | | ---------------- | ------------------------------------------------------------------------------------------ | | Sigil-FT-1 | Read interfaces include balance\|did, allowance\|owner\|spender, and total. | | Sigil-Multisig-1 | Read interfaces include ready\|proposal\_id, approvals\|proposal\_id, and is\_signer\|did. | | Sigil-Vesting-1 | Read interfaces include vested, released, and releasable. | * [Contract lifecycle and policy](https://sigil.ml/contracts) * [System contract registry](/system-contracts) # Answers before assumptions. URL: https://docs.sigil.ml/build/faq Markdown: https://docs.sigil.ml/build/faq.md The distinctions that matter when integrating with an agent-focused blockchain. ## Do I need a wallet for the quickstart? [#do-i-need-a-wallet-for-the-quickstart] No. The quickstart only reads node identity, activation, and block state. It does not ask you to sign or submit a transaction. ## Is Sigil an EVM-compatible chain? [#is-sigil-an-evm-compatible-chain] Sigil uses typed native transactions and an ANVIL WASM contract runtime. Do not assume Ethereum transaction formats, addresses, ABIs, or wallet APIs apply. ## Does a listed RPC method mean a feature is live? [#does-a-listed-rpc-method-mean-a-feature-is-live] No. The method catalog identifies the client interface. Handler support, node build features, genesis policy, activation height, backing state, and transaction dispatch determine what a particular endpoint can do. ## Which currency should my application display? [#which-currency-should-my-application-display] Use the selected network configuration: MINT for mainnet, BITS for Evolve canary, and SIG for the Velocity testnet. Verify the returned chain ID before applying currency metadata. ## What does getNodeInfo return? [#what-does-getnodeinfo-return] The current handler returns version, chain\_id, and protocol\_version. Read block, validator, and activation methods for their respective state instead of expecting every metric in one response. ## Why can HTTP 200 still mean failure? [#why-can-http-200-still-mean-failure] JSON-RPC can return an error envelope over a successful HTTP transport. Check the error field before reading result, and show unavailable state when the call fails. ## Does a commitment prove that an AI result is correct? [#does-a-commitment-prove-that-an-ai-result-is-correct] A digest commitment can establish byte integrity, attribution, and inclusion. It does not by itself prove model execution, result correctness, storage availability, privacy, or zero knowledge. ## Can I create a treasury or payment channel today? [#can-i-create-a-treasury-or-payment-channel-today] The inspected public executor rejects direct treasury and payment-channel transaction variants. Treat those specifications as design references until a supported and activated path is documented for your network. # Build something agents can use. URL: https://docs.sigil.ml/build Markdown: https://docs.sigil.ml/build.md Connect to Sigil, understand its execution model, and turn agent work into verifiable records. Start with one read-only request. ## Your first request [#your-first-request] No wallet or signing key is needed to ask a public node which chain it serves. The response reports chain\_id, version, and protocol\_version. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` * [Follow the quickstart](/build/quickstart) ## Choose your starting point [#choose-your-starting-point] Use the reference that matches the task in front of you. | Item | Details | | ----------------------- | -------------------------------------------------------------------------------- | | Connect a client | Check network identity, activation, JSON-RPC errors, and response shapes. | | Understand the protocol | Read typed execution, identity, lineage, consensus, and verification boundaries. | | Operate a node | Inspect synchronization, validator state, and activation before making changes. | * [RPC reference](/build/rpc) * [Protocol specifications](/build/spec) * [Operator documentation](/validators) ## From a useful action to a durable record [#from-a-useful-action-to-a-durable-record] Contracts, evidence anchoring, artifact storage, compute, and labor are connected building blocks. Read the availability and policy boundaries for each capability before designing a transaction flow. * [Evidence anchoring](https://sigil.ml/evidence) * [Smart contracts](https://sigil.ml/contracts) * [Storage marketplace](https://sigil.ml/storage) * [Compute verification](/build/spec/compute) # Make your first Sigil request. URL: https://docs.sigil.ml/build/quickstart Markdown: https://docs.sigil.ml/build/quickstart.md Identify a node, check network activation, and read a block window. These requests query public state and do not submit transactions. ## 1. Choose an endpoint [#1-choose-an-endpoint] You need a terminal with curl and network access. The examples below use the configured mainnet endpoint. Use the network table to select a canary or testnet endpoint instead; do not infer availability from a configured URL. | Item | Details | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Evolve Canary | evolve-canary-1 · BITS · [https://sigil-velocity-canary-root-1.fly.dev/rpc](https://sigil-velocity-canary-root-1.fly.dev/rpc) | | Sigil Mainnet | sigil-mainnet-1 · MINT · [https://rpc.sigil.ml/rpc](https://rpc.sigil.ml/rpc) | | Sigil Velocity Testnet | sigil-velocity-testnet-1 · SIG · [https://sigil-velocity-root-1.fly.dev/rpc](https://sigil-velocity-root-1.fly.dev/rpc) | * [Network reference](/networks) ## 2. Read the node identity [#2-read-the-node-identity] Check that result.chain\_id is sigil-mainnet-1 when using the mainnet example. The other fields are version and protocol\_version. A JSON-RPC error can arrive inside an HTTP 200 response, so inspect the envelope as well as HTTP status. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## 3. Inspect activation [#3-inspect-activation] Read the node identity and compare chain\_id with the network you selected. Then read activation status. An endpoint responding successfully does not establish that every feature is enabled, that a transaction will be accepted, or that the node is synchronized. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNetworkActivationStatus","params":{}}' ``` * [Configured networks and currencies](/networks) * [Network status](https://sigil.ml/network/status) ## 4. Read a block window [#4-read-a-block-window] Despite its singular name, sigil\_getLatestBlock returns a blocks array, latest\_height, and count. Request one record here. An empty array is not evidence of a completed transaction. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getLatestBlock","params":{"count":1}}' ``` ## 5. Add error handling to your client [#5-add-error-handling-to-your-client] Handle transport failures, JSON-RPC errors, a different chain ID, and unavailable backing state explicitly. Before any later write, verify the transaction path, feature policy, nonce, fee, and signing authority for the selected network. * [JavaScript client example](/build/examples#read-client) * [Search all RPC methods](/build/rpc) * [Execution model](/build/spec/protocol) # Every method. One reference. URL: https://docs.sigil.ml/build/rpc Markdown: https://docs.sigil.ml/build/rpc.md Search the canonical method catalog by name or purpose. Verified read examples are copyable; method presence and network activation are separate. ## Request and response contract [#request-and-response-contract] Send JSON-RPC 2.0 over HTTP POST to the selected /rpc endpoint. Include jsonrpc, id, method, and params. Check HTTP status, then inspect error before consuming result. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getNodeInfo", "params": {} } ``` ## Handle failures as first-class results [#handle-failures-as-first-class-results] Do not replace missing chain state with sample records or interpret a failed query as a zero balance. Preserve enough request context to diagnose errors without logging keys, tokens, or private payloads. | Item | Details | | -------------- | -------------------------------------------------------------------------------------------- | | HTTP / timeout | The service could not complete the request. Show an unavailable state and use bounded retry. | | -32601 | The requested method is not supported by this endpoint/version. | | -32602 | Parameters are missing or invalid. Check the named fields and types. | | -32603 | An internal or backing-state failure occurred; retain the error message. | # Use the right client for the job. URL: https://docs.sigil.ml/build/sdk Markdown: https://docs.sigil.ml/build/sdk.md Start with JSON-RPC for reads. Use the Rust SDK for typed configuration, transaction construction, identity resolution, and dedicated protocol helpers. ## Rust client configuration [#rust-client-configuration] The sigil-sdk crate is part of the Sigil source workspace. Its core API is transport-agnostic: configuration and transaction helpers do not automatically create an HTTP client. Set the chain ID explicitly, especially when targeting the Velocity testnet. ```rust use sigil_sdk::SigilClientConfig; let config = SigilClientConfig { rpc_url: "https://rpc.sigil.ml/rpc".to_owned(), chain_id: "sigil-mainnet-1".to_owned(), timeout_secs: 15, auth_token: None, }; ``` ## Choose the relevant module [#choose-the-relevant-module] Enable only the features needed by your integration. Match your application to the version and feature flags in your source checkout. | Item | Details | | ------------------------ | -------------------------------------------------------------------------------------------- | | Core | SigilClientConfig, TransactionBuilder, signing helpers, and document resolver. | | Names and mail | Name normalization and hashing, mailbox records, public mail keys, and delivery commitments. | | Assets and storage | NFT helpers and storage pin request, receipt, and challenge helpers. | | evidence / evidence-http | Artifact digests, anchor transactions, confirmation policy, and optional HTTP transport. | | gal / gal-http | GAL adapters, sign-in transcripts, verification, and optional HTTP anchor client. | ## Connect from another language [#connect-from-another-language] Any language with HTTP and JSON support can issue the read-only requests documented here. Use the Forge overview for the broader agent SDK model; this reference does not assume a package is published for every language. ```javascript const endpoint = 'https://rpc.sigil.ml/rpc'; const expectedChainId = 'sigil-mainnet-1'; async function readRpc(method, params = {}) { const response = await fetch(endpoint, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }), signal: AbortSignal.timeout(15000), }); if (!response.ok) throw new Error('HTTP ' + response.status); const envelope = await response.json(); if (envelope.error) { throw new Error(envelope.error.code + ': ' + envelope.error.message); } if (!Object.hasOwn(envelope, 'result')) throw new Error('Missing RPC result'); return envelope.result; } const node = await readRpc('sigil_getNodeInfo'); if (node.chain_id !== expectedChainId) throw new Error('Wrong network'); const activation = await readRpc('sigil_getNetworkActivationStatus'); console.log({ node, activation }); ``` * [Forge overview](https://sigil.ml/ecosystem/forge) * [JSON-RPC method reference](/build/rpc) # Read the protocol with its boundaries. URL: https://docs.sigil.ml/build/spec Markdown: https://docs.sigil.ml/build/spec.md Concise integration guides for the signed records, deterministic rules, and activation requirements behind Sigil. ## The foundations [#the-foundations] Start with execution, consensus, identity, and lineage. * [Protocol and execution](/build/spec/protocol) * [MACA consensus](/build/spec/maca) * [Global Anchor Layer](/build/spec/gal) * [Identity and authority](/build/spec/identity) ## Work, settlement, and operation [#work-settlement-and-operation] Follow the feature-specific requirements before building a transaction flow. * [Currency and accounting](/build/spec/mint) * [Compute, receipts, and settlement](/build/spec/compute) * [Trusted execution verification](/build/spec/tee) * [Operate with evidence.](/build/spec/operator) * [Know what has been verified.](/build/spec/security) * [Vigils: event-driven contracts.](/build/spec/vigils) ## Design references with explicit gates [#design-references-with-explicit-gates] Keep future or gated primitives discoverable without representing them as currently available write paths. * [Treasuries: design and boundaries.](/build/spec/treasuries) * [Channels: design and boundaries.](/build/spec/czac) # A practical builder toolkit. URL: https://docs.sigil.ml/build/tools Markdown: https://docs.sigil.ml/build/tools.md Choose a tool by the state you need to inspect. Keep chain configuration, client helpers, and operational evidence connected. ## Connect and query [#connect-and-query] Use curl to inspect exact request envelopes, the JavaScript example for a minimal application client, and sigil-cli for the source-workspace command tree. * [Quickstart](/build/quickstart) * [Client examples](/build/examples) * [CLI reference](/build/cli) ## Inspect the right layer [#inspect-the-right-layer] RPC reports node and chain records. A wallet handles user custody and approval. A registry discovers assets. A transport moves bytes. None of these substitutes for the others. * [Network status](https://sigil.ml/network/status) * [Wallet platform guide](https://sigil.ml/wallet) * [MARS registry](https://sigil.ml/ecosystem/mars) * [Weave data layer](https://sigil.ml/ecosystem/weave) ## Keep operations reproducible [#keep-operations-reproducible] Record the endpoint, returned chain ID, software version, request time, and response/error when investigating a problem. Use the incident checklists to collect evidence before changing node state. * [Operational documentation](/validators) * [RPC degradation checklist](/runbooks/rpc-degradation) # Learn by inspecting the chain. URL: https://docs.sigil.ml/build/tutorials Markdown: https://docs.sigil.ml/build/tutorials.md Three short paths through client connection, operational state, and transaction evidence. Each starts with a read and ends with a check you can explain. ## 01 / Connect a network-aware client [#01--connect-a-network-aware-client] Choose a configured endpoint. Call sigil\_getNodeInfo and compare result.chain\_id with the expected chain ID. Call sigil\_getNetworkActivationStatus and display the actual response, including unavailable or pre-activation states. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` * [Complete quickstart](/build/quickstart) * [Working JavaScript client](/build/examples#read-client) ## 02 / Build a truthful status view [#02--build-a-truthful-status-view] Read synchronization and a small block window from the same endpoint. Keep request timestamps and failures separate from values. A node reporting its own stored height does not by itself establish peer agreement or feature activation. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Block-window example](/build/examples#block-window) * [Operator guide](/validators) ## 03 / Follow an existing transaction [#03--follow-an-existing-transaction] Start with a transaction hash from the chosen network. Read sigil\_getTransactionReceipt with the hash field. Keep the receipt status, containing block height, and transaction index together in your UI. Do not turn an RPC error into a completed record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getTransactionReceipt","params":{"hash":"YOUR_TRANSACTION_HASH"}}' ``` * [Transaction reference](/build/rpc#methods) * [Protocol model](/build/spec/protocol) # AkashaKV Corruption URL: https://docs.sigil.ml/runbooks/akashakv-corruption Markdown: https://docs.sigil.ml/runbooks/akashakv-corruption.md Collect evidence, follow the approved recovery path, and verify the result when investigating akashakv corruption. ## Immediate procedure [#immediate-procedure] 1. Stop writes to the affected node and snapshot the data directory. 2. Compare state roots against healthy validators at the same finalized height. 3. Restore from a verified snapshot; do not hand-edit state files. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Consensus Halt URL: https://docs.sigil.ml/runbooks/consensus-halt Markdown: https://docs.sigil.ml/runbooks/consensus-halt.md Collect evidence, follow the approved recovery path, and verify the result when investigating consensus halt. ## Immediate procedure [#immediate-procedure] 1. Check sigil\_getNetworkActivationStatus on all public RPC endpoints. 2. Compare ready validator roles and stake with the approved topology and current activation requirements before changing deployment state. 3. Inspect validator logs for genesis hash mismatch, liveness probe restart loops, and peer connectivity. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Fork Repair URL: https://docs.sigil.ml/runbooks/fork-repair Markdown: https://docs.sigil.ml/runbooks/fork-repair.md Collect evidence, follow the approved recovery path, and verify the result when investigating fork repair. ## Immediate procedure [#immediate-procedure] 1. Freeze rollout changes and collect block hashes from a quorum of validators. 2. Identify the highest common finalized height before restarting any validator. 3. Do not delete PVCs. Snapshot first, then repair from a signed operator runbook. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Mempool Flood URL: https://docs.sigil.ml/runbooks/mempool-flood Markdown: https://docs.sigil.ml/runbooks/mempool-flood.md Collect evidence, follow the approved recovery path, and verify the result when investigating mempool flood. ## Immediate procedure [#immediate-procedure] 1. Confirm admission rejection reasons and RPC edge rate limiting. 2. Check node CPU, memory, queue depth, and rejection reasons before adjusting public RPC rate limits. 3. Prefer edge-layer controls before changing consensus parameters. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # RPC Degradation URL: https://docs.sigil.ml/runbooks/rpc-degradation Markdown: https://docs.sigil.ml/runbooks/rpc-degradation.md Collect evidence, follow the approved recovery path, and verify the result when investigating rpc degradation. ## Immediate procedure [#immediate-procedure] 1. Compare edge health, service endpoints, and backend sigil\_getNodeInfo output. 2. If a dedicated RPC pod is stale, route only after it reports current activation status. 3. Do not point public services at validator pods except as a short emergency bypass. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Validator Double Sign URL: https://docs.sigil.ml/runbooks/validator-double-sign Markdown: https://docs.sigil.ml/runbooks/validator-double-sign.md Collect evidence, follow the approved recovery path, and verify the result when investigating validator double sign. ## Immediate procedure [#immediate-procedure] 1. Preserve signed evidence before changing keys or pods. 2. Jail or isolate the validator according to governance policy. 3. Rotate compromised key material only after preserving the evidence bundle. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Validator Downtime URL: https://docs.sigil.ml/runbooks/validator-downtime Markdown: https://docs.sigil.ml/runbooks/validator-downtime.md Collect evidence, follow the approved recovery path, and verify the result when investigating validator downtime. ## Immediate procedure [#immediate-procedure] 1. Check node, pod, PVC, and peer health before restarting the validator. 2. Verify the validator did not miss an activation or protocol-upgrade height. 3. Record downtime evidence for slashing and transparency review. ## Capture network evidence [#capture-network-evidence] Record the endpoint, returned chain ID, node version, timestamps, current height, and observed error. Compare the affected node with healthy nodes on the same chain; retain logs and signed evidence before making changes. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNodeInfo","params":{}}' ``` ## Verify recovery [#verify-recovery] Repeat the original failing check. Confirm expected synchronization and activation state, and compare the relevant block hashes or state roots at the same height. Record the recovery action, evidence, and remaining uncertainty in the incident record. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://sigil-velocity-canary-root-1.fly.dev/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` * [Operator guide](/build/spec/operator) * [RPC reference](/build/rpc) # Compute, receipts, and settlement URL: https://docs.sigil.ml/build/spec/compute Markdown: https://docs.sigil.ml/build/spec/compute.md Separate off-chain work from on-chain commitments and the evidence accepted for payment. ## A provider-bound job lifecycle [#a-provider-bound-job-lifecycle] The compute surface covers providers, escrow, jobs, receipts, settlement, audit trails, and challenges. Work runs on provider infrastructure; the chain applies deterministic rules to the records and evidence it receives. ## Verification modes have different guarantees [#verification-modes-have-different-guarantees] T1 signed/optimistic, T2 redundant/quorum, and T3 attestation paths are distinct. An attestation path needs enabled policy and real verifier material. Do not treat every signature as proof of full execution. Lumen verifies a narrower class of sampled commitments and provider signatures. Crucible coordinates training runs and artifact/reward records; neither means that the blockchain executes the entire model. * [Lumen](https://sigil.ml/technology/lumen) * [Crucible](https://sigil.ml/technology/crucible) * [TEE verification](/build/spec/tee) ## Discover actual providers and records [#discover-actual-providers-and-records] Use compute/provider query methods to inspect real network state. Empty or unavailable results must stay empty or unavailable. Build features, activated policy, DAO backing, and trust material can affect acceptance. * [RPC catalog](/build/rpc) * [Compute documentation](/compute) * [Storage availability](https://sigil.ml/storage) # Channels: design and boundaries. URL: https://docs.sigil.ml/build/spec/czac Markdown: https://docs.sigil.ml/build/spec/czac.md Keep agent communication architecture distinct from payment-channel availability. ## Communication and payment are different paths [#communication-and-payment-are-different-paths] Channel designs describe bounded interactions between agents and zones. They do not make every agent message a settled payment or imply that arbitrary cross-zone transaction variants are enabled. ## Payment channels remain gated [#payment-channels-remain-gated] The inspected executor rejects direct payment-channel transaction paths, and mainnet v1 forbids enabling payment channels. Do not build a current payment flow around unlimited or fee-free channel claims. ## Use the correct cross-zone interface [#use-the-correct-cross-zone-interface] Contract-host send\_zone\_message envelopes have a deterministic delivery pump when the relevant runtime and policy are enabled. Legacy DeployZone, InvokeZone, and CrossZoneMessage transaction variants remain rejected. * [Zones and contract messaging](https://sigil.ml/zones) * [Channel overview](https://sigil.ml/channels) * [Protocol model](/build/spec/protocol) # Global Anchor Layer URL: https://docs.sigil.ml/build/spec/gal Markdown: https://docs.sigil.ml/build/spec/gal.md Connect identities to roots, lineage, commitments, and revocation evidence. ## Start with the root of authority [#start-with-the-root-of-authority] HMR, MHR, and ENR represent human, multi-human, and enterprise roots. Descendant identities retain parent relationships so that authority can be traced rather than inferred from a display name. ## Verify each boundary [#verify-each-boundary] Root anchoring, revocation, parent signatures, document commitments, and inclusion proofs are separate checks. A valid document shape is not sufficient evidence that its lineage is anchored or current. ## Use the typed path [#use-the-typed-path] Typed GAL root, lineage, shard, and revocation operations depend on Tower support. Generic GAL and MARS anchoring transaction variants are rejected by the inspected public executor. Query the supported gal\_\* methods and confirm network policy before any write. * [GAL method catalog](/build/rpc#namespace-gal) * [Identity guide](/build/spec/identity) # Identity and authority URL: https://docs.sigil.ml/build/spec/identity Markdown: https://docs.sigil.ml/build/spec/identity.md DIDs identify the signer; lineage and policy explain what that signer is allowed to do. ## Registration is one part of a lifecycle [#registration-is-one-part-of-a-lifecycle] The node has a concrete identity-registration handler. Generic update, revoke, and delegate variants do not all share that implementation. Direct root registration, agent issuance, and key/permission lifecycle paths are separately gated in the inspected executor. ## Use precise standards language [#use-precise-standards-language] OAS uses DID-compatible identity conventions and cryptographic documents. Compatibility with W3C DID formats should not be described as OAS being a W3C-issued or endorsed standard. A username or .sigil name is a human-readable resolution layer. Resolve it to the underlying identity and use the correct authority checks. * [Usernames](https://sigil.ml/usernames) * [Sigil Name System](https://sigil.ml/names) ## Recovery uses a dedicated ceremony [#recovery-uses-a-dedicated-ceremony] The dedicated recovery path combines guardians, thresholds, timelocks, and a panic-abort mechanism. Legacy IdentityRecover is not a substitute for the current ceremony. * [Recovery overview](https://sigil.ml/recovery) * [Lineage verification](/build/spec/gal) * [Identity RPC methods](/build/rpc) # MACA consensus URL: https://docs.sigil.ml/build/spec/maca Markdown: https://docs.sigil.ml/build/spec/maca.md Stake quorum, signed votes, deterministic validation, and commitment form the block agreement path. ## From proposal to commitment [#from-proposal-to-commitment] A proposal must be validated against the same deterministic rules by the participating validators. Domain-separated signing binds votes to their consensus context; quorum rules determine when agreement is sufficient. Do not interpret an animated round diagram or an empty-block interval as a universal finality or throughput guarantee. Workload, topology, configuration, and measurement window matter. ## Inspect the participating set [#inspect-the-participating-set] Read the validator set and activation status from the selected network. A configured launch target is distinct from the currently returned validator roster. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getValidatorSet","params":{}}' ``` ## Execution lanes and epoch evidence [#execution-lanes-and-epoch-evidence] Velocity describes the execution-lane architecture. Tower covers epoch-level evidence and finality concepts. Their implementation and activation boundaries should remain separate from block-consensus marketing claims. * [Velocity architecture](https://sigil.ml/technology/velocity) * [Tower](https://sigil.ml/tower) * [Benchmark evidence](https://sigil.ml/technology/benchmarks) # Currency and accounting URL: https://docs.sigil.ml/build/spec/mint Markdown: https://docs.sigil.ml/build/spec/mint.md Keep units, network identity, balances, and settlement rules explicit. ## One network, one currency context [#one-network-one-currency-context] MINT, BITS, and test SIG belong to distinct networks. Do not mix balances, fees, faucet expectations, or signing previews across them. Configured genesis supply is not a real-time circulating-supply measurement. | Item | Details | | ------------------------ | -------------------------------------------- | | evolve-canary-1 | BITS · 1,000,000 base units per display unit | | sigil-mainnet-1 | MINT · 1,000,000 base units per display unit | | sigil-velocity-testnet-1 | SIG · 1,000,000 base units per display unit | ## Preserve integer precision [#preserve-integer-precision] Balances and supply use base-unit integers. Avoid floating-point arithmetic for signing or accounting. Use arbitrary-precision integers and a lossless JSON strategy when numeric values can exceed your runtime’s safe-integer range. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getBalance","params":{"did":"YOUR_ACCOUNT_DID"}}' ``` ## Read policy before estimating outcomes [#read-policy-before-estimating-outcomes] Transfer, staking, delegation, and rewards have concrete code paths, with system-contract and policy considerations. Fee levels, stake minimums, reward settings, and allocations must come from the selected network configuration rather than a fixed marketing example. * [Currency and supply reference](/economics) * [System contracts](/system-contracts) # Operate with evidence. URL: https://docs.sigil.ml/build/spec/operator Markdown: https://docs.sigil.ml/build/spec/operator.md Confirm identity, configuration, synchronization, and activation before making a node part of an operational workflow. ## Check the network before you write [#check-the-network-before-you-write] Read the node identity and compare chain\_id with the network you selected. Then read activation status. An endpoint responding successfully does not establish that every feature is enabled, that a transaction will be accepted, or that the node is synchronized. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getNetworkActivationStatus","params":{}}' ``` * [Configured networks and currencies](/networks) * [Network status](https://sigil.ml/network/status) ## Inspect synchronization and peers [#inspect-synchronization-and-peers] Read sync status and peer state from the intended endpoint. Preserve chain ID, software version, observed height, timestamps, and errors in your incident evidence. ```bash curl --fail-with-body --show-error --silent --max-time 15 'https://rpc.sigil.ml/rpc' \ -H 'content-type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"sigil_getSyncStatus","params":{}}' ``` ## Keep custody and operations distinct [#keep-custody-and-operations-distinct] A validator requires the right lineage, staking and registry policy, software configuration, and key custody. Independent operator and distribution evidence is separate from a node being online or producing blocks. * [Validator guide](/validators) * [Consensus incident checklist](/runbooks/consensus-halt) * [RPC degradation](/runbooks/rpc-degradation) # Protocol and execution URL: https://docs.sigil.ml/build/spec/protocol Markdown: https://docs.sigil.ml/build/spec/protocol.md Understand what is signed, what runs deterministically, and what the chain actually commits. ## Typed transactions, deterministic state [#typed-transactions-deterministic-state] A signed transaction carries its chain ID, sender DID, nonce, gas settings, timestamp, and typed operation. Admission, authorization, policy checks, and native execution determine whether a transition is accepted. WASM contracts run through the ANVIL runtime when contracts, WASM, and execution policy are enabled. System contracts gate privileged transitions while native handlers mutate state. ## Keep execution boundaries explicit [#keep-execution-boundaries-explicit] Training, inference, transport, and application UI run outside deterministic consensus. Sigil records the relevant commitments, permissions, receipts, and settlement transitions. A commitment is evidence about bytes and attribution, not a universal correctness proof. * [Evidence anchoring](https://sigil.ml/evidence) * [System contracts](/system-contracts) ## Types do not establish availability [#types-do-not-establish-availability] A transaction enum or method name is an interface surface. The active executor, feature build, genesis policy, and activation gates determine what is accepted. Direct treasury, certain identity lifecycle, and payment-channel variants remain gated in the inspected executor. * [Treasury design boundary](/build/spec/treasuries) * [Channel design boundary](/build/spec/czac) # Know what has been verified. URL: https://docs.sigil.ml/build/spec/security Markdown: https://docs.sigil.ml/build/spec/security.md Build on explicit trust boundaries instead of treating signatures, commitments, attestations, and proofs as interchangeable. ## Match the claim to its evidence [#match-the-claim-to-its-evidence] A signature establishes authorization under a key. A digest establishes a commitment to bytes. Inclusion ties a record to a block. TEE verification adds hardware/workload-specific claims. Each has its own prerequisites and limits. | Item | Details | | ------------------- | ------------------------------------------------------------------------------------ | | Artifact commitment | Integrity and attribution; not automatic correctness, availability, or privacy. | | Lumen receipt | Narrow sampled-commitment verification; not a proof of full model execution. | | TEE attestation | Vendor, measurement, trust material, and policy must all be verified. | | Zero knowledge | A roadmap boundary: current signed hash commitments are not a shipped Jolt verifier. | ## A client should fail clearly [#a-client-should-fail-clearly] Verify chain identity before signing, preserve integer precision, bind nonces and authorization to the intended operation, and distinguish unsupported state from zero state. Never put a private signing key in a public web example or an RPC read form. ## Audit claims need an audit record [#audit-claims-need-an-audit-record] Source availability and local tests are useful evidence, but they are different from an independent security audit or verification of a deployed revision. Use dated findings with explicit scope. * [Security overview](https://sigil.ml/technology/security) * [Proof roadmap](https://sigil.ml/technology/zk) * [TEE requirements](/build/spec/tee) # Trusted execution verification URL: https://docs.sigil.ml/build/spec/tee Markdown: https://docs.sigil.ml/build/spec/tee.md An attestation is useful only when the verifier, trust material, and policy agree. ## Check the whole verification chain [#check-the-whole-verification-chain] TEE acceptance depends on the node build, enabled policy, supported vendor format, approved measurement, pinned trust material, and successful verification. A vendor name in a feature list is not evidence that the network has an active compatible provider. ## State what the receipt establishes [#state-what-the-receipt-establishes] Document the workload and measurement being attested, the verifier used, and the freshness/replay rules. Keep TEE hardware attestation separate from ordinary provider signatures, quorum agreement, and zero-knowledge claims. ## Treat activation as network-specific [#treat-activation-as-network-specific] Unsupported proof modes should fail closed. Use selected-network policy and current verifier evidence before exposing a TEE-backed job mode to users. * [Compute verification](/build/spec/compute) * [Security boundaries](/build/spec/security) * [Network configuration](/networks) # Treasuries: design and boundaries. URL: https://docs.sigil.ml/build/spec/treasuries Markdown: https://docs.sigil.ml/build/spec/treasuries.md A design reference for policy-controlled funds. Direct public treasury transactions remain gated in the inspected executor. ## The intended model [#the-intended-model] Treasury policy separates a pool of funds from the authority to spend them. A complete implementation must bind signer authority, limits, proposal/approval rules, and settlement to deterministic state. ## Current transaction boundary [#current-transaction-boundary] All five direct treasury transaction variants are rejected by the inspected executor. A treasury type, system-policy module, or illustration should not be presented as an available create-and-spend integration. ## Read the related implemented surfaces [#read-the-related-implemented-surfaces] Governance, reserve allocation, and reference multisig contracts are distinct concepts with their own gates. Verify the concrete supported path rather than substituting one for a direct treasury transaction. * [System contracts](/system-contracts) * [Reference contract interfaces](/build/examples#reference-contracts) * [Treasury overview](https://sigil.ml/treasuries) # Vigils: event-driven contracts. URL: https://docs.sigil.ml/build/spec/vigils Markdown: https://docs.sigil.ml/build/spec/vigils.md A verified event delivery schedules a deterministic callback in the next block. ## 1. Opt in and subscribe [#1-opt-in-and-subscribe] The contract opts in with accepts\_vigil\_callbacks. A subscriber registers an event filter and the required bond and gas funding. Allowed source kinds and activation height are controlled by chain policy. ## 2. Submit evidence from an ingestor [#2-submit-evidence-from-an-ingestor] Ingestors observe sources off chain and submit signed EventDelivery records. Validators check source policy, proof material, replay protection, gas, and bond requirements. External network calls are not performed in consensus execution. ## 3. Execute in canonical order [#3-execute-in-canonical-order] Accepted deliveries schedule callbacks in the canonical next-block order. The callback remains deterministic and subject to the contract and chain execution rules. The contract can react autonomously without giving up replayable state transitions. ## Inspect subscriptions and delivery history [#inspect-subscriptions-and-delivery-history] The RPC catalog includes subscription, ingestor, and delivery-history queries, along with separately authorized lifecycle methods. Method presence does not bypass contract opt-in, feature builds, source allowlists, or activation policy. * [RPC catalog](/build/rpc) * [Vigils overview](https://sigil.ml/technology/vigils) * [Contract runtime](https://sigil.ml/contracts) # Rust library reference URL: https://docs.sigil.ml/reference/rust Markdown: https://docs.sigil.ml/reference/rust.md All 38 manifest packages in the documented workspace. ## Packages [#packages] This catalog is generated from source manifests and declared Rust modules. It preserves versions and feature conditions; source availability is distinct from registry publication and network activation. | Package | Version | Reference modules | | -------------------------------------------------------------------- | ------- | ----------------- | | [sigil-state](/reference/rust/sigil-state) | 0.1.0 | 13 | | [sigil-core](/reference/rust/sigil-core) | 0.1.0 | 28 | | [sigil-consensus](/reference/rust/sigil-consensus) | 0.1.0 | 9 | | [sigil-network](/reference/rust/sigil-network) | 0.1.0 | 9 | | [sigil-economics](/reference/rust/sigil-economics) | 0.1.0 | 7 | | [sigil-governance](/reference/rust/sigil-governance) | 0.1.0 | 5 | | [sigil-execution](/reference/rust/sigil-execution) | 0.1.0 | 9 | | [sigil-zk](/reference/rust/sigil-zk) | 0.1.0 | 8 | | [sigil-storage](/reference/rust/sigil-storage) | 0.1.0 | 9 | | [sigil-compute](/reference/rust/sigil-compute) | 0.1.0 | 6 | | [sigil-crucible](/reference/rust/sigil-crucible) | 0.1.0 | 7 | | [sigil-lumen](/reference/rust/sigil-lumen) | 0.1.0 | 4 | | [sigil-rpc](/reference/rust/sigil-rpc) | 0.1.0 | 6 | | [sigil-sdk](/reference/rust/sigil-sdk) | 0.1.0 | 14 | | [sigil-cli](/reference/rust/sigil-cli) | 0.1.0 | 2 | | [sigil-keyloader](/reference/rust/sigil-keyloader) | 0.1.0 | 1 | | [sigil-ingestor](/reference/rust/sigil-ingestor) | 0.1.0 | 1 | | [sigil-velocity-bench](/reference/rust/sigil-velocity-bench) | 0.1.0 | 1 | | [sigil-snapshot-publisher](/reference/rust/sigil-snapshot-publisher) | 0.1.0 | 0 | | [sigil-node](/reference/rust/sigil-node) | 0.1.0 | 71 | | [sigil-tower](/reference/rust/sigil-tower) | 0.1.0 | 10 | | [sigil-czac](/reference/rust/sigil-czac) | 0.1.0 | 9 | | [sigil-nova](/reference/rust/sigil-nova) | 0.1.0 | 10 | | [sigil-wallet-core](/reference/rust/sigil-wallet-core) | 0.1.0 | 1 | | [sigil-wallet](/reference/rust/sigil-wallet) | 0.1.0 | 13 | | [sigil-integration-tests](/reference/rust/sigil-integration-tests) | 0.1.0 | 0 | | [sigil-tee-material](/reference/rust/sigil-tee-material) | 0.1.0 | 9 | | [sigil-wasm](/reference/rust/sigil-wasm) | 0.1.0 | 5 | | [sigil-anomaly](/reference/rust/sigil-anomaly) | 0.1.0 | 12 | | [sigil-validator-agent](/reference/rust/sigil-validator-agent) | 0.1.0 | 9 | | [sigil-ft-1](/reference/rust/sigil-ft-1) | 1.0.0 | 1 | | [sigil-multisig-1](/reference/rust/sigil-multisig-1) | 1.0.0 | 1 | | [sigil-vesting-1](/reference/rust/sigil-vesting-1) | 1.0.0 | 1 | | [sigil-system-kernel-1](/reference/rust/sigil-system-kernel-1) | 1.0.0 | 1 | | [sigil-labor-api](/reference/rust/sigil-labor-api) | 0.1.0 | 10 | | [arise-identity](/reference/rust/arise-identity) | 0.1.0 | 5 | | [arise-sigil](/reference/rust/arise-sigil) | 0.1.0 | 8 | | [arise-verify](/reference/rust/arise-verify) | 0.1.0 | 7 | [Download the source inventory](/reference/rust-source.json). # gal_checkRevocation URL: https://docs.sigil.ml/reference/rpc/gal_checkRevocation Markdown: https://docs.sigil.ml/reference/rpc/gal_checkRevocation.md Fetch the revocation status for a DID. **Resolvers MUST call this first on every resolution** — the revocation-first invariant. ## Method [#method] `gal_checkRevocation` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the revocation status for a DID. **Resolvers MUST call this first on every resolution** — the revocation-first invariant. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_check_revocation` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `104`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getEnr URL: https://docs.sigil.ml/reference/rpc/gal_getEnr Markdown: https://docs.sigil.ml/reference/rpc/gal_getEnr.md Fetch the typed `EnrAnchor` for a DID. ## Method [#method] `gal_getEnr` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the typed `EnrAnchor` for a DID. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_enr` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `52`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getEntry URL: https://docs.sigil.ml/reference/rpc/gal_getEntry Markdown: https://docs.sigil.ml/reference/rpc/gal_getEntry.md Fetch a GAL entry (HMR anchor, shard assignment, etc.) by DID. Deprecated: prefer the typed `GetGalHmr` / `GetGalMhr` / `GetGalEnr` methods. ## Method [#method] `gal_getEntry` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a GAL entry (HMR anchor, shard assignment, etc.) by DID. Deprecated: prefer the typed `GetGalHmr` / `GetGalMhr` / `GetGalEnr` methods. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getHmr URL: https://docs.sigil.ml/reference/rpc/gal_getHmr Markdown: https://docs.sigil.ml/reference/rpc/gal_getHmr.md Fetch the typed `HmrAnchor` for a DID. ## Method [#method] `gal_getHmr` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the typed `HmrAnchor` for a DID. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_hmr` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `20`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getMhr URL: https://docs.sigil.ml/reference/rpc/gal_getMhr Markdown: https://docs.sigil.ml/reference/rpc/gal_getMhr.md Fetch the typed `MhrAnchor` for a DID. ## Method [#method] `gal_getMhr` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the typed `MhrAnchor` for a DID. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_mhr` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `36`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getOrgRoot URL: https://docs.sigil.ml/reference/rpc/gal_getOrgRoot Markdown: https://docs.sigil.ml/reference/rpc/gal_getOrgRoot.md Fetch the typed `OrgLineageRoot` for an org DID. ## Method [#method] `gal_getOrgRoot` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the typed `OrgLineageRoot` for an org DID. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_org_root` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `68`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getProof URL: https://docs.sigil.ml/reference/rpc/gal_getProof Markdown: https://docs.sigil.ml/reference/rpc/gal_getProof.md Get a Merkle inclusion proof for a GAL entry. ## Method [#method] `gal_getProof` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get a Merkle inclusion proof for a GAL entry. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getShard URL: https://docs.sigil.ml/reference/rpc/gal_getShard Markdown: https://docs.sigil.ml/reference/rpc/gal_getShard.md Fetch the typed `ShardAssignment` for a subject DID. ## Method [#method] `gal_getShard` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the typed `ShardAssignment` for a subject DID. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_shard` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `88`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getShardAssignment URL: https://docs.sigil.ml/reference/rpc/gal_getShardAssignment Markdown: https://docs.sigil.ml/reference/rpc/gal_getShardAssignment.md Fetch the shard assignment for a given DID or namespace. Deprecated: prefer the typed `GetGalShard` method. ## Method [#method] `gal_getShardAssignment` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the shard assignment for a given DID or namespace. Deprecated: prefer the typed `GetGalShard` method. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getShardTopology URL: https://docs.sigil.ml/reference/rpc/gal_getShardTopology Markdown: https://docs.sigil.ml/reference/rpc/gal_getShardTopology.md Fetch the full typed shard topology snapshot. ## Method [#method] `gal_getShardTopology` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the full typed shard topology snapshot. ## Request binding [#request-binding] Source handler: `rpc_gal::handle_get_shard_topology` in `sigil/node/sigil-node/src/rpc_gal.rs`, line `123`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # gal_getTopologyMap URL: https://docs.sigil.ml/reference/rpc/gal_getTopologyMap Markdown: https://docs.sigil.ml/reference/rpc/gal_getTopologyMap.md Fetch the current shard topology map. Deprecated: prefer the typed `GetGalShardTopology` method. ## Method [#method] `gal_getTopologyMap` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the current shard topology map. Deprecated: prefer the typed `GetGalShardTopology` method. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # JSON-RPC reference URL: https://docs.sigil.ml/reference/rpc Markdown: https://docs.sigil.ml/reference/rpc.md All 170 methods in the canonical Sigil catalog. ## Canonical method catalog [#canonical-method-catalog] The catalog and current dispatcher define the method names. Build features and node profiles may restrict availability. Parameter binding excerpts are derived from source; known read examples are listed separately. | Method | Purpose | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | [gal\_checkRevocation](/reference/rpc/gal_checkRevocation) | Fetch the revocation status for a DID. **Resolvers MUST call this first on every resolution** — the revocation-first invariant. | | [gal\_getEnr](/reference/rpc/gal_getEnr) | Fetch the typed `EnrAnchor` for a DID. | | [gal\_getEntry](/reference/rpc/gal_getEntry) | Fetch a GAL entry (HMR anchor, shard assignment, etc.) by DID. Deprecated: prefer the typed `GetGalHmr` / `GetGalMhr` / `GetGalEnr` methods. | | [gal\_getHmr](/reference/rpc/gal_getHmr) | Fetch the typed `HmrAnchor` for a DID. | | [gal\_getMhr](/reference/rpc/gal_getMhr) | Fetch the typed `MhrAnchor` for a DID. | | [gal\_getOrgRoot](/reference/rpc/gal_getOrgRoot) | Fetch the typed `OrgLineageRoot` for an org DID. | | [gal\_getProof](/reference/rpc/gal_getProof) | Get a Merkle inclusion proof for a GAL entry. | | [gal\_getShard](/reference/rpc/gal_getShard) | Fetch the typed `ShardAssignment` for a subject DID. | | [gal\_getShardAssignment](/reference/rpc/gal_getShardAssignment) | Fetch the shard assignment for a given DID or namespace. Deprecated: prefer the typed `GetGalShard` method. | | [gal\_getShardTopology](/reference/rpc/gal_getShardTopology) | Fetch the full typed shard topology snapshot. | | [gal\_getTopologyMap](/reference/rpc/gal_getTopologyMap) | Fetch the current shard topology map. Deprecated: prefer the typed `GetGalShardTopology` method. | | [mars\_discover](/reference/rpc/mars_discover) | Discover MARS entries matching a query. | | [mars\_getEntry](/reference/rpc/mars_getEntry) | Fetch a MARS registry entry by DID. | | [nova\_getAuctionStatus](/reference/rpc/nova_getAuctionStatus) | Get the current status of a Nova land auction. | | [nova\_getAvatar](/reference/rpc/nova_getAvatar) | Fetch an avatar's current state (position, animation, presence). | | [nova\_getBuilding](/reference/rpc/nova_getBuilding) | Fetch a deployed building by ID. | | [nova\_getParcel](/reference/rpc/nova_getParcel) | Fetch a Nova land parcel by ID or coordinates. | | [nova\_getWorldConfig](/reference/rpc/nova_getWorldConfig) | Get the world configuration for a given world ID. | | [nova\_listParcelsInRegion](/reference/rpc/nova_listParcelsInRegion) | List all parcels within a Nova region. | | [sigil\_getAccountNonce](/reference/rpc/sigil_getAccountNonce) | Get the next nonce for an account (replay protection). | | [sigil\_getBalance](/reference/rpc/sigil_getBalance) | Fetch account balance and nonce for a DID. | | [sigil\_getAccount](/reference/rpc/sigil_getAccount) | Fetch an explorer-ready account summary for a DID. | | [sigil\_getBlock](/reference/rpc/sigil_getBlock) | Fetch a block by height or hash. | | [sigil\_getBlockRange](/reference/rpc/sigil_getBlockRange) | Read a stored block window; currently shares the latest-block handler. | | [sigil\_getContract](/reference/rpc/sigil_getContract) | Fetch a deployed contract record by DID. | | [sigil\_getContractEvents](/reference/rpc/sigil_getContractEvents) | Fetch contract events with optional filters. | | [sigil\_getContractState](/reference/rpc/sigil_getContractState) | Fetch a single contract state value by key. | | [sigil\_getDelegations](/reference/rpc/sigil_getDelegations) | Fetch delegations for a delegator DID. | | [sigil\_getDexEvents](/reference/rpc/sigil_getDexEvents) | List recent native DEX events. | | [sigil\_getDexPool](/reference/rpc/sigil_getDexPool) | Fetch a native DEX pool by deterministic pool id. | | [sigil\_getDexPosition](/reference/rpc/sigil_getDexPosition) | Fetch one LP position. | | [sigil\_getDidIdentityNft](/reference/rpc/sigil_getDidIdentityNft) | Fetch the DID-identity index for a subject DID. | | [sigil\_estimateFee](/reference/rpc/sigil_estimateFee) | Estimate the deterministic fee for a transaction envelope. | | [sigil\_estimateSponsoredSetupFee](/reference/rpc/sigil_estimateSponsoredSetupFee) | Estimate the deterministic fee for a setup-only sponsored transaction. | | [sigil\_getEscrowBalance](/reference/rpc/sigil_getEscrowBalance) | Fetch the escrow balance for an organization. | | [sigil\_getComputeAuditTrail](/reference/rpc/sigil_getComputeAuditTrail) | Fetch compute audit events. | | [sigil\_getComputeChallenge](/reference/rpc/sigil_getComputeChallenge) | Fetch a compute challenge by ID. | | [sigil\_getComputeJob](/reference/rpc/sigil_getComputeJob) | Fetch a compute job by ID. | | [sigil\_getComputeProof](/reference/rpc/sigil_getComputeProof) | Fetch proof metadata for a compute receipt. | | [sigil\_getComputeReceipt](/reference/rpc/sigil_getComputeReceipt) | Fetch a settled compute receipt. | | [sigil\_verifyLumenAttestation](/reference/rpc/sigil_verifyLumenAttestation) | Verify a Lumen inference attestation transcript. | | [sigil\_getArtifactCommitment](/reference/rpc/sigil_getArtifactCommitment) | Normalize and validate an off-chain artifact commitment. | | [sigil\_weftPublish](/reference/rpc/sigil_weftPublish) | Publish a hex-encoded payload into the local Weft store. | | [sigil\_weftPublishFile](/reference/rpc/sigil_weftPublishFile) | Publish a local file into the local Weft store. | | [sigil\_weftFetch](/reference/rpc/sigil_weftFetch) | Fetch a verified Weft payload as hex bytes. | | [sigil\_weftFetchFile](/reference/rpc/sigil_weftFetchFile) | Fetch a verified Weft payload and write it to a local file. | | [sigil\_weftStatus](/reference/rpc/sigil_weftStatus) | Inspect local Weft serving status. | | [sigil\_getAccountLaborHistory](/reference/rpc/sigil_getAccountLaborHistory) | Fetch jobs, bids, contracts, and disputes tied to an account DID. | | [sigil\_getIdentity](/reference/rpc/sigil_getIdentity) | Fetch an OAS identity document by DID. | | [sigil\_getLaborClaim](/reference/rpc/sigil_getLaborClaim) | Fetch a bounty claim. | | [sigil\_getLaborBid](/reference/rpc/sigil_getLaborBid) | Fetch a labor bid. | | [sigil\_getLaborContract](/reference/rpc/sigil_getLaborContract) | Fetch a labor contract. | | [sigil\_getLaborDispute](/reference/rpc/sigil_getLaborDispute) | Fetch a labor dispute. | | [sigil\_getLaborEscrow](/reference/rpc/sigil_getLaborEscrow) | Fetch exact escrow accounting for a labor contract. | | [sigil\_getLaborJob](/reference/rpc/sigil_getLaborJob) | Fetch a labor job posting. | | [sigil\_getLaborMilestones](/reference/rpc/sigil_getLaborMilestones) | List milestones for a labor contract. | | [sigil\_getLaborOffer](/reference/rpc/sigil_getLaborOffer) | Fetch an open bounty offer. | | [sigil\_getLaborOfferEvents](/reference/rpc/sigil_getLaborOfferEvents) | Fetch labor offer/claim audit events. | | [sigil\_getTopAccounts](/reference/rpc/sigil_getTopAccounts) | List top accounts by balance/stake. | | [sigil\_getLatestBlock](/reference/rpc/sigil_getLatestBlock) | Read a stored block window ending at the latest height. | | [sigil\_getMacaEpoch](/reference/rpc/sigil_getMacaEpoch) | Fetch a MACA epoch by ID. | | [sigil\_getMacaQuorumProof](/reference/rpc/sigil_getMacaQuorumProof) | Fetch a MACA quorum proof. | | [sigil\_getMacaWorkClaim](/reference/rpc/sigil_getMacaWorkClaim) | Fetch a MACA work claim by work ID. | | [sigil\_getMailAbuseReport](/reference/rpc/sigil_getMailAbuseReport) | Fetch an abuse report. | | [sigil\_getMailDelivery](/reference/rpc/sigil_getMailDelivery) | Fetch a delivery commitment by ID. | | [sigil\_getMailDelegation](/reference/rpc/sigil_getMailDelegation) | Fetch a mailbox permission grant. | | [sigil\_getMailKeys](/reference/rpc/sigil_getMailKeys) | List public mailbox keys, optionally filtered by purpose. | | [sigil\_getMailPolicy](/reference/rpc/sigil_getMailPolicy) | Fetch the current or versioned mailbox receive policy. | | [sigil\_getMailbox](/reference/rpc/sigil_getMailbox) | Fetch a mailbox capability record. | | [sigil\_getNameRecords](/reference/rpc/sigil_getNameRecords) | Fetch resolver records for a `.sigil` name. | | [sigil\_getMempoolStatus](/reference/rpc/sigil_getMempoolStatus) | Fetch local mempool size/capacity. | | [sigil\_getNftCollection](/reference/rpc/sigil_getNftCollection) | Fetch an NFT collection by its collection ID. | | [sigil\_getNftEvents](/reference/rpc/sigil_getNftEvents) | List NFT lifecycle events with optional filters. | | [sigil\_getNftToken](/reference/rpc/sigil_getNftToken) | Fetch a single NFT token within a collection. | | [sigil\_getNodeInfo](/reference/rpc/sigil_getNodeInfo) | Read chain\_id, version, and protocol\_version. | | [sigil\_getOwnerNfts](/reference/rpc/sigil_getOwnerNfts) | List all NFTs (across collections) owned by a DID, with pagination. | | [sigil\_getPeers](/reference/rpc/sigil_getPeers) | List connected peers. | | [sigil\_getProposal](/reference/rpc/sigil_getProposal) | Fetch a governance proposal by ID. | | [sigil\_getProvider](/reference/rpc/sigil_getProvider) | Fetch a compute provider's registration. | | [sigil\_getProviderReputation](/reference/rpc/sigil_getProviderReputation) | Fetch a compute provider's reputation score. | | [sigil\_getState](/reference/rpc/sigil_getState) | Read a value from chain state. | | [sigil\_getStateRoot](/reference/rpc/sigil_getStateRoot) | Get the current state root hash. | | [sigil\_getSponsoredSetupPolicy](/reference/rpc/sigil_getSponsoredSetupPolicy) | Fetch the active setup-only sponsorship policy. | | [sigil\_getSponsoredSetupReceipt](/reference/rpc/sigil_getSponsoredSetupReceipt) | Fetch a sponsored setup receipt by transaction hash. | | [sigil\_getStorageChallenge](/reference/rpc/sigil_getStorageChallenge) | Fetch one storage challenge. | | [sigil\_getStoragePinContract](/reference/rpc/sigil_getStoragePinContract) | Fetch one storage pin contract. | | [sigil\_getStoragePinReceipt](/reference/rpc/sigil_getStoragePinReceipt) | Fetch one storage pin receipt. | | [sigil\_getStoragePinRequest](/reference/rpc/sigil_getStoragePinRequest) | Fetch one storage pin request. | | [sigil\_getStorageProvider](/reference/rpc/sigil_getStorageProvider) | Fetch one storage pinning provider. | | [sigil\_getSyncStatus](/reference/rpc/sigil_getSyncStatus) | Get the current sync status. | | [sigil\_getStorageStatus](/reference/rpc/sigil_getStorageStatus) | Get the node's production storage backend and migration status. | | [sigil\_getTokenBalance](/reference/rpc/sigil_getTokenBalance) | Fetch a launch-live custom token balance for one DID. | | [sigil\_getTokenClass](/reference/rpc/sigil_getTokenClass) | Fetch a launch-live custom token class. | | [sigil\_getTransaction](/reference/rpc/sigil_getTransaction) | Fetch a transaction by hash. | | [sigil\_getTransactions](/reference/rpc/sigil_getTransactions) | List recent transactions. | | [sigil\_getTrainingEvents](/reference/rpc/sigil_getTrainingEvents) | List Crucible audit events. | | [sigil\_getTrainingRewards](/reference/rpc/sigil_getTrainingRewards) | List reward attestations for a training run. | | [sigil\_getTrainingRolloutBatch](/reference/rpc/sigil_getTrainingRolloutBatch) | Fetch a committed rollout batch for a training run. | | [sigil\_getTrainingRun](/reference/rpc/sigil_getTrainingRun) | Fetch a Crucible training run. | | [sigil\_getTrainingSlashes](/reference/rpc/sigil_getTrainingSlashes) | List slashing records for a training run. | | [sigil\_getTrainingWeights](/reference/rpc/sigil_getTrainingWeights) | Fetch or list published training weight anchors. | | [sigil\_getAccountTransactions](/reference/rpc/sigil_getAccountTransactions) | List recent transactions for a DID. | | [sigil\_getTransactionReceipt](/reference/rpc/sigil_getTransactionReceipt) | Fetch the receipt for a transaction. | | [sigil\_getUsernameAuction](/reference/rpc/sigil_getUsernameAuction) | Fetch a premium-name auction by canonical name. | | [sigil\_getValidator](/reference/rpc/sigil_getValidator) | Fetch a single validator's info. | | [sigil\_getValidatorAgent](/reference/rpc/sigil_getValidatorAgent) | Fetch a registered MACA validator agent. | | [sigil\_getValidatorSet](/reference/rpc/sigil_getValidatorSet) | Fetch the current active validator set. | | [sigil\_getNetworkActivationStatus](/reference/rpc/sigil_getNetworkActivationStatus) | Fetch EOS-style boot, stake-collection, active, and stabilized status. | | [sigil\_getZone](/reference/rpc/sigil_getZone) | Fetch an organization zone record. | | [sigil\_cancelVigilSubscription](/reference/rpc/sigil_cancelVigilSubscription) | Cancel a Vigils subscription. | | [sigil\_depositVigilGas](/reference/rpc/sigil_depositVigilGas) | Deposit gas-tank funds for Vigils callbacks. | | [sigil\_deregisterIngestor](/reference/rpc/sigil_deregisterIngestor) | Deregister a Vigils ingestor. | | [sigil\_getIngestor](/reference/rpc/sigil_getIngestor) | Fetch a registered Vigils ingestor. | | [sigil\_getVigilDeliveryHistory](/reference/rpc/sigil_getVigilDeliveryHistory) | Fetch a Vigils delivery-history page. | | [sigil\_getVigilSubscription](/reference/rpc/sigil_getVigilSubscription) | Fetch a Vigils subscription by ID. | | [sigil\_height](/reference/rpc/sigil_height) | Lightweight probe for the local node's current block height. | | [sigil\_listIngestors](/reference/rpc/sigil_listIngestors) | List registered Vigils ingestors. | | [sigil\_listIdentities](/reference/rpc/sigil_listIdentities) | List registered OAS identities. | | [sigil\_listDexPairs](/reference/rpc/sigil_listDexPairs) | List distinct token pairs that currently have pools. | | [sigil\_listDexPools](/reference/rpc/sigil_listDexPools) | List native DEX pools. | | [sigil\_listDexPositions](/reference/rpc/sigil_listDexPositions) | List LP positions by owner and/or pool. | | [sigil\_listComputeChallenges](/reference/rpc/sigil_listComputeChallenges) | List compute challenges for a receipt. | | [sigil\_listComputeJobs](/reference/rpc/sigil_listComputeJobs) | List compute jobs with optional filters. | | [sigil\_listZoneContracts](/reference/rpc/sigil_listZoneContracts) | List deployed contracts in an organization zone. | | [sigil\_listLaborBids](/reference/rpc/sigil_listLaborBids) | List labor bids, optionally for one job. | | [sigil\_listLaborClaims](/reference/rpc/sigil_listLaborClaims) | List bounty claims. | | [sigil\_listLaborJobs](/reference/rpc/sigil_listLaborJobs) | List labor job postings. | | [sigil\_listLaborOffers](/reference/rpc/sigil_listLaborOffers) | List open bounty offers. | | [sigil\_listMacaEpochs](/reference/rpc/sigil_listMacaEpochs) | List MACA epochs. | | [sigil\_listMacaQuorumProofs](/reference/rpc/sigil_listMacaQuorumProofs) | List MACA quorum proofs for an epoch. | | [sigil\_listMacaValidationRecords](/reference/rpc/sigil_listMacaValidationRecords) | List MACA validation records by work ID. | | [sigil\_listMailDeliveriesByRecipient](/reference/rpc/sigil_listMailDeliveriesByRecipient) | List delivery commitments indexed by recipient mailbox. | | [sigil\_listMailDeliveriesBySender](/reference/rpc/sigil_listMailDeliveriesBySender) | List delivery commitments indexed by sender route. | | [sigil\_listMailDelegations](/reference/rpc/sigil_listMailDelegations) | List mailbox permission grants. | | [sigil\_listMailboxesByOwner](/reference/rpc/sigil_listMailboxesByOwner) | List mailboxes owned by a DID. | | [sigil\_listOpenUsernameAuctions](/reference/rpc/sigil_listOpenUsernameAuctions) | List all open premium-name auctions. | | [sigil\_listProposals](/reference/rpc/sigil_listProposals) | List all proposals (optionally filtered by status). | | [sigil\_listProviders](/reference/rpc/sigil_listProviders) | List all registered compute providers. | | [sigil\_listStoragePinContractsByProvider](/reference/rpc/sigil_listStoragePinContractsByProvider) | List storage pin contracts for a provider DID. | | [sigil\_listStoragePinRequestsByOwner](/reference/rpc/sigil_listStoragePinRequestsByOwner) | List storage pin requests for an owner DID. | | [sigil\_listStorageProviders](/reference/rpc/sigil_listStorageProviders) | List registered storage pinning providers. | | [sigil\_listTrainingRuns](/reference/rpc/sigil_listTrainingRuns) | List Crucible training runs. | | [sigil\_listUsernames](/reference/rpc/sigil_listUsernames) | List all usernames owned by a DID. | | [sigil\_listVigilSubscriptions](/reference/rpc/sigil_listVigilSubscriptions) | List Vigils subscriptions with pagination. | | [sigil\_lookupUsername](/reference/rpc/sigil_lookupUsername) | Look up a DID's primary `@username` (reverse-lookup). | | [sigil\_callContractDryRun](/reference/rpc/sigil_callContractDryRun) | Perform a read-only contract call preflight. | | [sigil\_registerContractCode](/reference/rpc/sigil_registerContractCode) | Submit a signed `RegisterContractCode` transaction through the typed public deployment endpoint. | | [sigil\_registerIngestor](/reference/rpc/sigil_registerIngestor) | Register a staked Vigils ingestor. | | [sigil\_registerVigilSubscription](/reference/rpc/sigil_registerVigilSubscription) | Register a Vigils subscription. | | [sigil\_resolveMail](/reference/rpc/sigil_resolveMail) | Resolve a `.sigil` route or mailbox ID into mail delivery metadata. | | [sigil\_resolveName](/reference/rpc/sigil_resolveName) | Resolve a `.sigil` name and all resolver records. | | [sigil\_resolveUsername](/reference/rpc/sigil_resolveUsername) | Resolve a canonical `@username` to its on-chain record. | | [sigil\_resolveWebsite](/reference/rpc/sigil_resolveWebsite) | Resolve website/content records for a `.sigil` name. | | [sigil\_searchUsername](/reference/rpc/sigil_searchUsername) | Search usernames by ASCII prefix, with limit. | | [sigil\_selectComputeProvider](/reference/rpc/sigil_selectComputeProvider) | Deterministically select a compute provider. | | [sigil\_sendTransaction](/reference/rpc/sigil_sendTransaction) | Submit a signed transaction. | | [sigil\_sendSponsoredSetupTransaction](/reference/rpc/sigil_sendSponsoredSetupTransaction) | Submit a signed setup-only sponsored transaction. | | [sigil\_quoteDexSwapExactIn](/reference/rpc/sigil_quoteDexSwapExactIn) | Quote an exact-input swap. | | [sigil\_quoteDexSwapExactOut](/reference/rpc/sigil_quoteDexSwapExactOut) | Quote an exact-output swap. | | [sigil\_slashIngestor](/reference/rpc/sigil_slashIngestor) | Slash a Vigils ingestor with deterministic evidence. | | [sigil\_submitEventDelivery](/reference/rpc/sigil_submitEventDelivery) | Submit a verified event delivery for a subscription. | | [sigil\_updateIngestorStake](/reference/rpc/sigil_updateIngestorStake) | Update a staked Vigils ingestor. | | [sigil\_updateVigilSubscription](/reference/rpc/sigil_updateVigilSubscription) | Update a Vigils subscription. | | [sigil\_verifyArtifact](/reference/rpc/sigil_verifyArtifact) | Verify bytes against a Weave/Sigil artifact commitment. | | [sigil\_withdrawVigilGas](/reference/rpc/sigil_withdrawVigilGas) | Withdraw unused gas-tank funds. | | [tower\_getBlock](/reference/rpc/tower_getBlock) | Fetch a Tower coordination chain block by slot number or hash. | | [tower\_getCommittee](/reference/rpc/tower_getCommittee) | Fetch the committee assignment for a given slot. | | [tower\_getFinalityStatus](/reference/rpc/tower_getFinalityStatus) | Get the current finality status (latest justified/finalized epochs). | | [tower\_getSlot](/reference/rpc/tower_getSlot) | Fetch Tower slot information (committee, block producer, status). | | [tower\_getValidator](/reference/rpc/tower_getValidator) | Fetch a validator's full Tower registry record. | [Download canonical method catalog](/rpc-methods.json) · [Request binding index](/reference/rpc-bindings.json) # mars_discover URL: https://docs.sigil.ml/reference/rpc/mars_discover Markdown: https://docs.sigil.ml/reference/rpc/mars_discover.md Discover MARS entries matching a query. ## Method [#method] `mars_discover` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Discover MARS entries matching a query. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # mars_getEntry URL: https://docs.sigil.ml/reference/rpc/mars_getEntry Markdown: https://docs.sigil.ml/reference/rpc/mars_getEntry.md Fetch a MARS registry entry by DID. ## Method [#method] `mars_getEntry` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a MARS registry entry by DID. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_getAuctionStatus URL: https://docs.sigil.ml/reference/rpc/nova_getAuctionStatus Markdown: https://docs.sigil.ml/reference/rpc/nova_getAuctionStatus.md Get the current status of a Nova land auction. ## Method [#method] `nova_getAuctionStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the current status of a Nova land auction. ## Request binding [#request-binding] Source handler: `rpc_nova::handle_get_auction_status` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `147`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let auction_id = match extract_string_param(&req.params, 0, "auction_id") { Some(id) => id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'auction_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_getAvatar URL: https://docs.sigil.ml/reference/rpc/nova_getAvatar Markdown: https://docs.sigil.ml/reference/rpc/nova_getAvatar.md Fetch an avatar's current state (position, animation, presence). ## Method [#method] `nova_getAvatar` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an avatar's current state (position, animation, presence). ## Request binding [#request-binding] Source handler: `rpc_nova::handle_get_avatar` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `58`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let avatar_id = match extract_string_param(&req.params, 0, "avatar_id") { Some(id) => id, None => { let world_id = match extract_string_param(&req.params, 0, "world_id") { Some(id) => id, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'avatar_id' or world_id/owner_did parameters", ) } let world_id = match extract_string_param(&req.params, 0, "world_id") { Some(id) => id, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'avatar_id' or world_id/owner_did parameters", ) } }; let owner_did = match extract_string_param(&req.params, 1, "owner_did") { Some(id) => id, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'owner_did' parameter", ) } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_getBuilding URL: https://docs.sigil.ml/reference/rpc/nova_getBuilding Markdown: https://docs.sigil.ml/reference/rpc/nova_getBuilding.md Fetch a deployed building by ID. ## Method [#method] `nova_getBuilding` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a deployed building by ID. ## Request binding [#request-binding] Source handler: `rpc_nova::handle_get_building` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `36`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let building_id = match extract_string_param(&req.params, 0, "building_id") { Some(id) => id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'building_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_getParcel URL: https://docs.sigil.ml/reference/rpc/nova_getParcel Markdown: https://docs.sigil.ml/reference/rpc/nova_getParcel.md Fetch a Nova land parcel by ID or coordinates. ## Method [#method] `nova_getParcel` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a Nova land parcel by ID or coordinates. ## Request binding [#request-binding] Source handler: `rpc_nova::handle_get_parcel` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `7`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let parcel_id = match extract_string_param(&req.params, 0, "parcel_id") { Some(id) => id, None => match parcel_id_from_coords(&req.params) { Some(id) => id, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'parcel_id' or parcel coordinate parameters", ) } }, None => match parcel_id_from_coords(&req.params) { Some(id) => id, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'parcel_id' or parcel coordinate parameters", ) } }, }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_getWorldConfig URL: https://docs.sigil.ml/reference/rpc/nova_getWorldConfig Markdown: https://docs.sigil.ml/reference/rpc/nova_getWorldConfig.md Get the world configuration for a given world ID. ## Method [#method] `nova_getWorldConfig` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the world configuration for a given world ID. ## Request binding [#request-binding] Source handler: `rpc_nova::handle_get_world_config` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `100`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let world_id = match extract_string_param(&req.params, 0, "world_id") { Some(id) => id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'world_id' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # nova_listParcelsInRegion URL: https://docs.sigil.ml/reference/rpc/nova_listParcelsInRegion Markdown: https://docs.sigil.ml/reference/rpc/nova_listParcelsInRegion.md List all parcels within a Nova region. ## Method [#method] `nova_listParcelsInRegion` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all parcels within a Nova region. ## Request binding [#request-binding] Source handler: `rpc_nova::handle_list_parcels_in_region` in `sigil/node/sigil-node/src/rpc_nova.rs`, line `120`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let world_id = match extract_string_param(&req.params, 0, "world_id") { Some(id) => id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'world_id' parameter"), }; let region_x = match extract_i32_param(&req.params, 1, "region_x") { Some(v) => v, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'region_x' parameter"), }; let region_z = match extract_i32_param(&req.params, 2, "region_z") { Some(v) => v, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'region_z' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_callContractDryRun URL: https://docs.sigil.ml/reference/rpc/sigil_callContractDryRun Markdown: https://docs.sigil.ml/reference/rpc/sigil_callContractDryRun.md Perform a read-only contract call preflight. ## Method [#method] `sigil_callContractDryRun` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Perform a read-only contract call preflight. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_call_contract_dry_run` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `496`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_cancelVigilSubscription URL: https://docs.sigil.ml/reference/rpc/sigil_cancelVigilSubscription Markdown: https://docs.sigil.ml/reference/rpc/sigil_cancelVigilSubscription.md Cancel a Vigils subscription. ## Method [#method] `sigil_cancelVigilSubscription` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Cancel a Vigils subscription. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_depositVigilGas URL: https://docs.sigil.ml/reference/rpc/sigil_depositVigilGas Markdown: https://docs.sigil.ml/reference/rpc/sigil_depositVigilGas.md Deposit gas-tank funds for Vigils callbacks. ## Method [#method] `sigil_depositVigilGas` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Deposit gas-tank funds for Vigils callbacks. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_deregisterIngestor URL: https://docs.sigil.ml/reference/rpc/sigil_deregisterIngestor Markdown: https://docs.sigil.ml/reference/rpc/sigil_deregisterIngestor.md Deregister a Vigils ingestor. ## Method [#method] `sigil_deregisterIngestor` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Deregister a Vigils ingestor. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_estimateFee URL: https://docs.sigil.ml/reference/rpc/sigil_estimateFee Markdown: https://docs.sigil.ml/reference/rpc/sigil_estimateFee.md Estimate the deterministic fee for a transaction envelope. ## Method [#method] `sigil_estimateFee` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Estimate the deterministic fee for a transaction envelope. ## Request binding [#request-binding] Source handler: `rpc_server::handle_estimate_fee` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1407`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let payload = estimate_fee_payload(&req.params); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_estimateSponsoredSetupFee URL: https://docs.sigil.ml/reference/rpc/sigil_estimateSponsoredSetupFee Markdown: https://docs.sigil.ml/reference/rpc/sigil_estimateSponsoredSetupFee.md Estimate the deterministic fee for a setup-only sponsored transaction. ## Method [#method] `sigil_estimateSponsoredSetupFee` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Estimate the deterministic fee for a setup-only sponsored transaction. ## Request binding [#request-binding] Source handler: `rpc_server::handle_estimate_sponsored_setup_fee` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1457`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let payload = estimate_fee_payload(&req.params); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getAccount URL: https://docs.sigil.ml/reference/rpc/sigil_getAccount Markdown: https://docs.sigil.ml/reference/rpc/sigil_getAccount.md Fetch an explorer-ready account summary for a DID. ## Method [#method] `sigil_getAccount` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an explorer-ready account summary for a DID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_account` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1937`. The handler directly reads these named fields: `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("did").and_then(|v| v.as_str()) { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getAccountLaborHistory URL: https://docs.sigil.ml/reference/rpc/sigil_getAccountLaborHistory Markdown: https://docs.sigil.ml/reference/rpc/sigil_getAccountLaborHistory.md Fetch jobs, bids, contracts, and disputes tied to an account DID. ## Method [#method] `sigil_getAccountLaborHistory` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch jobs, bids, contracts, and disputes tied to an account DID. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_account_labor_history` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `175`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getAccountNonce URL: https://docs.sigil.ml/reference/rpc/sigil_getAccountNonce Markdown: https://docs.sigil.ml/reference/rpc/sigil_getAccountNonce.md Get the next nonce for an account (replay protection). ## Method [#method] `sigil_getAccountNonce` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the next nonce for an account (replay protection). ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_account_nonce` in `sigil/node/sigil-node/src/rpc_server.rs`, line `3183`. The handler directly reads these named fields: `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("did").and_then(|v| v.as_str())); ``` ## Read example [#read-example] did: account DID string. Returns the account nonce. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getAccountNonce", "params": { "did": "YOUR_ACCOUNT_DID" } } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getAccountTransactions URL: https://docs.sigil.ml/reference/rpc/sigil_getAccountTransactions Markdown: https://docs.sigil.ml/reference/rpc/sigil_getAccountTransactions.md List recent transactions for a DID. ## Method [#method] `sigil_getAccountTransactions` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List recent transactions for a DID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_account_transactions` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2804`. The handler directly reads these named fields: `did`, `limit`, `offset`, `page`, `page_size`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("did").and_then(|v| v.as_str()) { Some(did) => did, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; .or_else(|| req.params.get("page_size")) .and_then(|v| v.as_u64()) .unwrap_or(100) .clamp(1, 500) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getArtifactCommitment URL: https://docs.sigil.ml/reference/rpc/sigil_getArtifactCommitment Markdown: https://docs.sigil.ml/reference/rpc/sigil_getArtifactCommitment.md Normalize and validate an off-chain artifact commitment. ## Method [#method] `sigil_getArtifactCommitment` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Normalize and validate an off-chain artifact commitment. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_artifact_commitment` in `sigil/node/sigil-node/src/rpc_server.rs`, line `945`. The handler directly reads these named fields: `commitment`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .unwrap_or_else(|| req.params.clone()); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getBalance URL: https://docs.sigil.ml/reference/rpc/sigil_getBalance Markdown: https://docs.sigil.ml/reference/rpc/sigil_getBalance.md Fetch account balance and nonce for a DID. ## Method [#method] `sigil_getBalance` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch account balance and nonce for a DID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_balance` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1880`. The handler directly reads these named fields: `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("did").and_then(|v| v.as_str()) { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; ``` ## Read example [#read-example] did: account DID string. Returns balance and nonce; preserve integer precision. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getBalance", "params": { "did": "YOUR_ACCOUNT_DID" } } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getBlock URL: https://docs.sigil.ml/reference/rpc/sigil_getBlock Markdown: https://docs.sigil.ml/reference/rpc/sigil_getBlock.md Fetch a block by height or hash. ## Method [#method] `sigil_getBlock` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a block by height or hash. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_block` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2546`. The handler directly reads these named fields: `height`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let height = req.params.get("height").and_then(|v| v.as_u64()); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getBlockRange URL: https://docs.sigil.ml/reference/rpc/sigil_getBlockRange Markdown: https://docs.sigil.ml/reference/rpc/sigil_getBlockRange.md Read a stored block window; currently shares the latest-block handler. ## Method [#method] `sigil_getBlockRange` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Read a stored block window; currently shares the latest-block handler. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_latest_blocks` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2569`. The handler directly reads these named fields: `count`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getComputeAuditTrail URL: https://docs.sigil.ml/reference/rpc/sigil_getComputeAuditTrail Markdown: https://docs.sigil.ml/reference/rpc/sigil_getComputeAuditTrail.md Fetch compute audit events. ## Method [#method] `sigil_getComputeAuditTrail` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch compute audit events. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_compute_audit_trail` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `404`. The handler directly reads these named fields: `after_seq`, `aggregate`, `limit`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust after_seq: req.params.get("after_seq").and_then(Value::as_u64), limit: req .params .get("limit") .and_then(Value::as_u64) .map(|n| n.min(u32::MAX as u64) as u32), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getComputeChallenge URL: https://docs.sigil.ml/reference/rpc/sigil_getComputeChallenge Markdown: https://docs.sigil.ml/reference/rpc/sigil_getComputeChallenge.md Fetch a compute challenge by ID. ## Method [#method] `sigil_getComputeChallenge` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a compute challenge by ID. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_compute_challenge` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `345`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getComputeJob URL: https://docs.sigil.ml/reference/rpc/sigil_getComputeJob Markdown: https://docs.sigil.ml/reference/rpc/sigil_getComputeJob.md Fetch a compute job by ID. ## Method [#method] `sigil_getComputeJob` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a compute job by ID. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_compute_job` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `177`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getComputeProof URL: https://docs.sigil.ml/reference/rpc/sigil_getComputeProof Markdown: https://docs.sigil.ml/reference/rpc/sigil_getComputeProof.md Fetch proof metadata for a compute receipt. ## Method [#method] `sigil_getComputeProof` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch proof metadata for a compute receipt. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_compute_proof` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `251`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getComputeReceipt URL: https://docs.sigil.ml/reference/rpc/sigil_getComputeReceipt Markdown: https://docs.sigil.ml/reference/rpc/sigil_getComputeReceipt.md Fetch a settled compute receipt. ## Method [#method] `sigil_getComputeReceipt` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a settled compute receipt. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_compute_receipt` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `227`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getContract URL: https://docs.sigil.ml/reference/rpc/sigil_getContract Markdown: https://docs.sigil.ml/reference/rpc/sigil_getContract.md Fetch a deployed contract record by DID. ## Method [#method] `sigil_getContract` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a deployed contract record by DID. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_get_contract` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `226`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getContractEvents URL: https://docs.sigil.ml/reference/rpc/sigil_getContractEvents Markdown: https://docs.sigil.ml/reference/rpc/sigil_getContractEvents.md Fetch contract events with optional filters. ## Method [#method] `sigil_getContractEvents` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch contract events with optional filters. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_get_contract_events` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `277`. The handler directly reads these named fields: `contract_did`, `from_height`, `limit`, `to_height`, `topic`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust if let Some(d) = req.params.get("contract_did").and_then(Value::as_str) { q.contract_did = Some(d.to_string()); if let Some(t) = req.params.get("topic").and_then(Value::as_str) { q.topic = Some(t.to_string()); if let Some(h) = req.params.get("from_height").and_then(Value::as_u64) { q.from_height = Some(h); if let Some(h) = req.params.get("to_height").and_then(Value::as_u64) { q.to_height = Some(h); if let Some(l) = req.params.get("limit").and_then(Value::as_u64) { q.limit = Some(l as u32); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getContractState URL: https://docs.sigil.ml/reference/rpc/sigil_getContractState Markdown: https://docs.sigil.ml/reference/rpc/sigil_getContractState.md Fetch a single contract state value by key. ## Method [#method] `sigil_getContractState` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a single contract state value by key. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_get_contract_state` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `246`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getDelegations URL: https://docs.sigil.ml/reference/rpc/sigil_getDelegations Markdown: https://docs.sigil.ml/reference/rpc/sigil_getDelegations.md Fetch delegations for a delegator DID. ## Method [#method] `sigil_getDelegations` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch delegations for a delegator DID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_delegations` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1833`. The handler directly reads these named fields: `delegator`, `delegator_did`, `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match rpc_param_str(req, &["did", "delegator", "delegator_did"], 0) { Some(did) => did, None => { return RpcResponse::error( req.id.clone(), -32602, "missing 'did' or 'delegator' parameter", ) } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getDexEvents URL: https://docs.sigil.ml/reference/rpc/sigil_getDexEvents Markdown: https://docs.sigil.ml/reference/rpc/sigil_getDexEvents.md List recent native DEX events. ## Method [#method] `sigil_getDexEvents` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List recent native DEX events. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_get_dex_events` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `223`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let pool_id = extract_string_param(&req.params, 0, "pool_id"); let limit = extract_u64_param(&req.params, 1, "limit") .map(|n| (n as usize).min(MAX_LIMIT)) .unwrap_or(DEFAULT_LIMIT); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getDexPool URL: https://docs.sigil.ml/reference/rpc/sigil_getDexPool Markdown: https://docs.sigil.ml/reference/rpc/sigil_getDexPool.md Fetch a native DEX pool by deterministic pool id. ## Method [#method] `sigil_getDexPool` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a native DEX pool by deterministic pool id. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_get_dex_pool` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `80`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let pool_id = match extract_string_param(&req.params, 0, "pool_id") { Some(pool_id) => pool_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'pool_id' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getDexPosition URL: https://docs.sigil.ml/reference/rpc/sigil_getDexPosition Markdown: https://docs.sigil.ml/reference/rpc/sigil_getDexPosition.md Fetch one LP position. ## Method [#method] `sigil_getDexPosition` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one LP position. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_get_dex_position` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `182`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let pool_id = match extract_string_param(&req.params, 0, "pool_id") { Some(pool_id) => pool_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'pool_id' parameter"), }; let owner_did = match extract_string_param(&req.params, 1, "owner_did") { Some(owner_did) => owner_did, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'owner_did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getDidIdentityNft URL: https://docs.sigil.ml/reference/rpc/sigil_getDidIdentityNft Markdown: https://docs.sigil.ml/reference/rpc/sigil_getDidIdentityNft.md Fetch the DID-identity index for a subject DID. ## Method [#method] `sigil_getDidIdentityNft` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the DID-identity index for a subject DID. ## Request binding [#request-binding] Source handler: `rpc_nft::handle_get_did_identity_nft` in `sigil/node/sigil-node/src/rpc_nft.rs`, line `185`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let subject_did = match extract_string_param(&req.params, 0, "subject_did") { Some(s) => s, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'subject_did' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getEscrowBalance URL: https://docs.sigil.ml/reference/rpc/sigil_getEscrowBalance Markdown: https://docs.sigil.ml/reference/rpc/sigil_getEscrowBalance.md Fetch the escrow balance for an organization. ## Method [#method] `sigil_getEscrowBalance` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the escrow balance for an organization. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_escrow_balance` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `137`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getIdentity URL: https://docs.sigil.ml/reference/rpc/sigil_getIdentity Markdown: https://docs.sigil.ml/reference/rpc/sigil_getIdentity.md Fetch an OAS identity document by DID. ## Method [#method] `sigil_getIdentity` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an OAS identity document by DID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_identity` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2025`. The handler directly reads these named fields: `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("did").and_then(|v| v.as_str()) { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getIngestor URL: https://docs.sigil.ml/reference/rpc/sigil_getIngestor Markdown: https://docs.sigil.ml/reference/rpc/sigil_getIngestor.md Fetch a registered Vigils ingestor. ## Method [#method] `sigil_getIngestor` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a registered Vigils ingestor. ## Request binding [#request-binding] Source handler: `rpc_vigils::handle_get_ingestor` in `sigil/node/sigil-node/src/rpc_vigils.rs`, line `90`. The handler directly reads these named fields: `ingestor_did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("ingestor_did").and_then(Value::as_str) { Some(value) if !value.trim().is_empty() => value, _ => return RpcResponse::error(req.id.clone(), -32602, "missing 'ingestor_did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborBid URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborBid Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborBid.md Fetch a labor bid. ## Method [#method] `sigil_getLaborBid` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a labor bid. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_bid` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `61`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborClaim URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborClaim Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborClaim.md Fetch a bounty claim. ## Method [#method] `sigil_getLaborClaim` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a bounty claim. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_claim` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `278`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborContract URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborContract Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborContract.md Fetch a labor contract. ## Method [#method] `sigil_getLaborContract` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a labor contract. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_contract` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `112`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborDispute URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborDispute Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborDispute.md Fetch a labor dispute. ## Method [#method] `sigil_getLaborDispute` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a labor dispute. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_dispute` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `160`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborEscrow URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborEscrow Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborEscrow.md Fetch exact escrow accounting for a labor contract. ## Method [#method] `sigil_getLaborEscrow` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch exact escrow accounting for a labor contract. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_escrow` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `145`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborJob URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborJob Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborJob.md Fetch a labor job posting. ## Method [#method] `sigil_getLaborJob` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a labor job posting. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_job` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `29`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborMilestones URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborMilestones Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborMilestones.md List milestones for a labor contract. ## Method [#method] `sigil_getLaborMilestones` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List milestones for a labor contract. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_milestones` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `127`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborOffer URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborOffer Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborOffer.md Fetch an open bounty offer. ## Method [#method] `sigil_getLaborOffer` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an open bounty offer. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_offer` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `235`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLaborOfferEvents URL: https://docs.sigil.ml/reference/rpc/sigil_getLaborOfferEvents Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLaborOfferEvents.md Fetch labor offer/claim audit events. ## Method [#method] `sigil_getLaborOfferEvents` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch labor offer/claim audit events. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_get_labor_offer_events` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `309`. The handler directly reads these named fields: `fromHeight`, `from_height`, `toHeight`, `to_height`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("fromHeight")) .and_then(Value::as_u64) .unwrap_or(0); .or_else(|| req.params.get("toHeight")) .and_then(Value::as_u64) .unwrap_or(u64::MAX); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getLatestBlock URL: https://docs.sigil.ml/reference/rpc/sigil_getLatestBlock Markdown: https://docs.sigil.ml/reference/rpc/sigil_getLatestBlock.md Read a stored block window ending at the latest height. ## Method [#method] `sigil_getLatestBlock` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Read a stored block window ending at the latest height. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_latest_blocks` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2569`. The handler directly reads these named fields: `count`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ## Read example [#read-example] count: positive integer; defaults to 20, capped at 100. Returns blocks, latest\_height, and count. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getLatestBlock", "params": { "count": 1 } } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMacaEpoch URL: https://docs.sigil.ml/reference/rpc/sigil_getMacaEpoch Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMacaEpoch.md Fetch a MACA epoch by ID. ## Method [#method] `sigil_getMacaEpoch` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a MACA epoch by ID. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_maca_epoch` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `576`. The handler directly reads these named fields: `epoch_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let epoch_id = match req.params.get("epoch_id").and_then(Value::as_u64) { Some(v) => v, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'epoch_id' parameter"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMacaQuorumProof URL: https://docs.sigil.ml/reference/rpc/sigil_getMacaQuorumProof Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMacaQuorumProof.md Fetch a MACA quorum proof. ## Method [#method] `sigil_getMacaQuorumProof` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a MACA quorum proof. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_maca_quorum_proof` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `625`. The handler directly reads these named fields: `epoch_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let epoch_id = match req.params.get("epoch_id").and_then(Value::as_u64) { Some(v) => v, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'epoch_id' parameter"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMacaWorkClaim URL: https://docs.sigil.ml/reference/rpc/sigil_getMacaWorkClaim Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMacaWorkClaim.md Fetch a MACA work claim by work ID. ## Method [#method] `sigil_getMacaWorkClaim` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a MACA work claim by work ID. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_maca_work_claim` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `439`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailAbuseReport URL: https://docs.sigil.ml/reference/rpc/sigil_getMailAbuseReport Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailAbuseReport.md Fetch an abuse report. ## Method [#method] `sigil_getMailAbuseReport` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an abuse report. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mail_abuse_report` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `214`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let abuse_report_id = match extract_string_param(&req.params, 0, "abuse_report_id") { Some(v) => v, None => return missing(req, "abuse_report_id"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailDelegation URL: https://docs.sigil.ml/reference/rpc/sigil_getMailDelegation Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailDelegation.md Fetch a mailbox permission grant. ## Method [#method] `sigil_getMailDelegation` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a mailbox permission grant. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mail_delegation` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `168`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let grant_id = match extract_string_param(&req.params, 0, "grant_id") { Some(v) => v, None => return missing(req, "grant_id"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailDelivery URL: https://docs.sigil.ml/reference/rpc/sigil_getMailDelivery Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailDelivery.md Fetch a delivery commitment by ID. ## Method [#method] `sigil_getMailDelivery` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a delivery commitment by ID. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mail_delivery` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `90`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust match extract_string_param(&req.params, 0, "delivery_commitment_id") { Some(v) => v, None => return missing(req, "delivery_commitment_id"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailKeys URL: https://docs.sigil.ml/reference/rpc/sigil_getMailKeys Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailKeys.md List public mailbox keys, optionally filtered by purpose. ## Method [#method] `sigil_getMailKeys` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List public mailbox keys, optionally filtered by purpose. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mail_keys` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `70`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let mailbox_id = match extract_string_param(&req.params, 0, "mailbox_id") { Some(v) => v, None => return missing(req, "mailbox_id"), }; let purpose = extract_string_param(&req.params, 1, "purpose"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailPolicy URL: https://docs.sigil.ml/reference/rpc/sigil_getMailPolicy Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailPolicy.md Fetch the current or versioned mailbox receive policy. ## Method [#method] `sigil_getMailPolicy` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the current or versioned mailbox receive policy. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mail_policy` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `54`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let mailbox_id = match extract_string_param(&req.params, 0, "mailbox_id") { Some(v) => v, None => return missing(req, "mailbox_id"), }; let version = extract_u64_param(&req.params, 1, "version"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMailbox URL: https://docs.sigil.ml/reference/rpc/sigil_getMailbox Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMailbox.md Fetch a mailbox capability record. ## Method [#method] `sigil_getMailbox` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a mailbox capability record. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_mailbox` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `16`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let mailbox_id = match extract_string_param(&req.params, 0, "mailbox_id") { Some(v) => v, None => return missing(req, "mailbox_id"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getMempoolStatus URL: https://docs.sigil.ml/reference/rpc/sigil_getMempoolStatus Markdown: https://docs.sigil.ml/reference/rpc/sigil_getMempoolStatus.md Fetch local mempool size/capacity. ## Method [#method] `sigil_getMempoolStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch local mempool size/capacity. ## Request binding [#request-binding] Source handler: `rpc_server::handle_mempool_status` in `sigil/node/sigil-node/src/rpc_server.rs`, line `785`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNameRecords URL: https://docs.sigil.ml/reference/rpc/sigil_getNameRecords Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNameRecords.md Fetch resolver records for a `.sigil` name. ## Method [#method] `sigil_getNameRecords` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch resolver records for a `.sigil` name. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_get_name_records` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `248`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let name = match extract_string_param(&req.params, 0, "name") { Some(v) => v, None => return missing(req, "name"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNetworkActivationStatus URL: https://docs.sigil.ml/reference/rpc/sigil_getNetworkActivationStatus Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNetworkActivationStatus.md Fetch EOS-style boot, stake-collection, active, and stabilized status. ## Method [#method] `sigil_getNetworkActivationStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch EOS-style boot, stake-collection, active, and stabilized status. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_network_activation_status` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2297`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Read example [#read-example] No parameters. Returns the selected network activation state and gate evidence. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getNetworkActivationStatus", "params": {} } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNftCollection URL: https://docs.sigil.ml/reference/rpc/sigil_getNftCollection Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNftCollection.md Fetch an NFT collection by its collection ID. ## Method [#method] `sigil_getNftCollection` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an NFT collection by its collection ID. ## Request binding [#request-binding] Source handler: `rpc_nft::handle_get_nft_collection` in `sigil/node/sigil-node/src/rpc_nft.rs`, line `29`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let id_str = match extract_string_param(&req.params, 0, "collection_id") { Some(s) => s, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'collection_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNftEvents URL: https://docs.sigil.ml/reference/rpc/sigil_getNftEvents Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNftEvents.md List NFT lifecycle events with optional filters. ## Method [#method] `sigil_getNftEvents` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List NFT lifecycle events with optional filters. ## Request binding [#request-binding] Source handler: `rpc_nft::handle_get_nft_events` in `sigil/node/sigil-node/src/rpc_nft.rs`, line `222`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let filter: NftEventFilter = if req.params.is_null() || req.params == serde_json::Value::Null { NftEventFilter::default() } else { match serde_json::from_value(req.params.clone()) { Ok(f) => f, Err(e) => { return RpcResponse::error( req.id.clone(), -32602, format!("invalid filter params: {e}"), ) } match serde_json::from_value(req.params.clone()) { Ok(f) => f, Err(e) => { return RpcResponse::error( req.id.clone(), -32602, format!("invalid filter params: {e}"), ) } } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNftToken URL: https://docs.sigil.ml/reference/rpc/sigil_getNftToken Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNftToken.md Fetch a single NFT token within a collection. ## Method [#method] `sigil_getNftToken` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a single NFT token within a collection. ## Request binding [#request-binding] Source handler: `rpc_nft::handle_get_nft_token` in `sigil/node/sigil-node/src/rpc_nft.rs`, line `74`. The handler directly reads these named fields: `token_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let id_str = match extract_string_param(&req.params, 0, "collection_id") { Some(s) => s, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'collection_id' parameter") } }; .or_else(|| req.params.get(1)) .and_then(|v| v.as_str()) { Some(s) => s.to_string(), None => return RpcResponse::error(req.id.clone(), -32602, "missing 'token_id' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getNodeInfo URL: https://docs.sigil.ml/reference/rpc/sigil_getNodeInfo Markdown: https://docs.sigil.ml/reference/rpc/sigil_getNodeInfo.md Read chain_id, version, and protocol_version. ## Method [#method] `sigil_getNodeInfo` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Read chain\_id, version, and protocol\_version. ## Request binding [#request-binding] Source handler: `rpc_server::handle_node_info` in `sigil/node/sigil-node/src/rpc_server.rs`, line `687`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Read example [#read-example] No parameters. Returns chain\_id, version, and protocol\_version. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getNodeInfo", "params": {} } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getOwnerNfts URL: https://docs.sigil.ml/reference/rpc/sigil_getOwnerNfts Markdown: https://docs.sigil.ml/reference/rpc/sigil_getOwnerNfts.md List all NFTs (across collections) owned by a DID, with pagination. ## Method [#method] `sigil_getOwnerNfts` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all NFTs (across collections) owned by a DID, with pagination. ## Request binding [#request-binding] Source handler: `rpc_nft::handle_get_owner_nfts` in `sigil/node/sigil-node/src/rpc_nft.rs`, line `141`. The handler directly reads these named fields: `limit`, `offset`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let owner_did = match extract_string_param(&req.params, 0, "owner_did") { Some(s) => s, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'owner_did' parameter"), }; .or_else(|| req.params.get(1)) .and_then(|v| v.as_u64()) .map(|n| (n as usize).min(MAX_LIMIT)) .unwrap_or(DEFAULT_LIMIT); .or_else(|| req.params.get(2)) .and_then(|v| v.as_u64()) .map(|n| n as usize) .unwrap_or(0); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getPeers URL: https://docs.sigil.ml/reference/rpc/sigil_getPeers Markdown: https://docs.sigil.ml/reference/rpc/sigil_getPeers.md List connected peers. ## Method [#method] `sigil_getPeers` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List connected peers. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_peers` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1810`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getProposal URL: https://docs.sigil.ml/reference/rpc/sigil_getProposal Markdown: https://docs.sigil.ml/reference/rpc/sigil_getProposal.md Fetch a governance proposal by ID. ## Method [#method] `sigil_getProposal` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a governance proposal by ID. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_proposal` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2072`. The handler directly reads these named fields: `id`, `proposal_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("proposal_id")) .or_else(|| req.params.get(0)); .or_else(|| req.params.get(0)); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getProvider URL: https://docs.sigil.ml/reference/rpc/sigil_getProvider Markdown: https://docs.sigil.ml/reference/rpc/sigil_getProvider.md Fetch a compute provider's registration. ## Method [#method] `sigil_getProvider` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a compute provider's registration. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_provider` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `75`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getProviderReputation URL: https://docs.sigil.ml/reference/rpc/sigil_getProviderReputation Markdown: https://docs.sigil.ml/reference/rpc/sigil_getProviderReputation.md Fetch a compute provider's reputation score. ## Method [#method] `sigil_getProviderReputation` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a compute provider's reputation score. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_provider_reputation` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `108`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getSponsoredSetupPolicy URL: https://docs.sigil.ml/reference/rpc/sigil_getSponsoredSetupPolicy Markdown: https://docs.sigil.ml/reference/rpc/sigil_getSponsoredSetupPolicy.md Fetch the active setup-only sponsorship policy. ## Method [#method] `sigil_getSponsoredSetupPolicy` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the active setup-only sponsorship policy. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_sponsored_setup_policy` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1469`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getSponsoredSetupReceipt URL: https://docs.sigil.ml/reference/rpc/sigil_getSponsoredSetupReceipt Markdown: https://docs.sigil.ml/reference/rpc/sigil_getSponsoredSetupReceipt.md Fetch a sponsored setup receipt by transaction hash. ## Method [#method] `sigil_getSponsoredSetupReceipt` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a sponsored setup receipt by transaction hash. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_sponsored_setup_receipt` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2676`. The handler directly reads these named fields: `hash`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let hash = match req.params.get("hash").and_then(|v| v.as_str()) { Some(hash) => hash, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'hash' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getState URL: https://docs.sigil.ml/reference/rpc/sigil_getState Markdown: https://docs.sigil.ml/reference/rpc/sigil_getState.md Read a value from chain state. ## Method [#method] `sigil_getState` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Read a value from chain state. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_state` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1608`. The handler directly reads these named fields: `delegator`, `did`, `key`, `namespace`, `partition`, `validator`, `validator_did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let partition = match rpc_param_str(req, &["partition", "namespace"], 0) { Some(partition) => partition, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'partition' parameter"), }; let key = match rpc_param_str(req, &["key", "did"], 1) { Some(key) => key, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'key' parameter"), }; let delegator = rpc_param_str(req, &["delegator", "did"], 1).unwrap_or(key); let validator = rpc_param_str(req, &["validator", "validator_did"], 2) .or_else(|| key.split_once('|').map(|(_, v)| v)) .or_else(|| key.split_once('/').map(|(_, v)| v)); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStateRoot URL: https://docs.sigil.ml/reference/rpc/sigil_getStateRoot Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStateRoot.md Get the current state root hash. ## Method [#method] `sigil_getStateRoot` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the current state root hash. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_state_root` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1755`. The handler directly reads these named fields: `height`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let height = rpc_param_u64(req, &["height"], 0).unwrap_or(latest_height); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStorageChallenge URL: https://docs.sigil.ml/reference/rpc/sigil_getStorageChallenge Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStorageChallenge.md Fetch one storage challenge. ## Method [#method] `sigil_getStorageChallenge` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one storage challenge. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_get_storage_challenge` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `154`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let challenge_id = match extract_string_param(&req.params, 0, "challenge_id") { Some(challenge_id) => challenge_id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'challenge_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStoragePinContract URL: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinContract Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinContract.md Fetch one storage pin contract. ## Method [#method] `sigil_getStoragePinContract` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one storage pin contract. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_get_storage_pin_contract` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `86`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let contract_id = match extract_string_param(&req.params, 0, "contract_id") { Some(contract_id) => contract_id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'contract_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStoragePinReceipt URL: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinReceipt Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinReceipt.md Fetch one storage pin receipt. ## Method [#method] `sigil_getStoragePinReceipt` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one storage pin receipt. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_get_storage_pin_receipt` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `132`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let receipt_id = match extract_string_param(&req.params, 0, "receipt_id") { Some(receipt_id) => receipt_id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'receipt_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStoragePinRequest URL: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinRequest Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStoragePinRequest.md Fetch one storage pin request. ## Method [#method] `sigil_getStoragePinRequest` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one storage pin request. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_get_storage_pin_request` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `42`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let request_id = match extract_string_param(&req.params, 0, "request_id") { Some(request_id) => request_id, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'request_id' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStorageProvider URL: https://docs.sigil.ml/reference/rpc/sigil_getStorageProvider Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStorageProvider.md Fetch one storage pinning provider. ## Method [#method] `sigil_getStorageProvider` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch one storage pinning provider. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_get_storage_provider` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `20`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let provider_did = match extract_string_param(&req.params, 0, "provider_did") { Some(provider_did) => provider_did, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'provider_did' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getStorageStatus URL: https://docs.sigil.ml/reference/rpc/sigil_getStorageStatus Markdown: https://docs.sigil.ml/reference/rpc/sigil_getStorageStatus.md Get the node's production storage backend and migration status. ## Method [#method] `sigil_getStorageStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the node's production storage backend and migration status. ## Request binding [#request-binding] Source handler: `rpc_server::handle_storage_status` in `sigil/node/sigil-node/src/rpc_server.rs`, line `797`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getSyncStatus URL: https://docs.sigil.ml/reference/rpc/sigil_getSyncStatus Markdown: https://docs.sigil.ml/reference/rpc/sigil_getSyncStatus.md Get the current sync status. ## Method [#method] `sigil_getSyncStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the current sync status. ## Request binding [#request-binding] Source handler: `rpc_server::handle_sync_status` in `sigil/node/sigil-node/src/rpc_server.rs`, line `725`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Read example [#read-example] No parameters. Inspect the returned synchronization and peer-availability fields. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getSyncStatus", "params": {} } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTokenBalance URL: https://docs.sigil.ml/reference/rpc/sigil_getTokenBalance Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTokenBalance.md Fetch a launch-live custom token balance for one DID. ## Method [#method] `sigil_getTokenBalance` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a launch-live custom token balance for one DID. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_get_token_balance` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `288`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let token_id = match extract_string_param(&req.params, 0, "token_id") { Some(token_id) => token_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'token_id' parameter"), }; let owner_did = match extract_string_param(&req.params, 1, "owner_did") { Some(owner_did) => owner_did, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'owner_did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTokenClass URL: https://docs.sigil.ml/reference/rpc/sigil_getTokenClass Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTokenClass.md Fetch a launch-live custom token class. ## Method [#method] `sigil_getTokenClass` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a launch-live custom token class. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_get_token_class` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `268`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let token_id = match extract_string_param(&req.params, 0, "token_id") { Some(token_id) => token_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'token_id' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTopAccounts URL: https://docs.sigil.ml/reference/rpc/sigil_getTopAccounts Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTopAccounts.md List top accounts by balance/stake. ## Method [#method] `sigil_getTopAccounts` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List top accounts by balance/stake. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_top_accounts` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1982`. The handler directly reads these named fields: `limit`, `offset`, `page`, `page_size`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("page_size")) .and_then(|v| v.as_u64()) .unwrap_or(100) .clamp(1, 500) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingEvents URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingEvents Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingEvents.md List Crucible audit events. ## Method [#method] `sigil_getTrainingEvents` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List Crucible audit events. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_events` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `149`. The handler directly reads these named fields: `run_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let run_id = req.params.get("run_id").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingRewards URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRewards Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRewards.md List reward attestations for a training run. ## Method [#method] `sigil_getTrainingRewards` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List reward attestations for a training run. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_rewards` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `113`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingRolloutBatch URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRolloutBatch Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRolloutBatch.md Fetch a committed rollout batch for a training run. ## Method [#method] `sigil_getTrainingRolloutBatch` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a committed rollout batch for a training run. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_rollout_batch` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `51`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingRun URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRun Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingRun.md Fetch a Crucible training run. ## Method [#method] `sigil_getTrainingRun` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a Crucible training run. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_run` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `19`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingSlashes URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingSlashes Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingSlashes.md List slashing records for a training run. ## Method [#method] `sigil_getTrainingSlashes` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List slashing records for a training run. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_slashes` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `131`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTrainingWeights URL: https://docs.sigil.ml/reference/rpc/sigil_getTrainingWeights Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTrainingWeights.md Fetch or list published training weight anchors. ## Method [#method] `sigil_getTrainingWeights` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch or list published training weight anchors. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_get_training_weights` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `74`. The handler directly reads these named fields: `model_root`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust if let Some(model_root_hex) = req.params.get("model_root").and_then(Value::as_str) { let model_root = match SigilHash::from_hex(model_root_hex) { Ok(hash) => hash, Err(e) => { return RpcResponse::error( req.id.clone(), -32602, format!("invalid 'model_root': {e}"), ) } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTransaction URL: https://docs.sigil.ml/reference/rpc/sigil_getTransaction Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTransaction.md Fetch a transaction by hash. ## Method [#method] `sigil_getTransaction` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a transaction by hash. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2611`. The handler directly reads these named fields: `hash`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let hash = match req.params.get("hash").and_then(|v| v.as_str()) { Some(hash) => hash, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'hash' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTransactionReceipt URL: https://docs.sigil.ml/reference/rpc/sigil_getTransactionReceipt Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTransactionReceipt.md Fetch the receipt for a transaction. ## Method [#method] `sigil_getTransactionReceipt` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the receipt for a transaction. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_transaction_receipt` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2640`. The handler directly reads these named fields: `hash`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let hash = match req.params.get("hash").and_then(|v| v.as_str()) { Some(hash) => hash, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'hash' parameter"), }; ``` ## Read example [#read-example] hash: transaction hash string from the selected network. Returns status, receipt, block height, and transaction index. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getTransactionReceipt", "params": { "hash": "YOUR_TRANSACTION_HASH" } } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getTransactions URL: https://docs.sigil.ml/reference/rpc/sigil_getTransactions Markdown: https://docs.sigil.ml/reference/rpc/sigil_getTransactions.md List recent transactions. ## Method [#method] `sigil_getTransactions` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List recent transactions. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_transactions` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2732`. The handler directly reads these named fields: `limit`, `offset`, `page`, `page_size`, `type`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("page_size")) .and_then(|v| v.as_u64()) .unwrap_or(100) .clamp(1, 500) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getUsernameAuction URL: https://docs.sigil.ml/reference/rpc/sigil_getUsernameAuction Markdown: https://docs.sigil.ml/reference/rpc/sigil_getUsernameAuction.md Fetch a premium-name auction by canonical name. ## Method [#method] `sigil_getUsernameAuction` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a premium-name auction by canonical name. ## Request binding [#request-binding] Source handler: `rpc_username::handle_get_username_auction` in `sigil/node/sigil-node/src/rpc_username.rs`, line `163`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let name = match extract_string_param(&req.params, 0, "name") { Some(n) => n, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'name' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getValidator URL: https://docs.sigil.ml/reference/rpc/sigil_getValidator Markdown: https://docs.sigil.ml/reference/rpc/sigil_getValidator.md Fetch a single validator's info. ## Method [#method] `sigil_getValidator` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a single validator's info. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_validator` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2222`. The handler directly reads these named fields: `did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match req.params.get("did").and_then(|v| v.as_str()) { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getValidatorAgent URL: https://docs.sigil.ml/reference/rpc/sigil_getValidatorAgent Markdown: https://docs.sigil.ml/reference/rpc/sigil_getValidatorAgent.md Fetch a registered MACA validator agent. ## Method [#method] `sigil_getValidatorAgent` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a registered MACA validator agent. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_get_validator_agent` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `561`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getValidatorSet URL: https://docs.sigil.ml/reference/rpc/sigil_getValidatorSet Markdown: https://docs.sigil.ml/reference/rpc/sigil_getValidatorSet.md Fetch the current active validator set. ## Method [#method] `sigil_getValidatorSet` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the current active validator set. ## Request binding [#request-binding] Source handler: `rpc_server::handle_get_validator_set` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2260`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Read example [#read-example] No parameters. Returns validators and count. ```json { "jsonrpc": "2.0", "id": 1, "method": "sigil_getValidatorSet", "params": {} } ``` Named `YOUR_*` values must be replaced with identifiers from the selected chain. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getVigilDeliveryHistory URL: https://docs.sigil.ml/reference/rpc/sigil_getVigilDeliveryHistory Markdown: https://docs.sigil.ml/reference/rpc/sigil_getVigilDeliveryHistory.md Fetch a Vigils delivery-history page. ## Method [#method] `sigil_getVigilDeliveryHistory` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a Vigils delivery-history page. ## Request binding [#request-binding] Source handler: `rpc_vigils::handle_get_vigil_delivery_history` in `sigil/node/sigil-node/src/rpc_vigils.rs`, line `53`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getVigilSubscription URL: https://docs.sigil.ml/reference/rpc/sigil_getVigilSubscription Markdown: https://docs.sigil.ml/reference/rpc/sigil_getVigilSubscription.md Fetch a Vigils subscription by ID. ## Method [#method] `sigil_getVigilSubscription` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a Vigils subscription by ID. ## Request binding [#request-binding] Source handler: `rpc_vigils::handle_get_vigil_subscription` in `sigil/node/sigil-node/src/rpc_vigils.rs`, line `11`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_getZone URL: https://docs.sigil.ml/reference/rpc/sigil_getZone Markdown: https://docs.sigil.ml/reference/rpc/sigil_getZone.md Fetch an organization zone record. ## Method [#method] `sigil_getZone` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch an organization zone record. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_get_zone` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `336`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_height URL: https://docs.sigil.ml/reference/rpc/sigil_height Markdown: https://docs.sigil.ml/reference/rpc/sigil_height.md Lightweight probe for the local node's current block height. ## Method [#method] `sigil_height` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Lightweight probe for the local node's current block height. ## Request binding [#request-binding] Source handler: `rpc_server::handle_height` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1262`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listComputeChallenges URL: https://docs.sigil.ml/reference/rpc/sigil_listComputeChallenges Markdown: https://docs.sigil.ml/reference/rpc/sigil_listComputeChallenges.md List compute challenges for a receipt. ## Method [#method] `sigil_listComputeChallenges` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List compute challenges for a receipt. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_compute_challenges` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `364`. The handler directly reads these named fields: `by_receipt`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listComputeJobs URL: https://docs.sigil.ml/reference/rpc/sigil_listComputeJobs Markdown: https://docs.sigil.ml/reference/rpc/sigil_listComputeJobs.md List compute jobs with optional filters. ## Method [#method] `sigil_listComputeJobs` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List compute jobs with optional filters. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_compute_jobs` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `192`. The handler directly reads these named fields: `by_consumer`, `by_provider`, `status`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listDexPairs URL: https://docs.sigil.ml/reference/rpc/sigil_listDexPairs Markdown: https://docs.sigil.ml/reference/rpc/sigil_listDexPairs.md List distinct token pairs that currently have pools. ## Method [#method] `sigil_listDexPairs` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List distinct token pairs that currently have pools. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_list_dex_pairs` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `242`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listDexPools URL: https://docs.sigil.ml/reference/rpc/sigil_listDexPools Markdown: https://docs.sigil.ml/reference/rpc/sigil_listDexPools.md List native DEX pools. ## Method [#method] `sigil_listDexPools` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List native DEX pools. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_list_dex_pools` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `96`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listDexPositions URL: https://docs.sigil.ml/reference/rpc/sigil_listDexPositions Markdown: https://docs.sigil.ml/reference/rpc/sigil_listDexPositions.md List LP positions by owner and/or pool. ## Method [#method] `sigil_listDexPositions` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List LP positions by owner and/or pool. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_list_dex_positions` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `206`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let owner_did = extract_string_param(&req.params, 0, "owner_did"); let pool_id = extract_string_param(&req.params, 1, "pool_id"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listIdentities URL: https://docs.sigil.ml/reference/rpc/sigil_listIdentities Markdown: https://docs.sigil.ml/reference/rpc/sigil_listIdentities.md List registered OAS identities. ## Method [#method] `sigil_listIdentities` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List registered OAS identities. ## Request binding [#request-binding] Source handler: `rpc_server::handle_list_identities` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2170`. The handler directly reads these named fields: `limit`, `offset`, `page`, `page_size`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("page_size")) .and_then(|v| v.as_u64()) .unwrap_or(100) .clamp(1, 500) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listIngestors URL: https://docs.sigil.ml/reference/rpc/sigil_listIngestors Markdown: https://docs.sigil.ml/reference/rpc/sigil_listIngestors.md List registered Vigils ingestors. ## Method [#method] `sigil_listIngestors` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List registered Vigils ingestors. ## Request binding [#request-binding] Source handler: `rpc_vigils::handle_list_ingestors` in `sigil/node/sigil-node/src/rpc_vigils.rs`, line `76`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listLaborBids URL: https://docs.sigil.ml/reference/rpc/sigil_listLaborBids Markdown: https://docs.sigil.ml/reference/rpc/sigil_listLaborBids.md List labor bids, optionally for one job. ## Method [#method] `sigil_listLaborBids` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List labor bids, optionally for one job. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_list_labor_bids` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `76`. The handler directly reads these named fields: `job_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let job_id = req.params.get("job_id").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listLaborClaims URL: https://docs.sigil.ml/reference/rpc/sigil_listLaborClaims Markdown: https://docs.sigil.ml/reference/rpc/sigil_listLaborClaims.md List bounty claims. ## Method [#method] `sigil_listLaborClaims` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List bounty claims. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_list_labor_claims` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `293`. The handler directly reads these named fields: `claimant_did`, `offer_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let offer_id = req.params.get("offer_id").and_then(Value::as_str); let claimant_did = req.params.get("claimant_did").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listLaborJobs URL: https://docs.sigil.ml/reference/rpc/sigil_listLaborJobs Markdown: https://docs.sigil.ml/reference/rpc/sigil_listLaborJobs.md List labor job postings. ## Method [#method] `sigil_listLaborJobs` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List labor job postings. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_list_labor_jobs` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `44`. The handler directly reads these named fields: `status`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let status = req.params.get("status").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listLaborOffers URL: https://docs.sigil.ml/reference/rpc/sigil_listLaborOffers Markdown: https://docs.sigil.ml/reference/rpc/sigil_listLaborOffers.md List open bounty offers. ## Method [#method] `sigil_listLaborOffers` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List open bounty offers. ## Request binding [#request-binding] Source handler: `rpc_labor::handle_list_labor_offers` in `sigil/node/sigil-node/src/rpc_labor.rs`, line `250`. The handler directly reads these named fields: `status`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let status = req.params.get("status").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMacaEpochs URL: https://docs.sigil.ml/reference/rpc/sigil_listMacaEpochs Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMacaEpochs.md List MACA epochs. ## Method [#method] `sigil_listMacaEpochs` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List MACA epochs. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_maca_epochs` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `593`. The handler directly reads these named fields: `limit`, `state`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMacaQuorumProofs URL: https://docs.sigil.ml/reference/rpc/sigil_listMacaQuorumProofs Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMacaQuorumProofs.md List MACA quorum proofs for an epoch. ## Method [#method] `sigil_listMacaQuorumProofs` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List MACA quorum proofs for an epoch. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_maca_quorum_proofs` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `656`. The handler directly reads these named fields: `epoch_id`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let epoch_id = match req.params.get("epoch_id").and_then(Value::as_u64) { Some(v) => v, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'epoch_id' parameter"); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMacaValidationRecords URL: https://docs.sigil.ml/reference/rpc/sigil_listMacaValidationRecords Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMacaValidationRecords.md List MACA validation records by work ID. ## Method [#method] `sigil_listMacaValidationRecords` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List MACA validation records by work ID. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_maca_validation_records` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `460`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMailDelegations URL: https://docs.sigil.ml/reference/rpc/sigil_listMailDelegations Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMailDelegations.md List mailbox permission grants. ## Method [#method] `sigil_listMailDelegations` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List mailbox permission grants. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_list_mail_delegations` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `191`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let mailbox_id = match extract_string_param(&req.params, 0, "mailbox_id") { Some(v) => v, None => return missing(req, "mailbox_id"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMailDeliveriesByRecipient URL: https://docs.sigil.ml/reference/rpc/sigil_listMailDeliveriesByRecipient Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMailDeliveriesByRecipient.md List delivery commitments indexed by recipient mailbox. ## Method [#method] `sigil_listMailDeliveriesByRecipient` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List delivery commitments indexed by recipient mailbox. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_list_mail_deliveries_by_recipient` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `106`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let mailbox_id = match extract_string_param(&req.params, 0, "mailbox_id") { Some(v) => v, None => return missing(req, "mailbox_id"), }; let cursor = extract_string_param(&req.params, 1, "cursor"); let limit = capped_limit(&req.params); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMailDeliveriesBySender URL: https://docs.sigil.ml/reference/rpc/sigil_listMailDeliveriesBySender Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMailDeliveriesBySender.md List delivery commitments indexed by sender route. ## Method [#method] `sigil_listMailDeliveriesBySender` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List delivery commitments indexed by sender route. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_list_mail_deliveries_by_sender` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `137`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let sender_route_id = match extract_string_param(&req.params, 0, "sender_route_id") { Some(v) => v, None => return missing(req, "sender_route_id"), }; let cursor = extract_string_param(&req.params, 1, "cursor"); let limit = capped_limit(&req.params); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listMailboxesByOwner URL: https://docs.sigil.ml/reference/rpc/sigil_listMailboxesByOwner Markdown: https://docs.sigil.ml/reference/rpc/sigil_listMailboxesByOwner.md List mailboxes owned by a DID. ## Method [#method] `sigil_listMailboxesByOwner` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List mailboxes owned by a DID. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_list_mailboxes_by_owner` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `31`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let subject_did = match extract_string_param(&req.params, 0, "subject_did") { Some(v) => v, None => return missing(req, "subject_did"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listOpenUsernameAuctions URL: https://docs.sigil.ml/reference/rpc/sigil_listOpenUsernameAuctions Markdown: https://docs.sigil.ml/reference/rpc/sigil_listOpenUsernameAuctions.md List all open premium-name auctions. ## Method [#method] `sigil_listOpenUsernameAuctions` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all open premium-name auctions. ## Request binding [#request-binding] Source handler: `rpc_username::handle_list_open_auctions` in `sigil/node/sigil-node/src/rpc_username.rs`, line `194`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listProposals URL: https://docs.sigil.ml/reference/rpc/sigil_listProposals Markdown: https://docs.sigil.ml/reference/rpc/sigil_listProposals.md List all proposals (optionally filtered by status). ## Method [#method] `sigil_listProposals` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all proposals (optionally filtered by status). ## Request binding [#request-binding] Source handler: `rpc_server::handle_list_proposals` in `sigil/node/sigil-node/src/rpc_server.rs`, line `2110`. The handler directly reads these named fields: `limit`, `offset`, `page`, `page_size`, `status`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let status = match req.params.get("status").and_then(|v| v.as_str()) { Some(status) => match parse_proposal_status(status) { Some(status) => Some(status), None => { return RpcResponse::error( req.id.clone(), -32602, format!("invalid proposal status: {status}"), ) } }, None => None, .or_else(|| req.params.get("page_size")) .and_then(|v| v.as_u64()) .unwrap_or(100) .clamp(1, 500) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listProviders URL: https://docs.sigil.ml/reference/rpc/sigil_listProviders Markdown: https://docs.sigil.ml/reference/rpc/sigil_listProviders.md List all registered compute providers. ## Method [#method] `sigil_listProviders` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all registered compute providers. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_list_providers` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `91`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listStoragePinContractsByProvider URL: https://docs.sigil.ml/reference/rpc/sigil_listStoragePinContractsByProvider Markdown: https://docs.sigil.ml/reference/rpc/sigil_listStoragePinContractsByProvider.md List storage pin contracts for a provider DID. ## Method [#method] `sigil_listStoragePinContractsByProvider` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List storage pin contracts for a provider DID. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_list_storage_pin_contracts_by_provider` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `108`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let provider_did = match extract_string_param(&req.params, 0, "provider_did") { Some(provider_did) => provider_did, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'provider_did' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listStoragePinRequestsByOwner URL: https://docs.sigil.ml/reference/rpc/sigil_listStoragePinRequestsByOwner Markdown: https://docs.sigil.ml/reference/rpc/sigil_listStoragePinRequestsByOwner.md List storage pin requests for an owner DID. ## Method [#method] `sigil_listStoragePinRequestsByOwner` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List storage pin requests for an owner DID. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_list_storage_pin_requests_by_owner` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `64`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let owner_did = match extract_string_param(&req.params, 0, "owner_did") { Some(owner_did) => owner_did, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'owner_did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listStorageProviders URL: https://docs.sigil.ml/reference/rpc/sigil_listStorageProviders Markdown: https://docs.sigil.ml/reference/rpc/sigil_listStorageProviders.md List registered storage pinning providers. ## Method [#method] `sigil_listStorageProviders` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List registered storage pinning providers. ## Request binding [#request-binding] Source handler: `rpc_storage_market::handle_list_storage_providers` in `sigil/node/sigil-node/src/rpc_storage_market.rs`, line `5`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listTrainingRuns URL: https://docs.sigil.ml/reference/rpc/sigil_listTrainingRuns Markdown: https://docs.sigil.ml/reference/rpc/sigil_listTrainingRuns.md List Crucible training runs. ## Method [#method] `sigil_listTrainingRuns` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List Crucible training runs. ## Request binding [#request-binding] Source handler: `rpc_crucible::handle_list_training_runs` in `sigil/node/sigil-node/src/rpc_crucible.rs`, line `34`. The handler directly reads these named fields: `status`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let status = req.params.get("status").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listUsernames URL: https://docs.sigil.ml/reference/rpc/sigil_listUsernames Markdown: https://docs.sigil.ml/reference/rpc/sigil_listUsernames.md List all usernames owned by a DID. ## Method [#method] `sigil_listUsernames` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List all usernames owned by a DID. ## Request binding [#request-binding] Source handler: `rpc_username::handle_list_usernames` in `sigil/node/sigil-node/src/rpc_username.rs`, line `83`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let owner = match extract_string_param(&req.params, 0, "owner_did") { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'owner_did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listVigilSubscriptions URL: https://docs.sigil.ml/reference/rpc/sigil_listVigilSubscriptions Markdown: https://docs.sigil.ml/reference/rpc/sigil_listVigilSubscriptions.md List Vigils subscriptions with pagination. ## Method [#method] `sigil_listVigilSubscriptions` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List Vigils subscriptions with pagination. ## Request binding [#request-binding] Source handler: `rpc_vigils::handle_list_vigil_subscriptions` in `sigil/node/sigil-node/src/rpc_vigils.rs`, line `33`. The handler directly reads these named fields: `subscriber_did`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let subscriber = req.params.get("subscriber_did").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_listZoneContracts URL: https://docs.sigil.ml/reference/rpc/sigil_listZoneContracts Markdown: https://docs.sigil.ml/reference/rpc/sigil_listZoneContracts.md List deployed contracts in an organization zone. ## Method [#method] `sigil_listZoneContracts` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. List deployed contracts in an organization zone. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_list_zone_contracts` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `311`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_lookupUsername URL: https://docs.sigil.ml/reference/rpc/sigil_lookupUsername Markdown: https://docs.sigil.ml/reference/rpc/sigil_lookupUsername.md Look up a DID's primary `@username` (reverse-lookup). ## Method [#method] `sigil_lookupUsername` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Look up a DID's primary `@username` (reverse-lookup). ## Request binding [#request-binding] Source handler: `rpc_username::handle_lookup_username` in `sigil/node/sigil-node/src/rpc_username.rs`, line `57`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let did = match extract_string_param(&req.params, 0, "did") { Some(d) => d, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'did' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_quoteDexSwapExactIn URL: https://docs.sigil.ml/reference/rpc/sigil_quoteDexSwapExactIn Markdown: https://docs.sigil.ml/reference/rpc/sigil_quoteDexSwapExactIn.md Quote an exact-input swap. ## Method [#method] `sigil_quoteDexSwapExactIn` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Quote an exact-input swap. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_quote_dex_swap_exact_in` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `111`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let pool_id = match extract_string_param(&req.params, 0, "pool_id") { Some(pool_id) => pool_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'pool_id' parameter"), }; let asset_in = match extract_string_param(&req.params, 1, "asset_in") { Some(asset_in) => asset_in, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'asset_in' parameter"), }; let amount_in = match extract_u64_param(&req.params, 2, "amount_in") { Some(amount_in) => amount_in, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'amount_in' parameter"), }; let min_amount_out = extract_u64_param(&req.params, 3, "min_amount_out").unwrap_or(1); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_quoteDexSwapExactOut URL: https://docs.sigil.ml/reference/rpc/sigil_quoteDexSwapExactOut Markdown: https://docs.sigil.ml/reference/rpc/sigil_quoteDexSwapExactOut.md Quote an exact-output swap. ## Method [#method] `sigil_quoteDexSwapExactOut` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Quote an exact-output swap. ## Request binding [#request-binding] Source handler: `rpc_dex::handle_quote_dex_swap_exact_out` in `sigil/node/sigil-node/src/rpc_dex.rs`, line `143`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let pool_id = match extract_string_param(&req.params, 0, "pool_id") { Some(pool_id) => pool_id, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'pool_id' parameter"), }; let asset_out = match extract_string_param(&req.params, 1, "asset_out") { Some(asset_out) => asset_out, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'asset_out' parameter"), }; let amount_out = match extract_u64_param(&req.params, 2, "amount_out") { Some(amount_out) => amount_out, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'amount_out' parameter") } }; let max_amount_in = match extract_u64_param(&req.params, 3, "max_amount_in") { Some(max_amount_in) => max_amount_in, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'max_amount_in' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_registerContractCode URL: https://docs.sigil.ml/reference/rpc/sigil_registerContractCode Markdown: https://docs.sigil.ml/reference/rpc/sigil_registerContractCode.md Submit a signed `RegisterContractCode` transaction through the typed public deployment endpoint. ## Method [#method] `sigil_registerContractCode` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Submit a signed `RegisterContractCode` transaction through the typed public deployment endpoint. ## Request binding [#request-binding] Source handler: `rpc_contract::handle_register_contract_code` in `sigil/node/sigil-node/src/rpc_contract.rs`, line `123`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_registerIngestor URL: https://docs.sigil.ml/reference/rpc/sigil_registerIngestor Markdown: https://docs.sigil.ml/reference/rpc/sigil_registerIngestor.md Register a staked Vigils ingestor. ## Method [#method] `sigil_registerIngestor` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Register a staked Vigils ingestor. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_registerVigilSubscription URL: https://docs.sigil.ml/reference/rpc/sigil_registerVigilSubscription Markdown: https://docs.sigil.ml/reference/rpc/sigil_registerVigilSubscription.md Register a Vigils subscription. ## Method [#method] `sigil_registerVigilSubscription` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Register a Vigils subscription. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_resolveMail URL: https://docs.sigil.ml/reference/rpc/sigil_resolveMail Markdown: https://docs.sigil.ml/reference/rpc/sigil_resolveMail.md Resolve a `.sigil` route or mailbox ID into mail delivery metadata. ## Method [#method] `sigil_resolveMail` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Resolve a `.sigil` route or mailbox ID into mail delivery metadata. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_resolve_mail` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `267`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let route_or_name = match extract_string_param(&req.params, 0, "route_or_name") .or_else(|| extract_string_param(&req.params, 0, "name")) { Some(v) => v, None => return missing(req, "route_or_name"), }; .or_else(|| extract_string_param(&req.params, 0, "name")) { Some(v) => v, None => return missing(req, "route_or_name"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_resolveName URL: https://docs.sigil.ml/reference/rpc/sigil_resolveName Markdown: https://docs.sigil.ml/reference/rpc/sigil_resolveName.md Resolve a `.sigil` name and all resolver records. ## Method [#method] `sigil_resolveName` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Resolve a `.sigil` name and all resolver records. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_resolve_name` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `233`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let name = match extract_string_param(&req.params, 0, "name") { Some(v) => v, None => return missing(req, "name"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_resolveUsername URL: https://docs.sigil.ml/reference/rpc/sigil_resolveUsername Markdown: https://docs.sigil.ml/reference/rpc/sigil_resolveUsername.md Resolve a canonical `@username` to its on-chain record. ## Method [#method] `sigil_resolveUsername` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Resolve a canonical `@username` to its on-chain record. ## Request binding [#request-binding] Source handler: `rpc_username::handle_resolve_username` in `sigil/node/sigil-node/src/rpc_username.rs`, line `22`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let name = match extract_string_param(&req.params, 0, "name") { Some(n) => n, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'name' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_resolveWebsite URL: https://docs.sigil.ml/reference/rpc/sigil_resolveWebsite Markdown: https://docs.sigil.ml/reference/rpc/sigil_resolveWebsite.md Resolve website/content records for a `.sigil` name. ## Method [#method] `sigil_resolveWebsite` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Resolve website/content records for a `.sigil` name. ## Request binding [#request-binding] Source handler: `rpc_mail::handle_resolve_website` in `sigil/node/sigil-node/src/rpc_mail.rs`, line `284`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let name = match extract_string_param(&req.params, 0, "name") { Some(v) => v, None => return missing(req, "name"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_searchUsername URL: https://docs.sigil.ml/reference/rpc/sigil_searchUsername Markdown: https://docs.sigil.ml/reference/rpc/sigil_searchUsername.md Search usernames by ASCII prefix, with limit. ## Method [#method] `sigil_searchUsername` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Search usernames by ASCII prefix, with limit. ## Request binding [#request-binding] Source handler: `rpc_username::handle_search_username` in `sigil/node/sigil-node/src/rpc_username.rs`, line `110`. The handler directly reads these named fields: `limit`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let prefix = match extract_string_param(&req.params, 0, "prefix") { Some(p) => p, None => return RpcResponse::error(req.id.clone(), -32602, "missing 'prefix' parameter"), }; .or_else(|| req.params.get(1).and_then(|v| v.as_u64())) .unwrap_or(DEFAULT_SEARCH_LIMIT as u64) as usize; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_selectComputeProvider URL: https://docs.sigil.ml/reference/rpc/sigil_selectComputeProvider Markdown: https://docs.sigil.ml/reference/rpc/sigil_selectComputeProvider.md Deterministically select a compute provider. ## Method [#method] `sigil_selectComputeProvider` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Deterministically select a compute provider. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_select_compute_provider` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `495`. The handler directly reads these named fields: `model_id`, `verification_tier`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let model_id = req.params.get("model_id").and_then(Value::as_str); let tier = req.params.get("verification_tier").and_then(Value::as_str); ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_sendSponsoredSetupTransaction URL: https://docs.sigil.ml/reference/rpc/sigil_sendSponsoredSetupTransaction Markdown: https://docs.sigil.ml/reference/rpc/sigil_sendSponsoredSetupTransaction.md Submit a signed setup-only sponsored transaction. ## Method [#method] `sigil_sendSponsoredSetupTransaction` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Submit a signed setup-only sponsored transaction. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_sponsored_setup_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1500`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_sendTransaction URL: https://docs.sigil.ml/reference/rpc/sigil_sendTransaction Markdown: https://docs.sigil.ml/reference/rpc/sigil_sendTransaction.md Submit a signed transaction. ## Method [#method] `sigil_sendTransaction` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Submit a signed transaction. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_slashIngestor URL: https://docs.sigil.ml/reference/rpc/sigil_slashIngestor Markdown: https://docs.sigil.ml/reference/rpc/sigil_slashIngestor.md Slash a Vigils ingestor with deterministic evidence. ## Method [#method] `sigil_slashIngestor` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Slash a Vigils ingestor with deterministic evidence. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_submitEventDelivery URL: https://docs.sigil.ml/reference/rpc/sigil_submitEventDelivery Markdown: https://docs.sigil.ml/reference/rpc/sigil_submitEventDelivery.md Submit a verified event delivery for a subscription. ## Method [#method] `sigil_submitEventDelivery` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Submit a verified event delivery for a subscription. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_updateIngestorStake URL: https://docs.sigil.ml/reference/rpc/sigil_updateIngestorStake Markdown: https://docs.sigil.ml/reference/rpc/sigil_updateIngestorStake.md Update a staked Vigils ingestor. ## Method [#method] `sigil_updateIngestorStake` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Update a staked Vigils ingestor. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_updateVigilSubscription URL: https://docs.sigil.ml/reference/rpc/sigil_updateVigilSubscription Markdown: https://docs.sigil.ml/reference/rpc/sigil_updateVigilSubscription.md Update a Vigils subscription. ## Method [#method] `sigil_updateVigilSubscription` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Update a Vigils subscription. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_verifyArtifact URL: https://docs.sigil.ml/reference/rpc/sigil_verifyArtifact Markdown: https://docs.sigil.ml/reference/rpc/sigil_verifyArtifact.md Verify bytes against a Weave/Sigil artifact commitment. ## Method [#method] `sigil_verifyArtifact` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Verify bytes against a Weave/Sigil artifact commitment. ## Request binding [#request-binding] Source handler: `rpc_server::handle_verify_artifact` in `sigil/node/sigil-node/src/rpc_server.rs`, line `971`. The handler directly reads these named fields: `bytes_hex`, `commitment`, `payload_hex`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let commitment_value = match req.params.get("commitment").cloned() { Some(value) => value, None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'commitment' parameter") } }; .or_else(|| req.params.get("payload_hex")) .and_then(|v| v.as_str()) { Some(value) => value.strip_prefix("0x").unwrap_or(value), None => return RpcResponse::error(req.id.clone(), -32602, "missing 'bytes_hex' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_verifyLumenAttestation URL: https://docs.sigil.ml/reference/rpc/sigil_verifyLumenAttestation Markdown: https://docs.sigil.ml/reference/rpc/sigil_verifyLumenAttestation.md Verify a Lumen inference attestation transcript. ## Method [#method] `sigil_verifyLumenAttestation` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Verify a Lumen inference attestation transcript. ## Request binding [#request-binding] Source handler: `rpc_compute::handle_verify_lumen_attestation` in `sigil/node/sigil-node/src/rpc_compute.rs`, line `291`. The handler directly reads these named fields: `attestation`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let value = match req.params.get("attestation") { Some(value) => value.clone(), None => { return RpcResponse::error(req.id.clone(), -32602, "missing 'attestation' parameter") } }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_weftFetch URL: https://docs.sigil.ml/reference/rpc/sigil_weftFetch Markdown: https://docs.sigil.ml/reference/rpc/sigil_weftFetch.md Fetch a verified Weft payload as hex bytes. ## Method [#method] `sigil_weftFetch` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a verified Weft payload as hex bytes. ## Request binding [#request-binding] Source handler: `rpc_server::handle_weft_fetch` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1177`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let root = match parse_weft_root(&req.params) { Ok(root) => root, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_weftFetchFile URL: https://docs.sigil.ml/reference/rpc/sigil_weftFetchFile Markdown: https://docs.sigil.ml/reference/rpc/sigil_weftFetchFile.md Fetch a verified Weft payload and write it to a local file. ## Method [#method] `sigil_weftFetchFile` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a verified Weft payload and write it to a local file. ## Request binding [#request-binding] Source handler: `rpc_server::handle_weft_fetch_file` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1204`. The handler directly reads these named fields: `file_path`, `path`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust let root = match parse_weft_root(&req.params) { Ok(root) => root, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; .or_else(|| req.params.get("file_path")) .and_then(|v| v.as_str()) { Some(value) if !value.trim().is_empty() => value, _ => return RpcResponse::error(req.id.clone(), -32602, "missing 'path' parameter"), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_weftPublish URL: https://docs.sigil.ml/reference/rpc/sigil_weftPublish Markdown: https://docs.sigil.ml/reference/rpc/sigil_weftPublish.md Publish a hex-encoded payload into the local Weft store. ## Method [#method] `sigil_weftPublish` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Publish a hex-encoded payload into the local Weft store. ## Request binding [#request-binding] Source handler: `rpc_server::handle_weft_publish` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1090`. The handler directly reads these named fields: `bytes_hex`, `payload_hex`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("payload_hex")) .and_then(|v| v.as_str()) { Some(value) => value.strip_prefix("0x").unwrap_or(value), None => return RpcResponse::error(req.id.clone(), -32602, "missing 'bytes_hex' parameter"), }; let metadata = match parse_weft_metadata(&req.params) { Ok(metadata) => metadata, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; let chunk_size = match parse_weft_chunk_size(&req.params) { Ok(chunk_size) => chunk_size, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_weftPublishFile URL: https://docs.sigil.ml/reference/rpc/sigil_weftPublishFile Markdown: https://docs.sigil.ml/reference/rpc/sigil_weftPublishFile.md Publish a local file into the local Weft store. ## Method [#method] `sigil_weftPublishFile` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Publish a local file into the local Weft store. ## Request binding [#request-binding] Source handler: `rpc_server::handle_weft_publish_file` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1133`. The handler directly reads these named fields: `file_path`, `path`. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality. ### Parsing excerpt [#parsing-excerpt] These source excerpts show binding and validation; they are not runnable client code. ```rust .or_else(|| req.params.get("file_path")) .and_then(|v| v.as_str()) { Some(value) if !value.trim().is_empty() => value, _ => return RpcResponse::error(req.id.clone(), -32602, "missing 'path' parameter"), }; let metadata = match parse_weft_metadata(&req.params) { Ok(metadata) => metadata, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; let chunk_size = match parse_weft_chunk_size(&req.params) { Ok(chunk_size) => chunk_size, Err(e) => return RpcResponse::error(req.id.clone(), -32602, e), }; ``` ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_weftStatus URL: https://docs.sigil.ml/reference/rpc/sigil_weftStatus Markdown: https://docs.sigil.ml/reference/rpc/sigil_weftStatus.md Inspect local Weft serving status. ## Method [#method] `sigil_weftStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Inspect local Weft serving status. ## Request binding [#request-binding] Source handler: `rpc_server::handle_weft_status` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1250`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # sigil_withdrawVigilGas URL: https://docs.sigil.ml/reference/rpc/sigil_withdrawVigilGas Markdown: https://docs.sigil.ml/reference/rpc/sigil_withdrawVigilGas.md Withdraw unused gas-tank funds. ## Method [#method] `sigil_withdrawVigilGas` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Withdraw unused gas-tank funds. ## Request binding [#request-binding] Source handler: `rpc_server::handle_send_transaction` in `sigil/node/sigil-node/src/rpc_server.rs`, line `1492`. The handler uses no directly named `params.get` fields, or delegates input parsing to a typed helper. Use the request types below rather than assuming an empty parameter object. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # tower_getBlock URL: https://docs.sigil.ml/reference/rpc/tower_getBlock Markdown: https://docs.sigil.ml/reference/rpc/tower_getBlock.md Fetch a Tower coordination chain block by slot number or hash. ## Method [#method] `tower_getBlock` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a Tower coordination chain block by slot number or hash. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # tower_getCommittee URL: https://docs.sigil.ml/reference/rpc/tower_getCommittee Markdown: https://docs.sigil.ml/reference/rpc/tower_getCommittee.md Fetch the committee assignment for a given slot. ## Method [#method] `tower_getCommittee` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch the committee assignment for a given slot. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # tower_getFinalityStatus URL: https://docs.sigil.ml/reference/rpc/tower_getFinalityStatus Markdown: https://docs.sigil.ml/reference/rpc/tower_getFinalityStatus.md Get the current finality status (latest justified/finalized epochs). ## Method [#method] `tower_getFinalityStatus` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Get the current finality status (latest justified/finalized epochs). ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # tower_getSlot URL: https://docs.sigil.ml/reference/rpc/tower_getSlot Markdown: https://docs.sigil.ml/reference/rpc/tower_getSlot.md Fetch Tower slot information (committee, block producer, status). ## Method [#method] `tower_getSlot` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch Tower slot information (committee, block producer, status). ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # tower_getValidator URL: https://docs.sigil.ml/reference/rpc/tower_getValidator Markdown: https://docs.sigil.ml/reference/rpc/tower_getValidator.md Fetch a validator's full Tower registry record. ## Method [#method] `tower_getValidator` is registered in the canonical JSON-RPC catalog. Use `POST /rpc`, `Content-Type: application/json`, JSON-RPC `2.0` and a caller-controlled request `id`. Node RPC profile, build feature and runtime activation checks still apply. Fetch a validator's full Tower registry record. ## Feature and dispatch boundary [#feature-and-dispatch-boundary] This method exists in the shared method catalog. Its handler is outside the primary dispatch mapping or unavailable in this source profile. Treat catalog membership separately from current endpoint support; an unknown-method or feature-gate error is a failure, not a successful empty result. ## Responses and failures [#responses-and-failures] Check HTTP status, parse the JSON-RPC envelope, reject `error`, and require `result` on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements. * [Typed RPC declarations](/reference/rust/sigil-rpc) * [Requests and response envelopes](/reference/rust/sigil-rpc/types) * [Network-aware read client](/build/quickstart) * [Runtime feature and activation guide](/build/spec/protocol) # arise-identity · attestation URL: https://docs.sigil.ml/reference/rust/arise-identity/attestation Markdown: https://docs.sigil.ml/reference/rust/arise-identity/attestation.md Source declarations, signatures and documentation for attestation. Source: `sigil/node/../arise-bridge/arise-identity/src/attestation.rs`. SHA-256: `47d369b60fc92368eeebfbd3fd7a28608cb6a99b6eccccb81f85705834fb7da4`. 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. ## attestation::HardwareBenchmarkVC [#attestationhardwarebenchmarkvc] A Verifiable Credential attesting to hardware benchmark results. Ties measured compute performance to a provider's OAS DID. The VC includes the attestation method (self-reported, third-party, or TEE) and has a bounded validity window. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HardwareBenchmarkVC { /// Fixed: `"HardwareBenchmark"`. pub vc_type: String, /// The DID of the entity that issued/performed the benchmark. pub issuer_did: String, /// The provider DID whose hardware was benchmarked. pub subject_did: String, /// The measured benchmark results. pub benchmark_data: BenchmarkResults, /// How the attestation was obtained (e.g., `"ThirdPartyAudit"`). pub attestation_method: String, /// ISO 8601 timestamp when the VC was issued. pub issued_at: String, /// ISO 8601 timestamp when the VC expires. pub expires_at: String } ``` Source line: `20`. ## attestation::PlatformAttestationVC [#attestationplatformattestationvc] A Verifiable Credential for TEE-based platform attestation. Represents a hardware-backed attestation from a Trusted Execution Environment (SGX, TDX, SEV-SNP). The `report_hash` is a BLAKE3 hash of the raw platform report data. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PlatformAttestationVC { /// Fixed: `"PlatformAttestation"`. pub vc_type: String, /// The DID of the entity that verified the platform attestation. pub issuer_did: String, /// The provider DID whose platform was attested. pub subject_did: String, /// The TEE platform type (e.g., `"sgx"`, `"tdx"`, `"sev-snp"`). pub platform: String, /// BLAKE3 hash of the raw platform attestation report (hex-encoded). pub report_hash: String, /// ISO 8601 timestamp when the VC was issued. pub issued_at: String } ``` Source line: `43`. ## attestation::create\_hardware\_benchmark\_vc [#attestationcreate_hardware_benchmark_vc] Creates a hardware benchmark Verifiable Credential. The VC is issued at the current UTC time and expires after 90 days. # Arguments [#arguments] * `provider_did` - The OAS DID of the compute provider being benchmarked. * `benchmarks` - The measured benchmark results. * `attestation_type` - The method used to produce the benchmark. # Returns [#returns] A \[`HardwareBenchmarkVC`] with the current timestamp and a 90-day validity window. ```rust pub fn create_hardware_benchmark_vc( provider_did: &str, benchmarks: &BenchmarkResults, attestation_type: &HardwareAttestationType, ) -> HardwareBenchmarkVC; ``` Source line: `71`. ## attestation::create\_platform\_attestation\_vc [#attestationcreate_platform_attestation_vc] Creates a platform attestation Verifiable Credential from TEE report data. The report data is hashed with BLAKE3 to produce a compact, verifiable fingerprint stored in the VC. # Arguments [#arguments-1] * `provider_did` - The OAS DID of the compute provider. * `platform` - The TEE platform identifier (`"sgx"`, `"tdx"`, `"sev-snp"`). * `report_data` - The raw platform attestation report bytes. # Returns [#returns-1] A \[`PlatformAttestationVC`] with the BLAKE3 hash of the report data. ```rust pub fn create_platform_attestation_vc( provider_did: &str, platform: &str, report_data: &[u8], ) -> PlatformAttestationVC; ``` Source line: `110`. # arise-identity · consumer URL: https://docs.sigil.ml/reference/rust/arise-identity/consumer Markdown: https://docs.sigil.ml/reference/rust/arise-identity/consumer.md 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 [#consumerconsumeridentity] 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. ```rust #[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, /// Optional maximum spend in micro-MINT. pub budget_limit: Option } ``` Source line: `19`. ## consumer::ConsumerIdentity::new [#consumerconsumeridentitynew] Creates a new consumer identity. # Arguments [#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 [#errors] Returns \[`IdentityError::InvalidDid`] if either DID is not a valid `did:oas` identifier. Returns \[`IdentityError::MissingHumanRoot`] if `human_root_did` is empty. ```rust pub fn new(did: &str, human_root_did: &str, generation: u32) -> Result; ``` Source line: `45`. ## consumer::ConsumerIdentity::with\_org [#consumerconsumeridentitywith_org] Sets the organization DID that this consumer is acting on behalf of. # Arguments [#arguments-1] * `org_did` - An OAS DID for the organization (typically `did:oas::ao:`). # Errors [#errors-1] Returns \[`IdentityError::InvalidDid`] if the org DID is not a valid `did:oas` identifier. ```rust pub fn with_org(mut self, org_did: &str) -> Result; ``` Source line: `76`. ## consumer::ConsumerIdentity::with\_budget [#consumerconsumeridentitywith_budget] Sets the maximum spend budget in micro-MINT. # Arguments [#arguments-2] * `limit` - Maximum spend in micro-MINT (1 MINT = 1,000,000 micro-MINT). ```rust pub fn with_budget(mut self, limit: u64) -> Self; ``` Source line: `89`. # arise-identity · crate URL: https://docs.sigil.ml/reference/rust/arise-identity/crate Markdown: https://docs.sigil.ml/reference/rust/arise-identity/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../arise-bridge/arise-identity/src/lib.rs`. SHA-256: `d9ee36d93678a92af9198c9a46c051189ae6ff9aac25232634cd8d8079075821`. 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. ## attestation [#attestation] ```rust pub mod attestation; ``` Source line: `77`. ## consumer [#consumer] ```rust pub mod consumer; ``` Source line: `78`. ## error [#error] ```rust pub mod error; ``` Source line: `79`. ## provider [#provider] ```rust pub mod provider; ``` Source line: `80`. ## pub use error::IdentityError; [#pub-use-erroridentityerror] ```rust pub use error::IdentityError; ``` Source line: `82`. # arise-identity · error URL: https://docs.sigil.ml/reference/rust/arise-identity/error Markdown: https://docs.sigil.ml/reference/rust/arise-identity/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/../arise-bridge/arise-identity/src/error.rs`. SHA-256: `205ed9c41113b8fd7d9a8934a9434919eea2e9676eac3c89d3dbcdac7d465849`. 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. ## error::IdentityError [#erroridentityerror] Errors that can occur during ARISE identity operations. ```rust #[derive(Debug, Error)] pub enum IdentityError { /// The provided DID string is not a valid `did:oas` identifier. #[error("invalid DID: {0}")] InvalidDid(String), /// The identity is missing a required human root DID. #[error("missing human root DID for entity: {0}")] MissingHumanRoot(String), /// A hardware attestation has expired. #[error("attestation expired for DID {did} at {expired_at}")] AttestationExpired { /// The provider DID whose attestation expired. did: String, /// The ISO 8601 timestamp when the attestation expired. expired_at: String, }, /// The provider does not meet minimum capability requirements. #[error("insufficient capabilities: {0}")] InsufficientCapabilities(String), /// The attestation data is structurally invalid or unverifiable. #[error("invalid attestation: {0}")] InvalidAttestation(String), /// An underlying OAS DID parsing error. #[error("DID parse error: {0}")] DidParse(#[from] oas_did::DidError), } ``` Source line: `10`. # arise-identity URL: https://docs.sigil.ml/reference/rust/arise-identity Markdown: https://docs.sigil.ml/reference/rust/arise-identity.md OAS identity bridge for ARISE compute providers and consumers OAS identity bridge for ARISE compute providers and consumers | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `arise-identity` | | Manifest version | `0.1.0` | | Source | `sigil/node/../arise-bridge/arise-identity/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `arise_identity` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] arise-identity = { path = "../arise-identity" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/arise-identity/crate) — 5 declarations * [attestation](/reference/rust/arise-identity/attestation) — 4 declarations * [consumer](/reference/rust/arise-identity/consumer) — 4 declarations * [error](/reference/rust/arise-identity/error) — 1 declarations * [provider](/reference/rust/arise-identity/provider) — 11 declarations # arise-identity · provider URL: https://docs.sigil.ml/reference/rust/arise-identity/provider Markdown: https://docs.sigil.ml/reference/rust/arise-identity/provider.md Source declarations, signatures and documentation for provider. Source: `sigil/node/../arise-bridge/arise-identity/src/provider.rs`. SHA-256: `5848afff7538e41556ecd34419ae5277f17eec021dd62d277d0ca91f8beef5f8`. 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. ## provider::ProviderIdentity [#providerprovideridentity] A compute provider's identity derived from service declarations. Links an ARISE compute provider to an OAS DID with hardware attestations and capability declarations. The `human_root_did` field establishes provenance back to a verified human root per the OAS lineage model. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProviderIdentity { /// The provider's OAS DID (e.g., `did:oas:arise:service:gpu-provider-01`). 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, /// Human-readable provider name. pub provider_name: String, /// Declared hardware and software capabilities. pub capabilities: ProviderCapabilities, /// Ordered list of hardware attestations (most recent last). pub hardware_attestations: Vec, /// ISO 8601 timestamp when this identity was created. pub created_at: String } ``` Source line: `20`. ## provider::ProviderCapabilities [#providerprovidercapabilities] Hardware and software capabilities declared by a compute provider. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProviderCapabilities { /// GPU model identifiers (e.g., `["A100", "H100"]`). pub gpu_models: Vec, /// Total number of GPUs available. pub gpu_count: u32, /// Total GPU memory in gigabytes. pub gpu_memory_gb: u32, /// Number of CPU cores available. pub cpu_cores: u32, /// Total RAM in gigabytes. pub ram_gb: u32, /// Total storage in terabytes. pub storage_tb: f64, /// Supported ML frameworks (e.g., `["pytorch", "tensorflow"]`). pub supported_frameworks: Vec, /// Maximum number of concurrent jobs the provider can handle. pub max_concurrent_jobs: u32 } ``` Source line: `39`. ## provider::HardwareAttestation [#providerhardwareattestation] A hardware attestation certifying a provider's declared capabilities. Attestations have a validity window defined by `attested_at` and `expires_at`. They may be self-reported, third-party audited, or TEE-based. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HardwareAttestation { /// The method used to produce this attestation. pub attestation_type: HardwareAttestationType, /// Benchmark results collected during attestation. pub benchmark_results: BenchmarkResults, /// ISO 8601 timestamp when the attestation was performed. pub attested_at: String, /// ISO 8601 timestamp when the attestation expires. pub expires_at: String, /// Cryptographic signature over the attestation payload. pub signature: Vec } ``` Source line: `63`. ## provider::HardwareAttestationType [#providerhardwareattestationtype] The method used to produce a hardware attestation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum HardwareAttestationType { /// Provider self-reported capability declaration. SelfReported, /// Verified by a third-party auditing entity. ThirdPartyAudit, /// Hardware-backed attestation from a Trusted Execution Environment (SGX/TDX/SEV-SNP). TeeAttestation, } ``` Source line: `78`. ## provider::BenchmarkResults [#providerbenchmarkresults] Benchmark results from a hardware attestation run. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BenchmarkResults { /// GPU compute performance in teraflops. pub gpu_tflops: f64, /// GPU memory bandwidth in GB/s. pub gpu_memory_bandwidth_gbps: f64, /// Inference latency in milliseconds for a standard workload. pub inference_latency_ms: f64, /// Token generation throughput (tokens per second). pub tokens_per_second: f64 } ``` Source line: `89`. ## provider::ProviderIdentity::new [#providerprovideridentitynew] Creates a new provider identity. # Arguments [#arguments] * `did` - The provider's OAS DID string. * `human_root_did` - The human root DID for lineage provenance. * `generation` - The generation number in the lineage chain. * `provider_name` - Human-readable name for the provider. * `capabilities` - The provider's hardware/software capabilities. # Errors [#errors] Returns \[`IdentityError::InvalidDid`] if the DID is not a valid `did:oas` identifier. Returns \[`IdentityError::MissingHumanRoot`] if `human_root_did` is empty. ```rust pub fn new( did: &str, human_root_did: &str, generation: u32, provider_name: &str, capabilities: ProviderCapabilities, ) -> Result; ``` Source line: `115`. ## provider::ProviderIdentity::add\_hardware\_attestation [#providerprovideridentityadd_hardware_attestation] Adds a hardware attestation to this provider identity. Attestations are appended in order; the most recent attestation is always the last element. ```rust pub fn add_hardware_attestation(&mut self, attestation: HardwareAttestation); ``` Source line: `151`. ## provider::ProviderIdentity::latest\_attestation [#providerprovideridentitylatest_attestation] Returns the most recent hardware attestation, if any. ```rust pub fn latest_attestation(&self) -> Option<&HardwareAttestation>; ``` Source line: `161`. ## provider::ProviderIdentity::is\_attestation\_current [#providerprovideridentityis_attestation_current] Checks whether the provider has a current (non-expired) attestation. # Arguments [#arguments-1] * `now` - The current time as an ISO 8601 string for comparison. # Returns [#returns] `true` if the latest attestation exists and its `expires_at` is strictly after `now`. ```rust pub fn is_attestation_current(&self, now: &str) -> bool; ``` Source line: `175`. ## provider::ProviderCapabilities::meets\_minimum [#providerprovidercapabilitiesmeets_minimum] Checks whether the provider meets minimum capability requirements. Minimum requirements: * At least 1 GPU * At least 16 GB of GPU memory # Returns [#returns-1] `true` if the provider meets baseline requirements for ARISE compute. ```rust pub fn meets_minimum(&self) -> bool; ``` Source line: `192`. ## provider::HardwareAttestationType::as\_str [#providerhardwareattestationtypeas_str] Returns the canonical string representation of this attestation type. ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `199`. # arise-sigil · challenge URL: https://docs.sigil.ml/reference/rust/arise-sigil/challenge Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/challenge.md Source declarations, signatures and documentation for challenge. Source: `sigil/node/../arise-bridge/arise-sigil/src/challenge.rs`. SHA-256: `789d87374b6d2f626e4a30f7cf6eec2c969fca147a14ccf079cfe71e41d20ac4`. 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. ## challenge::ChallengeOutcome [#challengechallengeoutcome] The outcome of a resolved challenge. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum ChallengeOutcome { /// Challenger wins: 40% to challenger, 30% to arbitrators, 30% to treasury. ChallengerWins, /// Provider wins: 50% to provider from challenger deposit, 50% returned. ProviderWins, } ``` Source line: `19`. ## challenge::ChallengeState [#challengechallengestate] States in the challenge lifecycle. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ChallengeState { /// Challenge has been submitted, waiting for reproduction window. Submitted, /// Provider has 1 epoch to respond with reproduction evidence. ReproductionWindow, /// Three arbitrator providers are voting. Arbitration, /// Challenge has been resolved with a final outcome. Resolved(ChallengeOutcome), } ``` Source line: `28`. ## challenge::REQUIRED\_ARBITRATORS [#challengerequired_arbitrators] The number of arbitrators required for a challenge. ```rust pub const REQUIRED_ARBITRATORS: usize; ``` Source line: `40`. ## challenge::REPRODUCTION\_WINDOW\_EPOCHS [#challengereproduction_window_epochs] The number of epochs for the reproduction window. ```rust pub const REPRODUCTION_WINDOW_EPOCHS: u64; ``` Source line: `43`. ## challenge::ARBITRATION\_WINDOW\_EPOCHS [#challengearbitration_window_epochs] The number of epochs for arbitration after the reproduction window. ```rust pub const ARBITRATION_WINDOW_EPOCHS: u64; ``` Source line: `46`. ## challenge::Challenge [#challengechallenge] A dispute against a compute receipt. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Challenge { /// Unique challenge identifier. pub challenge_id: String, /// DID of the entity that raised the challenge. pub challenger_did: String, /// DID of the provider being challenged. pub provider_did: String, /// Receipt being disputed. pub receipt_id: String, /// Current state in the challenge lifecycle. pub state: ChallengeState, /// Epoch when the challenge was submitted. pub submitted_epoch: u64, /// Hash of the evidence submitted by the challenger. pub evidence_hash: SigilHash, /// DIDs of the three selected arbitrators. pub arbitrator_dids: Vec, /// Votes cast by arbitrators: `(did, agrees_with_challenger)`. pub arbitrator_votes: Vec<(String, bool)> } ``` Source line: `50`. ## challenge::Challenge::new [#challengechallengenew] Creates a new challenge in the `Submitted` state. ```rust pub fn new( challenge_id: String, challenger_did: String, provider_did: String, receipt_id: String, submitted_epoch: u64, evidence_hash: SigilHash, ) -> Self; ``` Source line: `73`. ## challenge::Challenge::advance [#challengechallengeadvance] Advance the challenge state machine based on the current epoch. * `Submitted` -> `ReproductionWindow` (immediately). * `ReproductionWindow` -> `Arbitration` (after 1 epoch). * `Arbitration` does not auto-advance; use \[`resolve`] once votes are in. ```rust pub fn advance(&mut self, current_epoch: u64) -> Result<(), AriseError>; ``` Source line: `99`. ## challenge::Challenge::add\_arbitrator [#challengechallengeadd_arbitrator] Adds an arbitrator to the challenge. Must be called before transitioning to `Arbitration`. ```rust pub fn add_arbitrator(&mut self, did: String) -> Result<(), AriseError>; ``` Source line: `134`. ## challenge::Challenge::add\_arbitrator\_vote [#challengechallengeadd_arbitrator_vote] Records an arbitrator's vote. `agrees` is `true` if the arbitrator agrees with the challenger. ```rust pub fn add_arbitrator_vote(&mut self, did: &str, agrees: bool) -> Result<(), AriseError>; ``` Source line: `152`. ## challenge::Challenge::resolve [#challengechallengeresolve] Resolves the challenge once all arbitrators have voted. Majority vote determines the outcome. ```rust pub fn resolve(&mut self) -> Result; ``` Source line: `175`. # arise-sigil · crate URL: https://docs.sigil.ml/reference/rust/arise-sigil/crate Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../arise-bridge/arise-sigil/src/lib.rs`. SHA-256: `bc40c916078a199489fe48ca021d264dc488222f5553b13f92cfe6e9aa5b6ea7`. 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. ## challenge [#challenge] ```rust pub mod challenge; ``` Source line: `24`. ## error [#error] ```rust pub mod error; ``` Source line: `25`. ## escrow [#escrow] ```rust pub mod escrow; ``` Source line: `26`. ## provider [#provider] ```rust pub mod provider; ``` Source line: `27`. ## receipt [#receipt] ```rust pub mod receipt; ``` Source line: `28`. ## reputation [#reputation] ```rust pub mod reputation; ``` Source line: `29`. ## settlement [#settlement] ```rust pub mod settlement; ``` Source line: `30`. ## pub use challenge::\{Challenge, ChallengeOutcome, ChallengeState}; [#pub-use-challengechallenge-challengeoutcome-challengestate] ```rust pub use challenge::{Challenge, ChallengeOutcome, ChallengeState}; ``` Source line: `32`. ## pub use error::AriseError; [#pub-use-errorariseerror] ```rust pub use error::AriseError; ``` Source line: `33`. ## pub use escrow::\{EscrowAccount, EscrowOp, EscrowOperation}; [#pub-use-escrowescrowaccount-escrowop-escrowoperation] ```rust pub use escrow::{EscrowAccount, EscrowOp, EscrowOperation}; ``` Source line: `34`. ## pub use provider::\{ComputePricing, ProviderRegistration, ProviderStatus, ProviderTier}; [#pub-use-providercomputepricing-providerregistration-providerstatus-providertier] ```rust pub use provider::{ComputePricing, ProviderRegistration, ProviderStatus, ProviderTier}; ``` Source line: `35`. ## pub use receipt::ComputeReceipt; [#pub-use-receiptcomputereceipt] ```rust pub use receipt::ComputeReceipt; ``` Source line: `36`. ## pub use reputation::ReputationSignals; [#pub-use-reputationreputationsignals] ```rust pub use reputation::ReputationSignals; ``` Source line: `37`. ## pub use settlement::\{create\_settlement, SettlementAction}; [#pub-use-settlementcreate_settlement-settlementaction] ```rust pub use settlement::{create_settlement, SettlementAction}; ``` Source line: `38`. # arise-sigil · error URL: https://docs.sigil.ml/reference/rust/arise-sigil/error Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/../arise-bridge/arise-sigil/src/error.rs`. SHA-256: `bfd98b2e1b0f202b53df05ff1b5e6a8d39495d9cb5df8c6f9a82b9cfc6462e93`. 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. ## error::AriseError [#errorariseerror] Errors that can occur during ARISE marketplace operations. ```rust #[derive(Debug, Error)] pub enum AriseError { /// The referenced provider DID was not found. #[error("provider not found: {0}")] ProviderNotFound(String), /// The provider's stake is below the required minimum. #[error( "insufficient stake: required {required} micro-MINT, available {available} micro-MINT" )] InsufficientStake { /// The minimum stake required. required: u64, /// The stake amount available. available: u64, }, /// The compute receipt is structurally invalid or fails verification. #[error("invalid receipt: {0}")] InvalidReceipt(String), /// The referenced challenge was not found. #[error("challenge not found: {0}")] ChallengeNotFound(String), /// The attempted state transition is not valid for the current challenge state. #[error("invalid challenge transition: {0}")] InvalidChallengeTransition(String), /// An error occurred during escrow operations. #[error("escrow error: {0}")] EscrowError(String), /// An error occurred during on-chain settlement. #[error("settlement error: {0}")] SettlementError(String), /// The caller is not authorized for the requested operation. #[error("not authorized: {0}")] NotAuthorized(String), } ``` Source line: `7`. # arise-sigil · escrow URL: https://docs.sigil.ml/reference/rust/arise-sigil/escrow Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/escrow.md Source declarations, signatures and documentation for escrow. Source: `sigil/node/../arise-bridge/arise-sigil/src/escrow.rs`. SHA-256: `68a229eef4dfed78169ae693c122f24c21c7bf98c5d6710f540135ccc6cc3b4a`. 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. ## escrow::EscrowOperation [#escrowescrowoperation] A single escrow operation submitted by a consumer. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct EscrowOperation { /// DID of the consumer initiating the operation. pub consumer_did: String, /// Optional org DID if the consumer acts on behalf of an organization. pub org_did: Option, /// The escrow operation to execute. pub operation: EscrowOp } ``` Source line: `13`. ## escrow::EscrowOp [#escrowescrowop] The set of operations that can be performed on an escrow account. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub enum EscrowOp { /// Deposit tokens into the consumer's escrow account. Fund { /// Amount in micro-MINT to deposit. amount: u64, }, /// Reserve tokens for a specific job (locks funds for the provider). Reserve { /// Unique identifier for the compute job. job_id: String, /// Amount in micro-MINT to reserve. amount: u64, /// DID of the provider to whom the reservation is directed. provider_did: String, }, /// Settle a completed job, debiting the actual cost from the reservation. Settle { /// The job being settled. job_id: String, /// DID of the provider submitting the settlement. provider_did: String, /// Actual cost incurred in micro-MINT. actual_cost: u64, }, /// Refund the full reserved amount for a cancelled or failed job. Refund { /// The job whose reservation should be refunded. job_id: String, }, /// Withdraw available (unreserved) tokens from the escrow account. Withdraw { /// Amount in micro-MINT to withdraw. amount: u64, }, } ``` Source line: `24`. ## escrow::EscrowAccount [#escrowescrowaccount] In-memory escrow account for tracking balances during validation. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct EscrowAccount { /// DID of the account owner. pub consumer_did: String, /// Total deposited balance in micro-MINT. pub total_balance: u64, /// Amount currently reserved for pending jobs. pub reserved_balance: u64, /// Per-job reservations. Settlement/refund must address exactly one job. pub reservations: HashMap } ``` Source line: `62`. ## escrow::EscrowReservation [#escrowescrowreservation] Funds reserved for one compute job. ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct EscrowReservation { /// Amount reserved in micro-MINT. pub amount: u64, /// Provider DID named when the reservation was created. pub provider_did: String } ``` Source line: `75`. ## escrow::EscrowAccount::new [#escrowescrowaccountnew] Creates a new escrow account with zero balance. ```rust pub fn new(consumer_did: String) -> Self; ``` Source line: `84`. ## escrow::EscrowAccount::available\_balance [#escrowescrowaccountavailable_balance] Returns the available (unreserved) balance. ```rust pub fn available_balance(&self) -> u64; ``` Source line: `94`. ## escrow::EscrowAccount::apply [#escrowescrowaccountapply] Applies an escrow operation, returning an error if the operation cannot be performed (e.g. insufficient funds). ```rust pub fn apply(&mut self, op: &EscrowOp) -> Result<(), AriseError>; ``` Source line: `100`. ## escrow::EscrowAccount::settle\_as\_provider [#escrowescrowaccountsettle_as_provider] Settles a reservation only when the caller is the provider recorded when funds were reserved for the job. ```rust pub fn settle_as_provider( &mut self, provider_did: &str, job_id: &str, actual_cost: u64, ) -> Result<(), AriseError>; ``` Source line: `195`. # arise-sigil URL: https://docs.sigil.ml/reference/rust/arise-sigil Markdown: https://docs.sigil.ml/reference/rust/arise-sigil.md On-chain compute marketplace bridge — provider registration, escrow, settlement On-chain compute marketplace bridge — provider registration, escrow, settlement | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `arise-sigil` | | Manifest version | `0.1.0` | | Source | `sigil/node/../arise-bridge/arise-sigil/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `arise_sigil` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] arise-sigil = { path = "../arise-sigil" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/arise-sigil/crate) — 14 declarations * [challenge](/reference/rust/arise-sigil/challenge) — 11 declarations * [error](/reference/rust/arise-sigil/error) — 1 declarations * [escrow](/reference/rust/arise-sigil/escrow) — 8 declarations * [provider](/reference/rust/arise-sigil/provider) — 8 declarations * [receipt](/reference/rust/arise-sigil/receipt) — 5 declarations * [reputation](/reference/rust/arise-sigil/reputation) — 3 declarations * [settlement](/reference/rust/arise-sigil/settlement) — 2 declarations # arise-sigil · provider URL: https://docs.sigil.ml/reference/rust/arise-sigil/provider Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/provider.md Source declarations, signatures and documentation for provider. Source: `sigil/node/../arise-bridge/arise-sigil/src/provider.rs`. SHA-256: `f49ce4bb5c3f10cc2b67bb17da9d520a9f877d8eeeaf6d8765b7ffbbd90ed744`. 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. ## provider::ProviderTier [#providerprovidertier] Provider stake tiers. The tier determines the minimum SIGIL stake required and the maximum workload capacity the provider can serve. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum ProviderTier { /// Entry tier: 500 MINT minimum stake. Consumer, /// Mid tier: 2,000 MINT minimum stake. Professional, /// High tier: 5,000 MINT minimum stake. Enterprise, /// Top tier: 10,000 MINT minimum stake. Cluster, } ``` Source line: `14`. ## provider::ProviderTier::min\_stake [#providerprovidertiermin_stake] Returns the minimum stake in micro-MINT for this tier. 1 MINT = 1,000,000 micro-MINT. ```rust pub fn min_stake(&self) -> u64; ``` Source line: `29`. ## provider::ProviderTier::from\_stake [#providerprovidertierfrom_stake] Returns the highest tier achievable for the given stake amount (in micro-MINT). ```rust pub fn from_stake(stake: u64) -> Self; ``` Source line: `40`. ## provider::ProviderStatus [#providerproviderstatus] Current status of a registered provider. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum ProviderStatus { /// Provider is active and accepting jobs. Active, /// Provider is temporarily suspended (e.g. lost challenge). Suspended, /// Provider initiated exit; in unbonding period. Exiting, /// Provider has fully exited and stake is returned. Exited, } ``` Source line: `55`. ## provider::ComputePricing [#providercomputepricing] Pricing model for a compute provider. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ComputePricing { /// Price per input token in micro-MINT. pub price_per_input_token: u64, /// Price per output token in micro-MINT. pub price_per_output_token: u64, /// Price per GPU-second in micro-MINT. pub price_per_gpu_second: u64, /// Minimum charge for any job in micro-MINT. pub min_job_cost: u64 } ``` Source line: `68`. ## provider::ProviderRegistration [#providerproviderregistration] On-chain registration record for a compute provider. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProviderRegistration { /// The DID of the provider (`did:oas:...`). pub provider_did: String, /// The human root DID that owns this provider. pub human_root_did: String, /// Tier derived from the staked amount. pub tier: ProviderTier, /// Staked amount in micro-MINT. pub stake: u64, /// Hardware capabilities (GPU type, memory, etc.). pub capabilities: serde_json::Value, /// Pricing model published by the provider. pub pricing: ComputePricing, /// Epoch at which the provider registered. pub registered_epoch: u64, /// Current operational status. pub status: ProviderStatus } ``` Source line: `81`. ## provider::ProviderRegistration::is\_active [#providerproviderregistrationis_active] Returns `true` if the provider is eligible to accept new jobs. ```rust pub fn is_active(&self) -> bool; ``` Source line: `102`. ## provider::ProviderRegistration::stake\_is\_sufficient [#providerproviderregistrationstake_is_sufficient] Returns `true` if the stake satisfies the minimum for the claimed tier. ```rust pub fn stake_is_sufficient(&self) -> bool; ``` Source line: `107`. # arise-sigil · receipt URL: https://docs.sigil.ml/reference/rust/arise-sigil/receipt Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/receipt.md Source declarations, signatures and documentation for receipt. Source: `sigil/node/../arise-bridge/arise-sigil/src/receipt.rs`. SHA-256: `903ce5f1b151c7a017d192ad4417d275471639ad9a2c7287edcc824937c953cc`. 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. ## receipt::ComputeReceipt [#receiptcomputereceipt] A compute receipt recording the execution of a single job. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ComputeReceipt { /// Unique receipt identifier. pub receipt_id: String, /// The job this receipt corresponds to. pub job_id: String, /// DID of the provider that executed the job. pub provider_did: String, /// DID of the consumer that requested the job. pub consumer_did: String, /// Model identifier used for inference. pub model_id: String, /// Number of input tokens processed. pub tokens_in: u64, /// Number of output tokens generated. pub tokens_out: u64, /// GPU-seconds consumed. pub gpu_seconds: f64, /// Total cost in micro-MINT. pub total_cost: u64, /// ISO 8601 timestamp when execution started. pub started_at: String, /// ISO 8601 timestamp when execution completed. pub completed_at: String, /// BLAKE3 hash of the input payload. pub input_hash: SigilHash, /// BLAKE3 hash of the output payload. pub output_hash: SigilHash, /// BLAKE3 hash of the entire receipt (excluding this field). pub receipt_hash: SigilHash, /// Ed25519 signature from the provider over `receipt_hash`. pub provider_signature: Vec } ``` Source line: `16`. ## receipt::ComputeReceipt::compute\_cost [#receiptcomputereceiptcompute_cost] Computes the total cost for a job given a pricing model and resource consumption. The cost is the maximum of the computed usage cost and the provider's minimum job cost. ```rust pub fn compute_cost( pricing: &ComputePricing, tokens_in: u64, tokens_out: u64, gpu_seconds: f64, ) -> u64; ``` Source line: `55`. ## receipt::ComputeReceipt::compute\_receipt\_hash [#receiptcomputereceiptcompute_receipt_hash] Computes the BLAKE3 hash of the receipt's content fields. All fields except `receipt_hash` and `provider_signature` contribute to the hash. ```rust pub fn compute_receipt_hash(&self) -> SigilHash; ``` Source line: `76`. ## receipt::ComputeReceipt::verify\_hash [#receiptcomputereceiptverify_hash] Verifies that the stored `receipt_hash` matches the computed hash. ```rust pub fn verify_hash(&self) -> Result<(), AriseError>; ``` Source line: `95`. ## receipt::ComputeReceipt::verify\_provider\_signature [#receiptcomputereceiptverify_provider_signature] Verifies the provider's Ed25519 signature over the stored receipt hash. ```rust pub fn verify_provider_signature( &self, provider_public_key: &[u8; 32], ) -> Result<(), AriseError>; ``` Source line: `107`. # arise-sigil · reputation URL: https://docs.sigil.ml/reference/rust/arise-sigil/reputation Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/reputation.md Source declarations, signatures and documentation for reputation. Source: `sigil/node/../arise-bridge/arise-sigil/src/reputation.rs`. SHA-256: `535cb70f9c09c56d496ed2c6bd999c6f77a097da31121d7a68c8c8a4925f91fe`. 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. ## reputation::ReputationSignals [#reputationreputationsignals] Reputation signals for a compute provider. Each field is a value in `[0.0, 1.0]` representing the provider's performance on that dimension. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ReputationSignals { /// Fraction of accepted jobs that completed successfully. pub completion_rate: f64, /// Fraction of challenges the provider survived (was not penalized). pub challenge_survival: f64, /// Accuracy of the provider's advertised latency vs actual. pub latency_accuracy: f64, /// Fraction of time the provider was available. pub uptime: f64, /// Freshness of hardware attestation (1.0 = just attested, decays). pub attestation_freshness: f64 } ``` Source line: `25`. ## reputation::ReputationSignals::composite\_score [#reputationreputationsignalscomposite_score] Computes the weighted composite reputation score. Returns a value in `[0.0, 1.0]` if all input signals are in range. ```rust pub fn composite_score(&self) -> f64; ``` Source line: `42`. ## reputation::ReputationSignals::is\_valid [#reputationreputationsignalsis_valid] Returns `true` if all signal values are in the valid `[0.0, 1.0]` range. ```rust pub fn is_valid(&self) -> bool; ``` Source line: `51`. # arise-sigil · settlement URL: https://docs.sigil.ml/reference/rust/arise-sigil/settlement Markdown: https://docs.sigil.ml/reference/rust/arise-sigil/settlement.md Source declarations, signatures and documentation for settlement. Source: `sigil/node/../arise-bridge/arise-sigil/src/settlement.rs`. SHA-256: `39256086a4976385550306bf9b6aed8a74e90c967766bae2bb38092d1e7cc79b`. 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. ## settlement::SettlementAction [#settlementsettlementaction] Describes the on-chain settlement for a single compute receipt. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SettlementAction { /// The compute receipt being settled. pub receipt: ComputeReceipt, /// Amount to debit from the consumer's escrow. pub escrow_debit: u64, /// Amount to credit to the provider's account. pub provider_credit: u64, /// The receipt hash to anchor on-chain. pub receipt_anchor_hash: SigilHash } ``` Source line: `15`. ## settlement::create\_settlement [#settlementcreate_settlement] Constructs a settlement action from a verified compute receipt. The function verifies the receipt hash and provider signature, then builds a settlement that debits the consumer's escrow and credits the provider. ```rust pub fn create_settlement( receipt: &ComputeReceipt, provider_public_key: &[u8; 32], ) -> Result; ``` Source line: `30`. # arise-verify · benchmark URL: https://docs.sigil.ml/reference/rust/arise-verify/benchmark Markdown: https://docs.sigil.ml/reference/rust/arise-verify/benchmark.md Source declarations, signatures and documentation for benchmark. Source: `sigil/node/../arise-bridge/arise-verify/src/benchmark.rs`. SHA-256: `e86921c675edc7c75b7782adfc2322ae55f0c3e5c04b548efb84d245e09159a5`. 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. ## benchmark::DEFAULT\_TOLERANCE\_PCT [#benchmarkdefault_tolerance_pct] Default tolerance percentage (10%) before claims are considered exceeded. ```rust pub const DEFAULT_TOLERANCE_PCT: f64; ``` Source line: `11`. ## benchmark::BenchmarkResult [#benchmarkbenchmarkresult] Result of comparing claimed vs measured hardware performance. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum BenchmarkResult { /// All claims are verified within tolerance. Verified, /// Claims deviate but are within the acceptable tolerance. WithinTolerance { /// Maximum deviation percentage observed. deviation_pct: f64, }, /// A claim significantly exceeds the measured value. ClaimsExceeded { /// The metric that was exceeded. metric: String, /// The value the provider claimed. claimed: f64, /// The value that was actually measured. measured: f64, }, /// No measurements have been taken yet. NotYetMeasured, } ``` Source line: `15`. ## benchmark::BenchmarkVerification [#benchmarkbenchmarkverification] Hardware benchmark data for a provider, comparing claims vs measurements. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BenchmarkVerification { /// DID of the provider. pub provider_did: String, /// Claimed peak TFLOPS. pub claimed_tflops: f64, /// Claimed network bandwidth in Gbps. pub claimed_bandwidth_gbps: f64, /// Claimed inference latency in milliseconds. pub claimed_latency_ms: f64, /// Measured peak TFLOPS (if benchmark has run). pub measured_tflops: Option, /// Measured network bandwidth in Gbps (if benchmark has run). pub measured_bandwidth_gbps: Option, /// Measured inference latency in milliseconds (if benchmark has run). pub measured_latency_ms: Option } ``` Source line: `38`. ## benchmark::BenchmarkVerification::verify\_claims [#benchmarkbenchmarkverificationverify_claims] Verifies provider claims against measured values. For TFLOPS and bandwidth, the claimed value should not exceed the measured value by more than the tolerance. For latency, the measured value should not exceed the claimed value by more than the tolerance (lower latency is better). ```rust pub fn verify_claims(&self) -> BenchmarkResult; ``` Source line: `62`. ## benchmark::BenchmarkVerification::verify\_claims\_with\_tolerance [#benchmarkbenchmarkverificationverify_claims_with_tolerance] Verifies claims with a custom tolerance percentage. ```rust pub fn verify_claims_with_tolerance(&self, tolerance_pct: f64) -> BenchmarkResult; ``` Source line: `67`. # arise-verify · crate URL: https://docs.sigil.ml/reference/rust/arise-verify/crate Markdown: https://docs.sigil.ml/reference/rust/arise-verify/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../arise-bridge/arise-verify/src/lib.rs`. SHA-256: `8a44e7911b44bd156d0eb6382c53bdfea191606e8fa5f1685ba6e6439541dee9`. 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. ## benchmark [#benchmark] ```rust pub mod benchmark; ``` Source line: `24`. ## error [#error] ```rust pub mod error; ``` Source line: `25`. ## optimistic [#optimistic] ```rust pub mod optimistic; ``` Source line: `26`. ## redundant [#redundant] ```rust pub mod redundant; ``` Source line: `27`. ## sentinel [#sentinel] ```rust pub mod sentinel; ``` Source line: `28`. ## tee [#tee] ```rust pub mod tee; ``` Source line: `29`. ## pub use benchmark::\{BenchmarkResult, BenchmarkVerification}; [#pub-use-benchmarkbenchmarkresult-benchmarkverification] ```rust pub use benchmark::{BenchmarkResult, BenchmarkVerification}; ``` Source line: `31`. ## pub use error::VerifyError; [#pub-use-errorverifyerror] ```rust pub use error::VerifyError; ``` Source line: `32`. ## pub use optimistic::OptimisticVerification; [#pub-use-optimisticoptimisticverification] ```rust pub use optimistic::OptimisticVerification; ``` Source line: `33`. ## pub use redundant::\{ProviderResult, RedundantVerification}; [#pub-use-redundantproviderresult-redundantverification] ```rust pub use redundant::{ProviderResult, RedundantVerification}; ``` Source line: `34`. ## pub use sentinel::\{SentinelProbe, SentinelScheduler}; [#pub-use-sentinelsentinelprobe-sentinelscheduler] ```rust pub use sentinel::{SentinelProbe, SentinelScheduler}; ``` Source line: `35`. ## pub use tee::\{TeeAttestation, TeeType}; [#pub-use-teeteeattestation-teetype] ```rust pub use tee::{TeeAttestation, TeeType}; ``` Source line: `36`. # arise-verify · error URL: https://docs.sigil.ml/reference/rust/arise-verify/error Markdown: https://docs.sigil.ml/reference/rust/arise-verify/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/../arise-bridge/arise-verify/src/error.rs`. SHA-256: `08e6517384306a03c27d724971900d7b191e792f58ee82fdf263f147ba93110f`. 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. ## error::VerifyError [#errorverifyerror] Errors that can occur during compute verification. ```rust #[derive(Debug, Error)] pub enum VerifyError { /// The referenced sentinel probe was not found. #[error("probe not found: {0}")] ProbeNotFound(String), /// The referenced provider was not found. #[error("provider not found: {0}")] ProviderNotFound(String), /// Not enough providers are available for redundant verification. #[error("insufficient providers: required {required}, available {available}")] InsufficientProviders { /// The number of providers required. required: usize, /// The number of providers available. available: usize, }, /// Two or more providers in a redundant verification share a human root. #[error("duplicate human root DID: {0}")] DuplicateHumanRoot(String), /// The optimistic challenge window has already closed. #[error("challenge window is closed")] ChallengeWindowClosed, /// TEE attestation report verification failed. #[error("TEE verification failed: {0}")] TeeVerificationFailed(String), /// Hardware benchmark claims do not match measured values. #[error("benchmark mismatch: {0}")] BenchmarkMismatch(String), } ``` Source line: `7`. # arise-verify URL: https://docs.sigil.ml/reference/rust/arise-verify Markdown: https://docs.sigil.ml/reference/rust/arise-verify.md Compute verification tiers — optimistic, redundant, TEE, sentinel Compute verification tiers — optimistic, redundant, TEE, sentinel | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `arise-verify` | | Manifest version | `0.1.0` | | Source | `sigil/node/../arise-bridge/arise-verify/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `arise_verify` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] arise-verify = { path = "../arise-verify" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/arise-verify/crate) — 12 declarations * [benchmark](/reference/rust/arise-verify/benchmark) — 5 declarations * [error](/reference/rust/arise-verify/error) — 1 declarations * [optimistic](/reference/rust/arise-verify/optimistic) — 6 declarations * [redundant](/reference/rust/arise-verify/redundant) — 11 declarations * [sentinel](/reference/rust/arise-verify/sentinel) — 9 declarations * [tee](/reference/rust/arise-verify/tee) — 4 declarations # arise-verify · optimistic URL: https://docs.sigil.ml/reference/rust/arise-verify/optimistic Markdown: https://docs.sigil.ml/reference/rust/arise-verify/optimistic.md Source declarations, signatures and documentation for optimistic. Source: `sigil/node/../arise-bridge/arise-verify/src/optimistic.rs`. SHA-256: `edd552d58eba391a1a72c0131c6645e6e7c030b2f066dcdc4d460dd6c3659c64`. 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. ## optimistic::DEFAULT\_CHALLENGE\_WINDOW\_EPOCHS [#optimisticdefault_challenge_window_epochs] Default number of epochs for the challenge window. ```rust pub const DEFAULT_CHALLENGE_WINDOW_EPOCHS: u64; ``` Source line: `12`. ## optimistic::OptimisticVerification [#optimisticoptimisticverification] T1: Optimistic verification of a compute receipt. The receipt is provisionally accepted upon provider signature. If no challenge is raised during the window, it finalizes. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct OptimisticVerification { /// The receipt being verified. pub receipt_id: String, /// Provider's Ed25519 signature over the receipt hash. pub provider_signature: Vec, /// Length of the challenge window in epochs. pub challenge_window_epochs: u64, /// Epoch when the receipt was submitted. pub submitted_epoch: u64, /// Whether the verification has been finalized. pub finalized: bool } ``` Source line: `19`. ## optimistic::OptimisticVerification::new [#optimisticoptimisticverificationnew] Creates a new optimistic verification with the default challenge window. ```rust pub fn new(receipt_id: String, signature: Vec, epoch: u64) -> Self; ``` Source line: `34`. ## optimistic::OptimisticVerification::with\_window [#optimisticoptimisticverificationwith_window] Creates a new optimistic verification with a custom challenge window. ```rust pub fn with_window( receipt_id: String, signature: Vec, epoch: u64, window_epochs: u64, ) -> Self; ``` Source line: `45`. ## optimistic::OptimisticVerification::is\_challenge\_window\_open [#optimisticoptimisticverificationis_challenge_window_open] Returns `true` if the challenge window is still open at the given epoch. ```rust pub fn is_challenge_window_open(&self, current_epoch: u64) -> bool; ``` Source line: `61`. ## optimistic::OptimisticVerification::finalize [#optimisticoptimisticverificationfinalize] Finalizes the verification if the challenge window has elapsed. Returns an error if the window is still open or the verification is already finalized. ```rust pub fn finalize(&mut self, current_epoch: u64) -> Result<(), VerifyError>; ``` Source line: `69`. # arise-verify · redundant URL: https://docs.sigil.ml/reference/rust/arise-verify/redundant Markdown: https://docs.sigil.ml/reference/rust/arise-verify/redundant.md Source declarations, signatures and documentation for redundant. Source: `sigil/node/../arise-bridge/arise-verify/src/redundant.rs`. SHA-256: `e994850e47e1b69c7e4bfe2292d8fcbc89e301a6c28df4b492e55b06a7626c73`. 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. ## redundant::DEFAULT\_REQUIRED\_PROVIDERS [#redundantdefault_required_providers] Default number of providers for redundant verification. ```rust pub const DEFAULT_REQUIRED_PROVIDERS: usize; ``` Source line: `13`. ## redundant::DEFAULT\_REQUIRED\_MAJORITY [#redundantdefault_required_majority] Default majority threshold. ```rust pub const DEFAULT_REQUIRED_MAJORITY: usize; ``` Source line: `16`. ## redundant::ProviderResult [#redundantproviderresult] A single provider's result for a redundant verification job. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProviderResult { /// DID of the provider that executed this replica. pub provider_did: String, /// Human root DID backing this provider. pub human_root_did: String, /// BLAKE3 hash of the output produced. pub output_hash: [u8; 32], /// Whether the provider has completed execution. pub completed: bool } ``` Source line: `20`. ## redundant::RedundantVerification [#redundantredundantverification] T2: Redundant verification across multiple providers. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RedundantVerification { /// The job being verified. pub job_id: String, /// Results collected from providers. pub provider_results: Vec, /// Number of providers required (default 3). pub required_providers: usize, /// Number of agreeing providers needed for consensus (default 2). pub required_majority: usize } ``` Source line: `33`. ## redundant::RedundantVerification::new [#redundantredundantverificationnew] Creates a new redundant verification for the given job. ```rust pub fn new(job_id: String, n: usize) -> Self; ``` Source line: `46`. ## redundant::RedundantVerification::add\_result [#redundantredundantverificationadd_result] Adds a provider result, enforcing uniqueness of provider DIDs and human root DIDs. ```rust pub fn add_result(&mut self, result: ProviderResult) -> Result<(), VerifyError>; ``` Source line: `58`. ## redundant::RedundantVerification::has\_consensus [#redundantredundantverificationhas_consensus] Returns `true` if a majority of completed providers agree on the output hash. ```rust pub fn has_consensus(&self) -> bool; ``` Source line: `95`. ## redundant::RedundantVerification::consensus\_hash [#redundantredundantverificationconsensus_hash] Returns the majority output hash if consensus exists. ```rust pub fn consensus_hash(&self) -> Option<[u8; 32]>; ``` Source line: `118`. ## redundant::RedundantVerification::outliers [#redundantredundantverificationoutliers] Returns references to results that disagree with the consensus hash. ```rust pub fn outliers(&self) -> Vec<&ProviderResult>; ``` Source line: `138`. ## redundant::RedundantVerification::verify\_different\_roots [#redundantredundantverificationverify_different_roots] Returns `true` if all providers have different human root DIDs. ```rust pub fn verify_different_roots(&self) -> bool; ``` Source line: `151`. ## redundant::RedundantVerification::is\_complete [#redundantredundantverificationis_complete] Returns `true` if enough provider results have been collected and all are completed. ```rust pub fn is_complete(&self) -> bool; ``` Source line: `162`. # arise-verify · sentinel URL: https://docs.sigil.ml/reference/rust/arise-verify/sentinel Markdown: https://docs.sigil.ml/reference/rust/arise-verify/sentinel.md Source declarations, signatures and documentation for sentinel. Source: `sigil/node/../arise-bridge/arise-verify/src/sentinel.rs`. SHA-256: `1539bec5c95d7a84e6120400e6a1fd3da909c4a1dd97f01413a4f7fb7e6fb2c0`. 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. ## sentinel::DEFAULT\_PROBE\_INTERVAL\_SECS [#sentineldefault_probe_interval_secs] Default probe interval in seconds (5 minutes). ```rust pub const DEFAULT_PROBE_INTERVAL_SECS: u64; ``` Source line: `13`. ## sentinel::DEFAULT\_MAX\_HISTORY [#sentineldefault_max_history] Default maximum history size per scheduler. ```rust pub const DEFAULT_MAX_HISTORY: usize; ``` Source line: `16`. ## sentinel::SentinelProbe [#sentinelsentinelprobe] A single sentinel probe sent to a provider. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SentinelProbe { /// Unique probe identifier. pub probe_id: String, /// DID of the provider being probed. pub provider_did: String, /// Known input data for the probe. pub known_input: Vec, /// Expected BLAKE3 hash of the correct output. pub expected_output_hash: [u8; 32], /// Epoch-second timestamp when the probe was sent. pub sent_at: u64, /// Whether a response has been received. pub response_received: bool, /// Whether the response was correct. pub response_correct: bool, /// Response latency in milliseconds (if received). pub response_latency_ms: Option } ``` Source line: `20`. ## sentinel::SentinelScheduler [#sentinelsentinelscheduler] Scheduler that manages sentinel probes for providers. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SentinelScheduler { /// Interval between probes in seconds. pub probe_interval_secs: u64, /// Currently active (pending) probes. pub active_probes: Vec, /// Completed probes (capped at `max_history`). pub probe_history: Vec, /// Maximum number of completed probes to retain. pub max_history: usize } ``` Source line: `41`. ## sentinel::SentinelScheduler::new [#sentinelsentinelschedulernew] Creates a new scheduler with the given probe interval. ```rust pub fn new(interval_secs: u64) -> Self; ``` Source line: `54`. ## sentinel::SentinelScheduler::create\_probe [#sentinelsentinelschedulercreate_probe] Creates a new sentinel probe for a provider. The probe is added to the active probes list and a reference to it is returned. ```rust pub fn create_probe( &mut self, probe_id: String, provider_did: &str, input: Vec, expected_hash: [u8; 32], sent_at: u64, ) -> &SentinelProbe; ``` Source line: `67`. ## sentinel::SentinelScheduler::record\_response [#sentinelsentinelschedulerrecord_response] Records a response for an active probe, moving it to history. ```rust pub fn record_response( &mut self, probe_id: &str, correct: bool, latency_ms: u64, ) -> Result<(), VerifyError>; ``` Source line: `91`. ## sentinel::SentinelScheduler::provider\_reliability [#sentinelsentinelschedulerprovider_reliability] Computes the reliability score for a provider based on completed probes. Returns the fraction of correct responses out of all received responses. Returns `1.0` if no probes have been recorded (benefit of the doubt). ```rust pub fn provider_reliability(&self, provider_did: &str) -> f64; ``` Source line: `122`. ## sentinel::SentinelScheduler::needs\_probe [#sentinelsentinelschedulerneeds_probe] Returns `true` if the provider needs a new probe based on the time since their last probe. ```rust pub fn needs_probe(&self, provider_did: &str, now: u64) -> bool; ``` Source line: `139`. # arise-verify · tee URL: https://docs.sigil.ml/reference/rust/arise-verify/tee Markdown: https://docs.sigil.ml/reference/rust/arise-verify/tee.md Source declarations, signatures and documentation for tee. Source: `sigil/node/../arise-bridge/arise-verify/src/tee.rs`. SHA-256: `f0b2d04a4dd99b19e9a83082489c219ff624f378605c889119b3c4944e804287`. 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. ## tee::TeeType [#teeteetype] Supported TEE platforms. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum TeeType { /// Intel Software Guard Extensions. IntelSgx, /// Intel Trust Domain Extensions. IntelTdx, /// AMD Secure Encrypted Virtualization - Secure Nested Paging. AmdSevSnp, /// Arm Confidential Compute Architecture. ArmCca, } ``` Source line: `19`. ## tee::TeeAttestation [#teeteeattestation] A TEE attestation report from a provider. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TeeAttestation { /// The type of TEE platform. pub tee_type: TeeType, /// Raw attestation report data. pub report_data: Vec, /// Platform measurement (e.g. MRENCLAVE for SGX). pub measurement: Vec, /// Human-readable platform information string. pub platform_info: String, /// Whether the attestation has been structurally verified. pub verified: bool } ``` Source line: `44`. ## tee::TeeAttestation::new [#teeteeattestationnew] Creates a new unverified TEE attestation. ```rust pub fn new( tee_type: TeeType, report_data: Vec, measurement: Vec, platform_info: String, ) -> Self; ``` Source line: `59`. ## tee::TeeAttestation::verify\_report [#teeteeattestationverify_report] Performs structural verification of the attestation report. This checks that the report data and measurement are non-empty and meet minimum length requirements for the platform. Full cryptographic verification is platform-specific and requires vendor libraries (Intel DCAP, AMD SEV Tool, etc.). Returns `true` if structurally valid, `false` otherwise. ```rust pub fn verify_report(&mut self) -> Result; ``` Source line: `82`. # sigil-anomaly · crate URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-anomaly/src/lib.rs`. SHA-256: `f799d4d9e119252ba5b177bfad616224d7ff4f1e0f6a9de372fbac0fedad185c`. 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. ## error [#error] ```rust pub mod error; ``` Source line: `48`. ## flag [#flag] ```rust pub mod flag; ``` Source line: `49`. ## loader [#loader] ```rust pub mod loader; ``` Source line: `50`. ## rule [#rule] ```rust pub mod rule; ``` Source line: `51`. ## rules [#rules] ```rust pub mod rules; ``` Source line: `52`. ## ruleset [#ruleset] ```rust pub mod ruleset; ``` Source line: `53`. ## snapshot [#snapshot] ```rust pub mod snapshot; ``` Source line: `54`. ## pub use error::\{AnomalyError, Result}; [#pub-use-erroranomalyerror-result] ```rust pub use error::{AnomalyError, Result}; ``` Source line: `56`. ## pub use flag::\{Flag, FlagSeverity}; [#pub-use-flagflag-flagseverity] ```rust pub use flag::{Flag, FlagSeverity}; ``` Source line: `57`. ## pub use loader::\{build\_rule, load\_rule\_set, RuleConfig, RuleConfigFile, RuleKind}; [#pub-use-loaderbuild_rule-load_rule_set-ruleconfig-ruleconfigfile-rulekind] ```rust pub use loader::{build_rule, load_rule_set, RuleConfig, RuleConfigFile, RuleKind}; ``` Source line: `58`. ## pub use rule::\{AnomalyRule, RuleId, RuleMetadata}; [#pub-use-ruleanomalyrule-ruleid-rulemetadata] ```rust pub use rule::{AnomalyRule, RuleId, RuleMetadata}; ``` Source line: `59`. ## pub use ruleset::\{RuleSet, RuleSetProvenance}; [#pub-use-rulesetruleset-rulesetprovenance] ```rust pub use ruleset::{RuleSet, RuleSetProvenance}; ``` Source line: `60`. ## pub use snapshot::SnapshotView; [#pub-use-snapshotsnapshotview] ```rust pub use snapshot::SnapshotView; ``` Source line: `61`. ## ::SIGIL\_ANOMALY\_VERSION [#sigil_anomaly_version] Crate version identifier surfaced to the validator-agent runtime. ```rust pub const SIGIL_ANOMALY_VERSION: &str; ``` Source line: `64`. ## ::ANOMALY\_SCHEMA\_VERSION [#anomaly_schema_version] Schema version for serialized rule definitions and flag outputs. Increment when wire-format-breaking changes are introduced. The validator-agent runtime checks this on startup and refuses to load rule sets emitted under a different schema version. ```rust pub const ANOMALY_SCHEMA_VERSION: u32; ``` Source line: `71`. # sigil-anomaly · error URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/error Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-anomaly/src/error.rs`. SHA-256: `5abb31a2207ecb6278087daf7214b03c9b881307188e2d248c1a10676b0894ec`. 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. ## error::AnomalyError [#erroranomalyerror] ```rust #[derive(Debug, Error, Clone, PartialEq, Eq)] pub enum AnomalyError { /// A rule attempted to read state outside the supplied snapshot view. /// This is a programming error in the rule, not a runtime condition. #[error("rule {rule_id} attempted live state read; rules must use the supplied snapshot view")] LiveStateRead { rule_id: String }, /// A rule's serialized definition does not match the declared content /// address (BLAKE3 mismatch). Rejected at registration. #[error("rule code blob hash mismatch: declared {declared}, computed {computed}")] CodeBlobHashMismatch { declared: String, computed: String }, /// A rule requested a schema version not supported by this crate build. #[error("rule schema version {requested} not supported (this build supports {supported})")] SchemaVersionMismatch { requested: u32, supported: u32 }, /// A rule emitted output that failed deterministic-canonical-form /// checks. Surfaced to the caller as a programming error. #[error("rule {rule_id} emitted non-canonical output: {detail}")] NonCanonicalOutput { rule_id: String, detail: String }, /// A rule failed while evaluating a transaction. The `RuleSet` turns /// this into a critical invariant flag rather than silently skipping it. #[error("rule {rule_id} evaluation failed: {detail}")] RuleEvaluationFailed { rule_id: String, detail: String }, /// Two rules registered under the same id. Registration is rejected. #[error("rule id {0} is already registered")] DuplicateRuleId(String), /// A rule set was not loaded from a content-addressed source. #[error("invalid rule-set provenance: {0}")] InvalidRuleSetProvenance(String), /// Snapshot view did not contain a key the rule asserted as /// required. Rules must declare required keys at registration. #[error("rule {rule_id} required snapshot key {key} not present in view")] MissingSnapshotKey { rule_id: String, key: String }, } ``` Source line: `10`. ## error::Result [#errorresult] ```rust pub type Result = std::result::Result; ``` Source line: `49`. # sigil-anomaly · flag URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/flag Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/flag.md Source declarations, signatures and documentation for flag. Source: `sigil/node/sigil-anomaly/src/flag.rs`. SHA-256: `866b863e701fb01cf1d21fdef7d12a7d1cafdebfc464d51b36edea3e1ed105a4`. 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. ## flag::FlagSeverity [#flagflagseverity] Severity classification for an anomaly flag. Severity drives sampling weight in the validator-agent runtime: higher severity flags are more likely to escalate to L2 small-model triage, and `Critical` flags are typically escalated to L3 immediately. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum FlagSeverity { /// Heuristic match. Common; high false-positive rate. Sampled lightly. Info, /// Notable deviation from typical traffic shape. Low, /// Strong heuristic signal; warrants L2 attention. Medium, /// Pattern matches a known attack class. L2 + L3 attention. High, /// Severe deviation. Direct L3 escalation; possible L4 incident. Critical, } ``` Source line: `18`. ## flag::Flag [#flagflag] A flag emitted by an anomaly rule. Flags carry the rule's content-addressed id, the transaction hash that triggered the rule, severity, and an optional payload of rule-specific evidence. Payload format is opaque to the validator agent; downstream consumers (L2/L3) parse it according to the rule's declared schema. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Flag { /// Content-addressed id of the rule that emitted this flag. pub rule_id: RuleId, /// Transaction hash (BLAKE3-32) the rule evaluated against. pub tx_hash: [u8; 32], /// Severity of the flag. pub severity: FlagSeverity, /// Block height at which the snapshot view was taken. The rule did /// not read live state; this is the explicit version label. pub snapshot_height: u64, /// Opaque rule-specific evidence payload. Canonical JSON. pub evidence_json: String } ``` Source line: `39`. ## flag::Flag::bare [#flagflagbare] Build a flag with empty evidence. ```rust pub fn bare( rule_id: RuleId, tx_hash: [u8; 32], severity: FlagSeverity, snapshot_height: u64, ) -> Self; ``` Source line: `55`. ## flag::Flag::with\_evidence [#flagflagwith_evidence] Build a flag with a JSON-serializable evidence payload. ```rust pub fn with_evidence( rule_id: RuleId, tx_hash: [u8; 32], severity: FlagSeverity, snapshot_height: u64, evidence: &E, ) -> std::result::Result; ``` Source line: `71`. # sigil-anomaly URL: https://docs.sigil.ml/reference/rust/sigil-anomaly Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly.md Off-chain L1 rule-based anomaly detection for Sigil. Pure-fn rules over (transaction, snapshot view). Code-enforced airgap from consensus path: this crate has zero deps on sigil-consensus, sigil-tower, sigil-execution, sigil-state, sigil-storage, sigil-network, or sigil-node. Results are flags only, never consensus inputs. Off-chain L1 rule-based anomaly detection for Sigil. Pure-fn rules over (transaction, snapshot view). Code-enforced airgap from consensus path: this crate has zero deps on sigil-consensus, sigil-tower, sigil-execution, sigil-state, sigil-storage, sigil-network, or sigil-node. Results are flags only, never consensus inputs. | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-anomaly` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-anomaly/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_anomaly` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-anomaly = { path = "../sigil-anomaly" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-anomaly/crate) — 15 declarations * [error](/reference/rust/sigil-anomaly/error) — 2 declarations * [flag](/reference/rust/sigil-anomaly/flag) — 4 declarations * [loader](/reference/rust/sigil-anomaly/loader) — 6 declarations * [rule](/reference/rust/sigil-anomaly/rule) — 6 declarations * [rules](/reference/rust/sigil-anomaly/rules) — 4 declarations * [rules::balance\_drain](/reference/rust/sigil-anomaly/rules-balance_drain) — 2 declarations * [rules::gas\_spike](/reference/rust/sigil-anomaly/rules-gas_spike) — 2 declarations * [rules::lineage\_depth](/reference/rust/sigil-anomaly/rules-lineage_depth) — 2 declarations * [rules::slashing\_burst](/reference/rust/sigil-anomaly/rules-slashing_burst) — 2 declarations * [ruleset](/reference/rust/sigil-anomaly/ruleset) — 14 declarations * [snapshot](/reference/rust/sigil-anomaly/snapshot) — 10 declarations # sigil-anomaly · loader URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/loader Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/loader.md Source declarations, signatures and documentation for loader. Source: `sigil/node/sigil-anomaly/src/loader.rs`. SHA-256: `648702d2c9987b43ed6ed0af5d6931432c1b95580f64d1cea31d04118bf215ab`. 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. ## loader::RuleConfigFile [#loaderruleconfigfile] Top-level rule-config file structure. ```rust #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct RuleConfigFile { #[serde(default, rename = "rule")] pub rules: Vec } ``` Source line: `68`. ## loader::RuleConfig [#loaderruleconfig] One rule declaration. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RuleConfig { pub kind: RuleKind, /// Stable operator-supplied seed mixed into the BLAKE3 id. pub id_seed: String, /// Kind-specific parameters. pub params: serde_json::Value } ``` Source line: `75`. ## loader::RuleKind [#loaderrulekind] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RuleKind { GasSpike, BalanceDrain, SlashingBurst, LineageDepth, } ``` Source line: `85`. ## loader::RuleKind::as\_str [#loaderrulekindas_str] ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `93`. ## loader::load\_rule\_set [#loaderload_rule_set] Load rules from a parsed \[`RuleConfigFile`] and register them in a fresh \[`RuleSet`]. The set is sealed before return. ```rust pub fn load_rule_set(file: &RuleConfigFile) -> Result; ``` Source line: `126`. ## loader::build\_rule [#loaderbuild_rule] Build a single rule from its config entry. ```rust pub fn build_rule(cfg: &RuleConfig) -> Result>; ``` Source line: `146`. # sigil-anomaly · rule URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rule Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rule.md Source declarations, signatures and documentation for rule. Source: `sigil/node/sigil-anomaly/src/rule.rs`. SHA-256: `102aea2a060c3ff2ceff53e276010f922d63c5b0d5a9a78121b028a4cb4b9286`. 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. ## rule::RuleId [#ruleruleid] Content-addressed rule identifier. A rule's id is the BLAKE3 hash of its canonical serialized definition. Two rules with the same logic but different configurations have different ids. This makes rule sets auditable and reproducible. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] pub struct RuleId([u8; 32]); ``` Source line: `21`. ## rule::RuleId::from\_blake3 [#ruleruleidfrom_blake3] ```rust pub fn from_blake3(hash: [u8; 32]) -> Self; ``` Source line: `24`. ## rule::RuleId::as\_bytes [#ruleruleidas_bytes] ```rust pub fn as_bytes(&self) -> &[u8; 32]; ``` Source line: `28`. ## rule::RuleId::to\_hex [#ruleruleidto_hex] ```rust pub fn to_hex(&self) -> String; ``` Source line: `32`. ## rule::RuleMetadata [#rulerulemetadata] Metadata supplied at rule registration. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RuleMetadata { /// Human-readable name. Not consensus-binding. pub name: String, /// Description of what the rule detects. pub description: String, /// Schema version of the rule's evidence payload. pub evidence_schema_version: u32, /// Snapshot view keys the rule requires. Used by `RuleSet::evaluate` /// to fail fast if the supplied view is missing required keys. pub required_snapshot_keys: Vec } ``` Source line: `51`. ## rule::AnomalyRule [#ruleanomalyrule] The core rule trait. Implementors are pure functions: given a transaction (read-only) and a snapshot view (read-only, explicitly versioned), they return zero or more flags or an error. \*\*Implementation contract: * `evaluate` must be deterministic: the same `(tx, view)` always produces the same output. * `evaluate` must not perform I/O, read clocks, sample randomness, or maintain hidden state across calls. * `evaluate` must complete in bounded time. The validator-agent runtime budgets \<1ms per rule per transaction; rules that exceed this are sampling candidates for de-registration. * `id()` must return the BLAKE3 hash of the rule's canonical serialized definition. Two registrations with the same id are rejected. ```rust pub trait AnomalyRule: Send + Sync { /// Stable, content-addressed identifier. fn id(&self) -> RuleId; /// Metadata describing the rule. fn metadata(&self) -> &RuleMetadata; /// Evaluate the rule against a transaction and snapshot view. /// /// The transaction is referenced by its canonical wire form /// (serialized bytes) plus its BLAKE3 hash. Rules that need to /// inspect transaction structure should parse the bytes themselves /// using `sigil-core`'s schema; the trait stays decoupled from /// `sigil-core`'s evolving type surface. fn evaluate( &self, tx_bytes: &[u8], tx_hash: &[u8; 32], view: &SnapshotView, ) -> Result>; } ``` Source line: `81`. # sigil-anomaly · rules::balance_drain URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-balance_drain Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-balance_drain.md Source declarations, signatures and documentation for rules::balance_drain. Source: `sigil/node/sigil-anomaly/src/rules/balance_drain.rs`. SHA-256: `fe7445902aa1faefce92514804fb08f69d3279cf39b140babceb7adf610417a8`. 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. ## rules::balance\_drain::BalanceDrainRule [#rulesbalance_drainbalancedrainrule] ```rust pub struct BalanceDrainRule { } ``` Source line: `41`. ## rules::balance\_drain::BalanceDrainRule::new [#rulesbalance_drainbalancedrainrulenew] ```rust pub fn new(id: RuleId, min_drain_fraction_bps: u32) -> Self; ``` Source line: `49`. # sigil-anomaly · rules::gas_spike URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-gas_spike Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-gas_spike.md Source declarations, signatures and documentation for rules::gas_spike. Source: `sigil/node/sigil-anomaly/src/rules/gas_spike.rs`. SHA-256: `ce8d1e37bee6ff1980d43454a35cd7f11ddda50994273ce0a74def412be640fd`. 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. ## rules::gas\_spike::GasSpikeRule [#rulesgas_spikegasspikerule] Gas-spike detector. Construct with \[`GasSpikeRule::new`]; supply the multiplier threshold and a content-addressed `RuleId` derived from the rule's canonical configuration. ```rust pub struct GasSpikeRule { } ``` Source line: `41`. ## rules::gas\_spike::GasSpikeRule::new [#rulesgas_spikegasspikerulenew] Build a new gas-spike rule. The `id` should be the BLAKE3 hash of the rule's canonical serialized configuration: the `(rule_kind, multiple)` tuple encoded as canonical JSON. The validator-agent runtime computes this id when loading the rule from the on-chain registry. ```rust pub fn new(id: RuleId, multiple: u64) -> Self; ``` Source line: `53`. # sigil-anomaly · rules::lineage_depth URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-lineage_depth Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-lineage_depth.md Source declarations, signatures and documentation for rules::lineage_depth. Source: `sigil/node/sigil-anomaly/src/rules/lineage_depth.rs`. SHA-256: `531757b98f867a8b55b0bf3641e432dee6d26c5fe0eb2001b2f66a631ab61a08`. 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. ## rules::lineage\_depth::LineageDepthRule [#ruleslineage_depthlineagedepthrule] ```rust pub struct LineageDepthRule { } ``` Source line: `46`. ## rules::lineage\_depth::LineageDepthRule::new [#ruleslineage_depthlineagedepthrulenew] ```rust pub fn new(id: RuleId, medium_depth: u32, high_depth: u32) -> Self; ``` Source line: `53`. # sigil-anomaly · rules::slashing_burst URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-slashing_burst Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules-slashing_burst.md Source declarations, signatures and documentation for rules::slashing_burst. Source: `sigil/node/sigil-anomaly/src/rules/slashing_burst.rs`. SHA-256: `b469863d24718dabea48531235559acff391c976f6095a8f5b25d41bd27824e7`. 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. ## rules::slashing\_burst::SlashingBurstRule [#rulesslashing_burstslashingburstrule] ```rust pub struct SlashingBurstRule { } ``` Source line: `43`. ## rules::slashing\_burst::SlashingBurstRule::new [#rulesslashing_burstslashingburstrulenew] ```rust pub fn new(id: RuleId, min_slashing_events: u32) -> Self; ``` Source line: `49`. # sigil-anomaly · rules URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/rules.md Source declarations, signatures and documentation for rules. Source: `sigil/node/sigil-anomaly/src/rules/mod.rs`. SHA-256: `42b87cf0b3a6feb0a4ad11182da8cf086e395b8744b6ac626d344c95b5eebfcb`. 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. ## rules::balance\_drain [#rulesbalance_drain] Reference rules. These rules are reference implementations and test fixtures, not production rule sets. Production rule sets are loaded from content-addressed registry entries via Agent 03's `RegisterContractCode` surface and supplied to the validator-agent runtime at epoch start. Each module here documents one rule pattern and exists to: 1. Anchor the trait surface against a concrete implementation. 2. Provide a known-good fixture for `RuleSet` integration tests. 3. Demonstrate the snapshot-view-only state-access pattern. Adding a new reference rule does **not** ship that rule to validators; it only ships a Rust implementation that the runtime could choose to instantiate. The on-chain registry is the source of truth for which rules are actually live. ```rust pub mod balance_drain; ``` Source line: `20`. ## rules::gas\_spike [#rulesgas_spike] ```rust pub mod gas_spike; ``` Source line: `21`. ## rules::lineage\_depth [#ruleslineage_depth] ```rust pub mod lineage_depth; ``` Source line: `22`. ## rules::slashing\_burst [#rulesslashing_burst] ```rust pub mod slashing_burst; ``` Source line: `23`. # sigil-anomaly · ruleset URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/ruleset Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/ruleset.md Source declarations, signatures and documentation for ruleset. Source: `sigil/node/sigil-anomaly/src/ruleset.rs`. SHA-256: `fa019fddbfd44767453ee8fded3e8a51197384d4b6f2b8da601b7ed77f845ac4`. 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. ## ruleset::RuleSet [#rulesetruleset] A registered set of anomaly rules. Cheap to clone (internally `Arc`-wrapped); safe to share across threads. New rules cannot be added once the set is sealed for an epoch — `register` returns an error after `seal()` has been called. ```rust #[derive(Default, Clone)] pub struct RuleSet { } ``` Source line: `32`. ## ruleset::RuleSetProvenance [#rulesetrulesetprovenance] Content-addressed provenance for a sealed rule set. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct RuleSetProvenance { } ``` Source line: `38`. ## ruleset::RuleSetProvenance::content\_addressed [#rulesetrulesetprovenancecontent_addressed] ```rust pub fn content_addressed(source: impl Into, digest_hex: String) -> Result; ``` Source line: `51`. ## ruleset::RuleSetProvenance::digest\_hex [#rulesetrulesetprovenancedigest_hex] ```rust pub fn digest_hex(&self) -> &str; ``` Source line: `63`. ## ruleset::RuleSetProvenance::source [#rulesetrulesetprovenancesource] ```rust pub fn source(&self) -> &str; ``` Source line: `67`. ## ruleset::RuleSet::new [#rulesetrulesetnew] ```rust pub fn new() -> Self; ``` Source line: `73`. ## ruleset::RuleSet::with\_provenance [#rulesetrulesetwith_provenance] ```rust pub fn with_provenance(provenance: RuleSetProvenance) -> Self; ``` Source line: `77`. ## ruleset::RuleSet::register [#rulesetrulesetregister] Register a rule. Rejects duplicate ids and rejects registration after `seal()`. ```rust pub fn register(&self, rule: Arc) -> Result<()>; ``` Source line: `85`. ## ruleset::RuleSet::seal [#rulesetrulesetseal] Seal the rule set. After sealing, no further rules can be added. The validator-agent runtime should seal at epoch start. ```rust pub fn seal(&self); ``` Source line: `103`. ## ruleset::RuleSet::set\_provenance [#rulesetrulesetset_provenance] Attach content-addressed provenance before sealing. ```rust pub fn set_provenance(&self, provenance: RuleSetProvenance) -> Result<()>; ``` Source line: `108`. ## ruleset::RuleSet::provenance [#rulesetrulesetprovenance-1] ```rust pub fn provenance(&self) -> Option; ``` Source line: `119`. ## ruleset::RuleSet::len [#rulesetrulesetlen] Number of registered rules. ```rust pub fn len(&self) -> usize; ``` Source line: `124`. ## ruleset::RuleSet::is\_empty [#rulesetrulesetis_empty] ```rust pub fn is_empty(&self) -> bool; ``` Source line: `128`. ## ruleset::RuleSet::evaluate [#rulesetrulesetevaluate] Evaluate all registered rules against a transaction. Rules execute in deterministic order (sorted by `RuleId`). A rule that returns an error is logged via `tracing` and converted into a critical invariant flag; other rules continue. A poisoned or buggy rule cannot silently suppress anomaly reporting. If `view.contains_all(rule.metadata().required_snapshot_keys)` returns false, the rule is skipped with a `MissingSnapshotKey` log line. ```rust pub fn evaluate(&self, tx_bytes: &[u8], tx_hash: &[u8; 32], view: &SnapshotView) -> Vec; ``` Source line: `142`. # sigil-anomaly · snapshot URL: https://docs.sigil.ml/reference/rust/sigil-anomaly/snapshot Markdown: https://docs.sigil.ml/reference/rust/sigil-anomaly/snapshot.md Source declarations, signatures and documentation for snapshot. Source: `sigil/node/sigil-anomaly/src/snapshot.rs`. SHA-256: `4a9c64ee1d2c1f8483a0b47a1c2322cc1e9017156148269ef18eb38f3c745be7`. 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. ## snapshot::SnapshotView [#snapshotsnapshotview] Immutable snapshot of a subset of chain state. Rules access state only through this struct. The underlying map is keyed by application-defined string keys (e.g., `"balance:did:..."`, `"epoch:current"`). Values are opaque byte strings; rules parse them according to the schema documented in their metadata. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SnapshotView { } ``` Source line: `23`. ## snapshot::SnapshotView::new [#snapshotsnapshotviewnew] ```rust pub fn new(block_height: u64, block_hash: [u8; 32]) -> Self; ``` Source line: `32`. ## snapshot::SnapshotView::block\_height [#snapshotsnapshotviewblock_height] ```rust pub fn block_height(&self) -> u64; ``` Source line: `40`. ## snapshot::SnapshotView::block\_hash [#snapshotsnapshotviewblock_hash] ```rust pub fn block_hash(&self) -> &[u8; 32]; ``` Source line: `44`. ## snapshot::SnapshotView::insert [#snapshotsnapshotviewinsert] Insert a key-value pair into the view. Used by the validator-agent runtime when building a snapshot. Once the view is passed to a rule it is treated as immutable by the rule (the trait API takes `&SnapshotView`). ```rust pub fn insert(&mut self, key: impl Into, value: Vec); ``` Source line: `52`. ## snapshot::SnapshotView::get [#snapshotsnapshotviewget] Read a key from the view. Returns `None` if not present. ```rust pub fn get(&self, key: &str) -> Option<&[u8]>; ``` Source line: `57`. ## snapshot::SnapshotView::len [#snapshotsnapshotviewlen] Number of entries in the view. ```rust pub fn len(&self) -> usize; ``` Source line: `62`. ## snapshot::SnapshotView::is\_empty [#snapshotsnapshotviewis_empty] ```rust pub fn is_empty(&self) -> bool; ``` Source line: `66`. ## snapshot::SnapshotView::contains\_all [#snapshotsnapshotviewcontains_all] Check that all required keys are present. Used by `RuleSet` before invoking a rule whose metadata declares required keys. ```rust pub fn contains_all(&self, required: &[String]) -> bool; ``` Source line: `72`. ## snapshot::SnapshotView::iter [#snapshotsnapshotviewiter] Iterate over entries in deterministic order. ```rust pub fn iter(&self) -> impl Iterator)>; ``` Source line: `77`. # sigil-cli · crate URL: https://docs.sigil.ml/reference/rust/sigil-cli/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-cli/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-cli/src/lib.rs`. SHA-256: `b267ced85180531508b742b5ec44c19ce1f966cd75ec2d1f21279f95a1cabe47`. 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. ## genesis\_ceremony [#genesis_ceremony] ```rust pub mod genesis_ceremony; ``` Source line: `28`. ## ::Cli [#cli] Top-level Sigil CLI. ```rust #[derive(Debug, Clone, Parser)] #[command(name = "sigil", version, about = "Sigil blockchain CLI")] pub struct Cli { /// The subcommand to execute. #[command(subcommand)] pub command: Commands, /// RPC endpoint URL. #[arg(long, default_value = "http://localhost:12618", global = true)] pub rpc_url: String, /// Chain ID. #[arg(long, default_value = "sigil-mainnet-1", global = true)] pub chain_id: String, /// Sender DID for transaction-oriented subcommands. #[arg(long, global = true)] pub tx_sender_did: Option, /// Sender nonce for transaction-oriented subcommands. #[arg(long, global = true)] pub tx_nonce: Option, /// 32-byte Ed25519 signing key as lowercase hex for transaction-oriented subcommands. #[arg(long, global = true, conflicts_with = "tx_signing_key_file")] pub tx_signing_key_hex: Option, /// File containing a 32-byte Ed25519 signing key as hex for transaction-oriented subcommands. #[arg(long, global = true, conflicts_with = "tx_signing_key_hex")] pub tx_signing_key_file: Option } ``` Source line: `36`. ## ::Commands [#commands] Top-level subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum Commands { /// NFT collection and token management. Nft { #[command(subcommand)] cmd: NftCommands, }, /// DEX pool, swap, and liquidity operations. Dex { #[command(subcommand)] cmd: DexCommands, }, /// Custom token class, mint, burn, and transfer operations. Token { #[command(subcommand)] cmd: TokenCommands, }, /// Nova world, parcel, avatar, building, and auction operations. Nova { #[command(subcommand)] cmd: NovaCommands, }, /// Initialize a new Sigil node data directory. Init { /// Chain ID to initialize with (overrides the global --chain-id for init). #[arg(long = "init-chain-id", default_value = "sigil-testnet-1")] init_chain_id: String, /// Path to the genesis file. #[arg(long, default_value = "genesis.json")] genesis: String, /// Data directory to initialize. #[arg(long, default_value = "./data")] data_dir: String, /// Validator DID (omit for non-validator nodes). #[arg(long)] validator_did: Option, }, /// Genesis management commands. Genesis { #[command(subcommand)] cmd: GenesisCommands, }, /// Node management commands. Node { #[command(subcommand)] cmd: NodeCommands, }, /// Staking operations. Stake { #[command(subcommand)] cmd: StakeCommands, }, /// Governance participation. Gov { #[command(subcommand)] cmd: GovCommands, }, /// On-chain identity document registration. Identity { #[command(subcommand)] cmd: IdentityCommands, }, /// Query blockchain state. Query { #[command(subcommand)] cmd: QueryCommands, }, /// Labor market job, bid, escrow, milestone, and dispute operations. Labor { #[command(subcommand)] cmd: LaborCommands, }, /// Username registration and reverse lookup operations. Username { #[command(subcommand)] cmd: UsernameCommands, }, /// Register and deploy WASM smart contracts. Contract { #[command(subcommand)] cmd: ContractCommands, }, /// Native Sigil Mail registry operations. Mail { #[command(subcommand)] cmd: MailCommands, }, /// Sigil Name System resolver operations. Sns { #[command(subcommand)] cmd: SnsCommands, }, /// Crucible distributed training coordination. Crucible { #[command(subcommand)] cmd: CrucibleCommands, }, /// Storage pinning marketplace provider and pin-contract operations. Storage { #[command(subcommand)] cmd: StorageCommands, }, /// Compute provider tools. #[cfg(feature = "compute")] Compute { #[command(subcommand)] cmd: ComputeCommands, }, /// Validator registration and management. Validator { #[command(subcommand)] cmd: ValidatorCommands, }, /// Send a signed native token transfer. Transfer { /// Sender DID. #[arg(long)] sender_did: String, /// Recipient DID. #[arg(long)] to: String, /// Amount in the network's smallest native unit. #[arg(long)] amount: u64, /// Sender nonce. Use `sigil query balance ` first. #[arg(long)] nonce: u64, /// 32-byte Ed25519 signing key as lowercase hex. #[arg(long, conflicts_with = "signing_key_file")] signing_key_hex: Option, /// File containing a 32-byte Ed25519 signing key as hex. #[arg(long, conflicts_with = "signing_key_hex")] signing_key_file: Option, }, /// Show the status of the connected node. Status, } ``` Source line: `68`. ## ::GenesisCommands [#genesiscommands] Genesis management subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum GenesisCommands { /// Generate a testnet genesis configuration. Generate { /// Number of validators to include. #[arg(long, default_value_t = 4)] validators: usize, /// Genesis time as Unix timestamp (0 = use current time). #[arg(long, default_value_t = 0)] genesis_time: u64, /// Output file path for the genesis JSON. #[arg(long, default_value = "genesis.json")] output: String, }, /// Validate an existing genesis file. Validate { /// Path to the genesis file. #[arg(long, default_value = "genesis.json")] genesis: String, }, /// Display summary information about a genesis file. Show { /// Path to the genesis file. #[arg(long, default_value = "genesis.json")] genesis: String, }, } ``` Source line: `207`. ## ::NodeCommands [#nodecommands] Node management subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum NodeCommands { /// Start the node with the given configuration. Start { /// Path to the node config file (TOML). #[arg(long, default_value = "config.toml")] config: String, /// Node operating mode. #[arg(long, default_value = "validator")] mode: String, /// Data directory. #[arg(long, default_value = "./data")] data_dir: String, /// P2P listen address. #[arg(long, default_value = "0.0.0.0:26656")] p2p_addr: String, /// RPC listen address. #[arg(long, default_value = "0.0.0.0:12618")] rpc_addr: String, /// Validator DID (required for validator/producer modes). #[arg(long)] validator_did: Option, }, /// Show the node's sync status. Status, /// Show node info (chain ID, version, mode). Info, /// List connected peers. Peers, } ``` Source line: `236`. ## ::ValidatorCommands [#validatorcommands] Validator management subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum ValidatorCommands { /// Register as a validator. Register { /// Validator OAS DID. #[arg(long)] did: String, /// Initial stake in micro-MINT. #[arg(long)] stake: u64, /// Validator mode: "producer" or "validator". #[arg(long, default_value = "validator")] mode: String, /// Human root DID for lineage verification. #[arg(long)] human_root: String, }, /// Show this node's validator keys. ShowKeys { /// Data directory. #[arg(long, default_value = "./data")] data_dir: String, }, /// Generate new testnet validator keys. GenerateKeys { /// Validator DID to generate keys for. #[arg(long)] did: String, /// Data directory to write keys to. #[arg(long, default_value = "./data")] data_dir: String, }, } ``` Source line: `268`. ## ::StakeCommands [#stakecommands] Staking subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum StakeCommands { /// Deposit stake to become a validator. Deposit { /// Amount in micro-MINT. amount: u64, /// Validator mode: "producer" or "validator". #[arg(long)] mode: String, }, /// Withdraw stake (begins unbonding period). Withdraw { /// Amount in micro-MINT. amount: u64, }, /// Delegate stake to a validator. Delegate { /// Validator DID. validator: String, /// Amount in micro-MINT. amount: u64, }, /// Undelegate stake from a validator. Undelegate { /// Validator DID. validator: String, /// Amount in micro-MINT. amount: u64, }, /// Show accumulated rewards. Rewards, } ``` Source line: `303`. ## ::GovCommands [#govcommands] Governance subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum GovCommands { /// Submit a governance proposal. Propose { /// Proposal title. title: String, /// Proposal description. #[arg(long)] description: String, }, /// Vote on a governance proposal. Vote { /// Proposal ID. proposal_id: String, /// Vote choice: yes, no, abstain, no_with_veto. choice: String, }, /// List all proposals. ListProposals, /// Show details of a specific proposal. ShowProposal { /// Proposal ID. proposal_id: String, }, } ``` Source line: `337`. ## ::QueryCommands [#querycommands] Query subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum QueryCommands { /// Query balance and nonce by DID. Balance { /// Account DID. did: String, }, /// Query a block by height (defaults to latest). Block { /// Block height (omit for latest). #[arg(long)] height: Option, }, /// Query a transaction by hash. Tx { /// Transaction hash (hex). hash: String, }, /// Query a state value by partition and key. State { /// State partition (e.g. "identity", "stakes"). partition: String, /// State key. key: String, }, /// Query validator info by DID. Validator { /// Validator DID. did: String, }, } ``` Source line: `364`. ## ::LaborCommands [#laborcommands] Labor marketplace subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum LaborCommands { /// Post a labor job. PostJob { #[arg(long)] job_id: String, #[arg(long)] poster_did: String, #[arg(long)] budget: u128, /// Sender nonce. Required when submitting. #[arg(long)] nonce: Option, /// 32-byte Ed25519 signing key as lowercase hex. #[arg(long, conflicts_with = "signing_key_file")] signing_key_hex: Option, /// File containing a 32-byte Ed25519 signing key as hex. #[arg(long, conflicts_with = "signing_key_hex")] signing_key_file: Option, }, /// Submit a bid for a job. SubmitBid { #[arg(long)] bid_id: String, #[arg(long)] job_id: String, #[arg(long)] bidder_did: String, #[arg(long)] price: u128, }, /// Accept a submitted bid. AcceptBid { #[arg(long)] job_id: String, #[arg(long)] bid_id: String, }, /// Fund contract escrow. FundEscrow { #[arg(long)] contract_id: String, #[arg(long)] funder_did: String, #[arg(long)] amount: u128, }, /// Open and fund a bounty-style Labor offer. OpenOffer { #[arg(long)] offer_id: String, #[arg(long)] sponsor_did: String, #[arg(long, default_value = "SIGIL")] token_id: String, #[arg(long)] total_funding: u128, #[arg(long)] per_claim_payout_cap: u128, #[arg(long)] claim_bond: u128, #[arg(long)] spam_fee: u128, #[arg(long)] max_claims: u32, #[arg(long)] claim_window_start_block: u64, #[arg(long)] claim_window_end_block: u64, #[arg(long)] claim_timeout_blocks: u64, #[arg(long)] verification_mode: String, #[arg(long = "verifier-did")] verifier_dids: Vec, #[arg(long)] threshold: u32, #[arg(long)] title_commitment: String, #[arg(long)] description_commitment: String, #[arg(long)] category: String, #[arg(long)] escrow_account_did: String, #[arg(long = "required-skill")] required_skills: Vec, #[arg(long = "required-attestation")] required_attestations: Vec, #[arg(long)] artifact_policy_commitment: Option, }, /// Submit a bonded claim against an open Labor offer. SubmitClaim { #[arg(long)] claim_id: String, #[arg(long)] offer_id: String, #[arg(long)] claimant_did: String, #[arg(long)] deliverable_hash: String, #[arg(long = "evidence-hash")] evidence_hashes: Vec, #[arg(long)] requested_payout: u128, }, /// Attest a claim against an open Labor offer. AttestClaim { #[arg(long)] attestation_id: String, #[arg(long)] claim_id: String, #[arg(long)] offer_id: String, #[arg(long)] attester_did: String, #[arg(long)] verdict: String, #[arg(long)] reason_commitment: Option, }, /// Cancel an open Labor offer after active claims settle or time out. CancelOffer { #[arg(long)] offer_id: String, #[arg(long)] sponsor_did: String, #[arg(long)] reason: Option, }, /// Submit a milestone deliverable. SubmitMilestone { #[arg(long)] contract_id: String, #[arg(long)] milestone_index: u32, #[arg(long)] deliverable_id: String, #[arg(long)] payload_hash: String, #[arg(long)] worker_did: String, }, /// Attest/approve a submitted milestone. ApproveMilestone { #[arg(long)] contract_id: String, #[arg(long)] milestone_index: u32, #[arg(long)] attestation_id: String, #[arg(long)] attester_did: String, }, /// Release payment for an attested milestone. ReleaseMilestone { #[arg(long)] contract_id: String, #[arg(long)] milestone_index: u32, }, /// Open a labor dispute. OpenDispute { #[arg(long)] dispute_id: String, #[arg(long)] contract_id: String, #[arg(long)] raiser_did: String, #[arg(long)] cause: String, }, /// Resolve a labor dispute. ResolveDispute { #[arg(long)] dispute_id: String, #[arg(long)] resolver_did: String, #[arg(long)] resolution: String, }, /// Inspect live labor state through RPC. Inspect { #[arg(long)] job_id: Option, #[arg(long)] bid_id: Option, #[arg(long)] contract_id: Option, #[arg(long)] dispute_id: Option, #[arg(long)] offer_id: Option, #[arg(long)] claim_id: Option, #[arg(long)] account_did: Option, }, } ``` Source line: `397`. ## ::UsernameCommands [#usernamecommands] Username registration and lookup subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum UsernameCommands { /// Register an @username for a DID. Register { #[arg(long)] name: String, #[arg(long)] owner_did: String, #[arg(long, default_value_t = 1)] years: u32, /// Optional 32-byte metadata CID/hash as hex. #[arg(long)] metadata_cid: Option, }, /// Resolve a username to its owner record. Lookup { #[arg(long)] name: String, }, /// Resolve a DID's primary username. Reverse { #[arg(long)] did: String, }, } ``` Source line: `599`. ## ::IdentityCommands [#identitycommands] On-chain identity document subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum IdentityCommands { /// Register a DID document for the signing key. Register { /// DID subject to register. Must match the transaction sender. #[arg(long)] did: String, /// Optional canonical DID document JSON or path. Defaults to a minimal Ed25519 DID document. #[arg(long)] document_json: Option, /// Initial conformance level. #[arg(long, default_value = "L1")] conformance_level: String, }, } ``` Source line: `626`. ## ::ContractCommands [#contractcommands] Smart-contract deployment subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum ContractCommands { /// Register WASM bytecode by content hash before deployment. RegisterCode { /// Path to a WASM bytecode file. #[arg(long)] code: String, /// SPDX license expression or governance-approved license label. #[arg(long)] license: String, /// Optional source artifact URI. #[arg(long)] source_uri: Option, /// Optional BLAKE3/Sigil hash of the source artifact. #[arg(long)] source_hash: Option, /// Optional audit report URI. #[arg(long)] audit_uri: Option, /// Optional JSON object string for deterministic metadata. #[arg(long)] metadata_json: Option, }, /// Deploy a contract from previously registered bytecode. Deploy { /// Contract DID to create. #[arg(long)] contract_did: String, /// Hex or `blake3:` code hash registered on-chain. #[arg(long)] code_hash: String, /// Optional Organization Zone ID. #[arg(long)] zone_id: Option, }, } ``` Source line: `643`. ## ::MailCommands [#mailcommands] Native Sigil Mail registry subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum MailCommands { /// Create a mailbox from canonical MailCreateMailboxData JSON. CreateMailbox { /// Inline JSON or a path to a JSON file. #[arg(long)] data_json: String, }, /// Resolve a mailbox route, alias, DID, wallet, or .sigil name. Resolve { #[arg(long)] route_or_name: String, }, /// Fetch one mailbox capability record. GetMailbox { #[arg(long)] mailbox_id: String, }, /// List mailboxes owned by a subject DID. ListByOwner { #[arg(long)] subject_did: String, }, /// Fetch the current or a historical receive policy. Policy { #[arg(long)] mailbox_id: String, #[arg(long)] version: Option, }, /// List active mail public keys. Keys { #[arg(long)] mailbox_id: String, #[arg(long)] purpose: Option, }, /// Fetch one delivery commitment. Delivery { #[arg(long)] delivery_commitment_id: String, }, /// Scan delivery commitments by recipient mailbox. DeliveriesByRecipient { #[arg(long)] mailbox_id: String, #[arg(long)] cursor: Option, #[arg(long, default_value_t = 100)] limit: u32, }, } ``` Source line: `681`. ## ::SnsCommands [#snscommands] Sigil Name System subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum SnsCommands { /// Register a .sigil name through the reveal path. RegisterName { #[arg(long)] name: String, #[arg(long)] owner_did: String, #[arg(long, default_value_t = 1)] years: u8, #[arg(long)] salt: String, #[arg(long)] reveal_nonce: String, #[arg(long)] client_nonce: String, }, /// Resolve a name and all public resolver records. ResolveName { #[arg(long)] name: String, }, /// Fetch resolver records for a name. GetRecords { #[arg(long)] name: String, }, /// Resolve a mail route through SNS. ResolveMail { #[arg(long)] route_or_name: String, }, /// Resolve public website records. ResolveWebsite { #[arg(long)] name: String, }, } ``` Source line: `735`. ## ::CrucibleCommands [#cruciblecommands] Crucible training coordination subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum CrucibleCommands { /// Open a training run and escrow its reward pool. Open { #[arg(long)] run_id: String, #[arg(long)] coordinator_did: String, #[arg(long)] reward_pool: u64, #[arg(long, default_value = "MINT")] reward_token_id: String, #[arg(long)] model_family: String, #[arg(long)] objective_cid: String, #[arg(long)] objective_blake3: String, #[arg(long, default_value_t = 1)] policy_version: u32, #[arg(long, default_value = "coordinator_signed")] verifier_mode: String, #[arg(long, default_value_t = 1)] min_verifier_attestations: u32, #[arg(long, default_value_t = 8)] max_staleness_epochs: u64, #[arg(long = "verifier-did")] verifier_dids: Vec, #[arg(long = "publisher-did")] publisher_dids: Vec, #[arg(long)] deadline_epoch: Option, }, /// Commit an off-chain rollout batch root and reward budget. CommitRollout { #[arg(long)] run_id: String, #[arg(long)] batch_id: String, #[arg(long)] artifact_cid: String, #[arg(long)] artifact_blake3: String, #[arg(long)] environment_cid: String, #[arg(long)] environment_blake3: String, #[arg(long)] rollout_root: String, #[arg(long)] metrics_root: String, #[arg(long)] policy_digest: String, #[arg(long)] sample_count: u64, #[arg(long)] total_reward: u64, #[arg(long)] committed_by_did: String, #[arg(long)] committed_at_epoch: u64, #[arg(long, default_value = "coordinator_signed")] verifier_mode: String, #[arg(long, default_value_t = 1)] policy_version: u32, }, /// Submit a signed reward attestation for a rollout batch. AttestRewards { #[arg(long)] run_id: String, #[arg(long)] batch_id: String, #[arg(long)] attestation_id: String, #[arg(long)] verifier_did: String, #[arg(long)] rewards_json: String, #[arg(long)] artifact_cid: String, #[arg(long)] artifact_blake3: String, #[arg(long, default_value_t = 1)] policy_version: u32, #[arg(long)] attested_at_epoch: u64, }, /// Publish a model weight root and artifact commitment. PublishWeights { #[arg(long)] run_id: String, #[arg(long)] model_root: String, #[arg(long)] artifact_cid: String, #[arg(long)] artifact_blake3: String, #[arg(long)] publisher_did: String, #[arg(long)] previous_root: Option, #[arg(long)] rollout_batch_id: Option, #[arg(long)] published_at_epoch: u64, }, /// Record slash evidence and apply a slash amount. Slash { #[arg(long)] run_id: String, #[arg(long)] slash_id: String, #[arg(long)] offender_did: String, #[arg(long)] reporter_did: String, #[arg(long)] reason: String, #[arg(long)] evidence_cid: String, #[arg(long)] evidence_blake3: String, #[arg(long)] amount: u64, }, /// Close or cancel a training run. Close { #[arg(long)] run_id: String, #[arg(long)] reason: String, #[arg(long)] closed_at_epoch: Option, }, /// Inspect live Crucible state through RPC. Inspect { #[arg(long)] run_id: Option, #[arg(long)] batch_id: Option, #[arg(long)] model_root: Option, #[arg(long, default_value_t = false)] rewards: bool, #[arg(long, default_value_t = false)] slashes: bool, #[arg(long, default_value_t = false)] events: bool, }, } ``` Source line: `775`. ## ::NftCommands [#nftcommands] NFT subcommands. Transaction commands (create-collection, mint, transfer, burn, set-metadata, verify-identity) build and submit signed transactions. Query commands (get-collection, get-token, owner, did, events) call the JSON-RPC query methods and pretty-print the response. ```rust #[derive(Debug, Clone, Subcommand)] pub enum NftCommands { // -- Transaction commands -- /// Create a new NFT collection on-chain. CreateCollection { /// Unique collection identifier (e.g. "my-badges"). #[arg(long)] id: String, /// Human-readable collection name. #[arg(long)] name: String, /// Short ticker symbol (e.g. "BADGE"). #[arg(long, default_value = "NFT")] symbol: String, /// Collection kind: "standard" or "identity". #[arg(long, default_value = "standard")] kind: String, /// Issuer DID (must match the wallet's active DID). #[arg(long)] issuer_did: String, /// Controller DID (may differ from issuer). #[arg(long)] controller_did: Option, /// Start tokens locked by default (soulbound). #[arg(long, default_value_t = false)] default_locked: bool, /// Allow metadata updates after mint. #[arg(long, default_value_t = false)] allow_metadata_updates: bool, /// Optional collection-level metadata URI. #[arg(long)] metadata_uri: Option, }, /// Mint a new NFT token into an existing collection. Mint { /// Collection ID to mint into. #[arg(long)] collection: String, /// Token ID to assign (decimal u128). #[arg(long)] token_id: String, /// Recipient DID (owner of the new token). #[arg(long)] owner: String, /// Per-token metadata URI. #[arg(long)] metadata_uri: Option, /// BLAKE3 metadata hash (hex). #[arg(long)] metadata_hash: Option, /// Override collection default_locked for this token. #[arg(long)] locked: Option, /// DID of the identity subject (identity collections only). #[arg(long)] identity_subject: Option, /// Identity kind: agent | human | mhr | enr | ao | app. #[arg(long)] identity_kind: Option, /// Root anchor DID (identity collections only). #[arg(long)] identity_root: Option, /// Root kind: hmr | mhr | enr. #[arg(long)] root_kind: Option, }, /// Transfer an NFT token to a new owner. Transfer { /// Collection ID containing the token. #[arg(long)] collection: String, /// Token ID to transfer (decimal u128). #[arg(long)] token_id: String, /// Recipient DID. #[arg(long)] to: String, }, /// Burn (destroy) an NFT token. Burn { /// Collection ID containing the token. #[arg(long)] collection: String, /// Token ID to burn (decimal u128). #[arg(long)] token_id: String, }, /// Update the metadata URI and/or hash of an NFT (ERC-4906). SetMetadata { /// Collection ID containing the token. #[arg(long)] collection: String, /// Token ID whose metadata to update (decimal u128). #[arg(long)] token_id: String, /// New metadata URI. #[arg(long)] uri: Option, /// New metadata hash (BLAKE3 hex). #[arg(long)] hash: Option, }, /// Advance the verification level on an identity NFT. VerifyIdentity { /// Collection ID containing the identity token. #[arg(long)] collection: String, /// Token ID (decimal u128). #[arg(long)] token_id: String, /// New verification level (0-255; must be >= current). #[arg(long)] level: u8, /// Optional human-readable verification note. #[arg(long)] note: Option, }, // -- Query commands -- /// Fetch an NFT collection record. GetCollection { /// Collection ID to look up. collection_id: String, }, /// Fetch a single NFT token. GetToken { /// Collection ID. collection: String, /// Token ID (decimal u128). token_id: String, }, /// List all NFTs owned by a DID. Owner { /// Owner DID. did: String, /// Maximum number of results (default: 50). #[arg(long, default_value_t = 50)] limit: usize, /// Result offset for pagination (default: 0). #[arg(long, default_value_t = 0)] offset: usize, }, /// Fetch the DID-identity index for a subject DID. Did { /// Subject DID. subject_did: String, }, /// List NFT lifecycle events. Events { /// Filter by collection ID. #[arg(long)] collection: Option, /// Filter by owner DID (matches from_did or to_did). #[arg(long)] owner: Option, /// Filter by event kind (mint | transfer | burn | metadata_update | /// locked | unlocked | identity_verified). #[arg(long)] kind: Option, /// Maximum number of events to return (default: 50). #[arg(long, default_value_t = 50)] limit: usize, }, } ``` Source line: `933`. ## ::DexCommands [#dexcommands] DEX subcommands for pool creation, quotes, swaps, liquidity, and positions. ```rust #[derive(Debug, Clone, Subcommand)] pub enum DexCommands { /// Create a constant-product pool with initial liquidity. CreatePool { #[arg(long)] asset_a: String, #[arg(long)] asset_b: String, #[arg(long)] amount_a: u64, #[arg(long)] amount_b: u64, #[arg(long, default_value_t = 30)] fee_bps: u16, #[arg(long, default_value_t = 1)] min_lp_shares: u64, #[arg(long)] expiration_height: Option, }, /// Quote a swap without submitting a transaction. Quote { #[arg(long)] pool: String, #[arg(long)] asset_in: String, #[arg(long)] amount_in: u64, }, /// Swap an exact input amount through a pool. SwapExactIn { #[arg(long)] pool: String, #[arg(long)] asset_in: String, #[arg(long)] amount_in: u64, #[arg(long)] min_out: u64, #[arg(long)] recipient: String, #[arg(long)] expiration_height: Option, }, /// Add proportional liquidity to an existing pool. AddLiquidity { #[arg(long)] pool: String, #[arg(long)] amount_a: u64, #[arg(long)] amount_b: u64, #[arg(long)] min_a: u64, #[arg(long)] min_b: u64, #[arg(long, default_value_t = 1)] min_lp_shares: u64, #[arg(long)] expiration_height: Option, }, /// Remove liquidity from a pool. RemoveLiquidity { #[arg(long)] pool: String, #[arg(long)] lp_shares: u64, #[arg(long)] min_a: u64, #[arg(long)] min_b: u64, #[arg(long)] recipient: String, #[arg(long)] expiration_height: Option, }, /// Inspect an LP position. Position { #[arg(long)] owner: String, #[arg(long)] pool: Option, }, } ``` Source line: `1108`. ## ::TokenCommands [#tokencommands] Custom token subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum TokenCommands { /// Read a launch-live custom token class. Class { #[arg(long)] token_id: String, }, /// Read a launch-live custom token balance for one DID. Balance { #[arg(long)] token_id: String, #[arg(long)] owner_did: String, }, /// Create a launch-live custom token class. CreateClass { #[arg(long)] token_id: String, #[arg(long)] ticker: String, #[arg(long)] decimals: u8, #[arg(long)] issuer_did: String, #[arg(long)] controller_did: Option, #[arg(long)] max_supply: Option, #[arg(long)] metadata_uri: Option, }, /// Mint custom-token units to a DID. Mint { #[arg(long)] token_id: String, #[arg(long)] recipient_did: String, #[arg(long)] amount: u128, }, /// Transfer custom-token units. Transfer { #[arg(long)] token_id: String, #[arg(long)] recipient_did: String, #[arg(long)] amount: u128, #[arg(long)] memo: Option, }, /// Burn custom-token units from an owner account. Burn { #[arg(long)] token_id: String, #[arg(long)] owner_did: String, #[arg(long)] amount: u128, }, /// Update the controlled supply policy for a custom token. SetPolicy { #[arg(long)] token_id: String, #[arg(long)] max_supply: Option, }, } ``` Source line: `1193`. ## ::NovaCommands [#novacommands] Nova subcommands for world, parcel, avatar, building, and auction inspection/submission. ```rust #[derive(Debug, Clone, Subcommand)] pub enum NovaCommands { /// Create a new Nova world with a JSON config. CreateWorld { #[arg(long)] name: String, /// Inline JSON or a path to a JSON file. #[arg(long)] config_json: String, }, /// Inspect a Nova world or list worlds when no world id is provided. World { #[arg(long)] world_id: Option, }, /// Claim a parcel in a Nova world. ClaimParcel { #[arg(long)] world_id: String, #[arg(long, allow_hyphen_values = true)] region_x: i32, #[arg(long, allow_hyphen_values = true)] region_z: i32, #[arg(long)] local_x: u16, #[arg(long)] local_z: u16, #[arg(long, default_value = "residential")] parcel_type: String, }, /// Transfer a parcel to another DID. TransferParcel { #[arg(long)] world_id: String, #[arg(long, allow_hyphen_values = true)] region_x: i32, #[arg(long, allow_hyphen_values = true)] region_z: i32, #[arg(long)] local_x: u16, #[arg(long)] local_z: u16, #[arg(long)] to_did: String, }, /// Register a building placement on a Nova parcel. RegisterBuilding { #[arg(long)] world_id: String, #[arg(long, allow_hyphen_values = true)] region_x: i32, #[arg(long, allow_hyphen_values = true)] region_z: i32, #[arg(long)] local_x: u16, #[arg(long)] local_z: u16, #[arg(long)] asset_did: String, #[arg(long)] polycount: u32, #[arg(long)] building_id: Option, }, /// Register an avatar profile in a Nova world. RegisterAvatar { #[arg(long)] world_id: String, #[arg(long)] avatar_asset_did: Option, }, /// Open an auction for a seller-owned parcel. AuctionCreate { #[arg(long)] world_id: String, #[arg(long, allow_hyphen_values = true)] region_x: i32, #[arg(long, allow_hyphen_values = true)] region_z: i32, #[arg(long)] local_x: u16, #[arg(long)] local_z: u16, #[arg(long)] reserve_amount: u64, #[arg(long)] closes_at_height: u64, }, /// Inspect an auction record. AuctionInspect { #[arg(long)] auction_id: String, }, /// Bid on a Nova auction. AuctionBid { #[arg(long)] auction_id: String, #[arg(long)] amount: u64, }, /// Settle a closed Nova auction. AuctionSettle { #[arg(long)] auction_id: String, }, /// Set zone permissions. SetZonePermissions { #[arg(long)] zone_id: String, #[arg(long, default_value = "public")] enter: String, #[arg(long, default_value = "public")] interact: String, #[arg(long, default_value = "owner")] build: String, }, } ``` Source line: `1263`. ## ::ComputeCommands [#computecommands] Compute marketplace subcommands (feature-gated). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Subcommand)] pub enum ComputeCommands { /// Register as a compute provider. RegisterProvider { /// Stake tier: "consumer", "professional", "enterprise", "cluster". #[arg(long)] tier: String, }, /// List all registered compute providers. ListProviders, /// Select a provider for a model and verification tier. SelectProvider { #[arg(long)] model_id: String, #[arg(long)] verification_tier: String, }, /// Create a compute job through the canonical dispatch_compute flow. CreateJob { #[arg(long)] contract_did: String, #[arg(long)] model_id: String, #[arg(long)] input_commitment: String, #[arg(long)] max_cost: u64, #[arg(long)] verification_tier: String, #[arg(long)] mandate_id: String, }, /// Fund compute escrow. FundEscrow { #[arg(long)] owner_did: String, #[arg(long)] amount: u64, #[arg(long)] mandate_id: Option, #[arg(long)] budget_limit: Option, }, /// Withdraw available compute escrow. WithdrawEscrow { #[arg(long)] owner_did: String, #[arg(long)] amount: u64, }, /// Inspect compute escrow. Escrow { #[arg(long)] owner_did: String, }, /// Inspect or submit compute receipts. Receipt { #[command(subcommand)] cmd: ComputeReceiptCommands, }, /// Inspect or resolve compute challenges. Challenge { #[command(subcommand)] cmd: ComputeChallengeCommands, }, /// Inspect MACA compute epochs and quorum proofs. Maca { #[command(subcommand)] cmd: ComputeMacaCommands, }, /// Show accumulated compute earnings. Earnings, /// Attest local hardware for compute marketplace. AttestHardware, } ``` Source line: `1383`. ## ::StorageCommands [#storagecommands] Storage Pinning Marketplace subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum StorageCommands { /// Register as a Weave/Weft storage provider. RegisterProvider { #[arg(long)] provider_did: String, #[arg(long)] capacity_gib: u64, #[arg(long, value_delimiter = ',')] regions: Vec, #[arg(long)] price_per_gib_epoch: u64, #[arg(long, default_value_t = 0)] retrieval_price_per_gib: u64, #[arg(long)] replication_guarantee: u16, #[arg(long)] stake: u64, #[arg(long)] provider_pubkey_hex: String, }, /// Update provider capacity, pricing, regions, or signing key. UpdateProvider { #[arg(long)] provider_did: String, #[arg(long)] capacity_gib: Option, #[arg(long, value_delimiter = ',')] regions: Option>, #[arg(long)] price_per_gib_epoch: Option, #[arg(long)] retrieval_price_per_gib: Option, #[arg(long)] replication_guarantee: Option, #[arg(long)] provider_pubkey_hex: Option, }, /// Begin provider exit. ExitProvider { #[arg(long)] provider_did: String, }, /// Request replicated pinning for an artifact commitment. RequestPin { #[arg(long)] owner_did: String, #[arg(long)] artifact_json: String, #[arg(long)] duration_epochs: u64, #[arg(long)] replication_factor: u16, #[arg(long)] max_price_per_gib_epoch: u64, #[arg(long)] escrowed_amount: u64, #[arg(long)] expires_at_height: Option, }, /// Accept a pin request as a registered provider. AcceptPin { #[arg(long)] request_id: String, #[arg(long)] provider_did: String, #[arg(long)] accepted_price_per_gib_epoch: u64, }, /// Settle a provider's signed pin receipt. SettleReceipt { #[arg(long)] receipt_json: String, }, /// Open a proof-of-possession challenge. Challenge { #[arg(long)] contract_id: String, #[arg(long)] challenger_did: String, #[arg(long, value_delimiter = ',')] sample_indices: Vec, #[arg(long)] response_window_blocks: u64, }, /// Resolve a challenge with sampled Weft chunk proofs. ResolveChallenge { #[arg(long)] challenge_id: String, #[arg(long)] proof_json: String, }, /// List storage providers. ListProviders, /// Inspect a storage provider. Provider { #[arg(long)] provider_did: String, }, /// Inspect a storage pin request. PinRequest { #[arg(long)] request_id: String, }, /// Inspect a storage pin contract. Contract { #[arg(long)] contract_id: String, }, /// Inspect a storage pin receipt. Receipt { #[arg(long)] receipt_id: String, }, /// Inspect a storage challenge. ChallengeStatus { #[arg(long)] challenge_id: String, }, } ``` Source line: `1460`. ## ::ComputeReceiptCommands [#computereceiptcommands] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Subcommand)] pub enum ComputeReceiptCommands { /// Submit a provider-signed receipt for deterministic settlement. Settle { #[arg(long)] receipt_json: String, }, /// Fetch a settled compute receipt. Get { #[arg(long)] receipt_id: String, }, /// Fetch compute proof metadata for a receipt. Proof { #[arg(long)] receipt_id: String, }, } ``` Source line: `1582`. ## ::ComputeChallengeCommands [#computechallengecommands] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Subcommand)] pub enum ComputeChallengeCommands { /// Open a challenge against a compute receipt. Open { #[arg(long)] receipt_id: String, #[arg(long)] challenger_did: String, #[arg(long)] evidence_json: String, #[arg(long)] deposit: Option, }, /// Resolve an open challenge. Resolve { #[arg(long)] challenge_id: String, #[arg(long)] resolution_json: String, }, /// Fetch one challenge. Get { #[arg(long)] challenge_id: String, }, /// List challenges for a receipt. List { #[arg(long)] receipt_id: String, }, } ``` Source line: `1602`. ## ::ComputeMacaCommands [#computemacacommands] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Subcommand)] pub enum ComputeMacaCommands { /// Fetch a MACA epoch. Epoch { #[arg(long)] epoch_id: u64, }, /// List MACA epochs. Epochs, /// Fetch a MACA quorum proof. QuorumProof { #[arg(long)] epoch_id: u64, #[arg(long)] work_id: String, }, /// List MACA quorum proofs for an epoch. QuorumProofs { #[arg(long)] epoch_id: u64, }, } ``` Source line: `1635`. ## ::CliError [#clierror] ```rust #[derive(Debug, Error)] pub enum CliError { #[error("rpc: {0}")] Rpc(String), #[error("http: {0}")] Http(#[from] reqwest::Error), #[error("json: {0}")] Json(#[from] serde_json::Error), #[error("invalid signing key: {0}")] SigningKey(String), #[error("unsupported command: {0}")] Unsupported(String), #[error("transaction: {0}")] Transaction(String), } ``` Source line: `1658`. ## ::RpcTransport [#rpctransport] ```rust pub trait RpcTransport { fn call(&self, method: &str, params: Value) -> Result; } ``` Source line: `1673`. ## ::RpcClient [#rpcclient] ```rust #[derive(Debug, Clone)] pub struct RpcClient { } ``` Source line: `1678`. ## ::RpcClient::new [#rpcclientnew] ```rust pub fn new(endpoint: impl Into) -> Result; ``` Source line: `1684`. ## ::normalize\_rpc\_url [#normalize_rpc_url] ```rust pub fn normalize_rpc_url(mut endpoint: String) -> String; ``` Source line: `1715`. ## ::run\_cli [#run_cli] ```rust pub fn run_cli(cli: Cli) -> Result; ``` Source line: `1726`. ## ::execute\_cli [#execute_cli] ```rust pub fn execute_cli(cli: Cli) -> Result; ``` Source line: `1731`. ## ::dispatch\_command [#dispatch_command] ```rust pub fn dispatch_command(cli: &Cli, rpc: &dyn RpcTransport) -> Result; ``` Source line: `1735`. ## ::run\_cli\_with\_rpc [#run_cli_with_rpc] ```rust pub fn run_cli_with_rpc(cli: &Cli, rpc: &dyn RpcTransport) -> Result; ``` Source line: `1739`. # sigil-cli · genesis_ceremony URL: https://docs.sigil.ml/reference/rust/sigil-cli/genesis_ceremony Markdown: https://docs.sigil.ml/reference/rust/sigil-cli/genesis_ceremony.md Source declarations, signatures and documentation for genesis_ceremony. Source: `sigil/node/sigil-cli/src/genesis_ceremony.rs`. SHA-256: `7890ff2a602cad285c769a26003ac14eb339e7d853292d1591af56c5348ec72e`. 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. ## genesis\_ceremony::GenesisCeremonyError [#genesis_ceremonygenesisceremonyerror] ```rust #[derive(Debug, thiserror::Error)] pub enum GenesisCeremonyError { #[error("missing CSV header")] MissingCsvHeader, #[error("missing field {field} on CSV line {line}")] MissingField { line: usize, field: &'static str }, #[error("invalid generation on CSV line {line}: {value}")] InvalidGeneration { line: usize, value: String }, #[error("invalid stake on CSV line {line}: {value}")] InvalidStake { line: usize, value: String }, #[error("invalid validator mode on CSV line {line}: {value}")] InvalidMode { line: usize, value: String }, #[error("claim chain_id {actual} does not match expected {expected}")] ClaimChainIdMismatch { expected: String, actual: String }, #[error("duplicate validator DID in ceremony claims: {0}")] DuplicateValidatorDid(String), #[error("invalid hex field {field}: {reason}")] InvalidHex { field: &'static str, reason: String }, #[error("invalid validator possession signature for {did}: {field}")] InvalidSignature { did: String, field: &'static str }, #[error("duplicate commit/reveal id: {0}")] DuplicateCommitmentId(String), #[error("missing reveal for commitment id: {0}")] MissingReveal(String), #[error("unexpected reveal without commitment id: {0}")] UnexpectedReveal(String), #[error("commitment mismatch for id {id}: expected {expected}, got {actual}")] CommitmentMismatch { id: String, expected: String, actual: String, }, #[error("invalid signature threshold {threshold} for {signer_count} signer(s)")] InvalidThreshold { threshold: usize, signer_count: usize, }, #[error("duplicate ceremony signer id: {0}")] DuplicateSignerId(String), #[error("duplicate genesis signature from signer id: {0}")] DuplicateGenesisSignature(String), #[error("genesis signature references unknown signer id: {0}")] UnknownGenesisSigner(String), #[error( "genesis signature bundle hash {bundle_hash} does not match genesis hash {genesis_hash}" )] GenesisSignatureHashMismatch { bundle_hash: String, genesis_hash: String, }, #[error("genesis signature threshold not met: valid {valid}, required {threshold}")] GenesisSignatureThresholdNotMet { valid: usize, threshold: usize }, #[error("genesis validation failed: {0}")] GenesisValidation(#[from] GenesisValidationError), #[error("invalid Vigil event source kind: {0}")] InvalidVigilSourceKind(String), #[error("system contract {id} code hash mismatch: expected {expected}, got {actual}")] SystemContractHashMismatch { id: String, expected: String, actual: String, }, #[error("unknown live system contract id in registry: {0}")] UnknownSystemContractId(String), #[error("genesis serialization failed: {0}")] GenesisSerialization(#[from] sigil_core::error::CoreError), #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("JSON error: {0}")] Json(#[from] serde_json::Error), } ``` Source line: `22`. ## genesis\_ceremony::CeremonyValidator [#genesis_ceremonyceremonyvalidator] ```rust #[derive(Debug, Clone, PartialEq)] pub struct CeremonyValidator { pub validator: GenesisValidator, pub operator: String, pub jurisdiction: String, pub hmr: String } ``` Source line: `94`. ## genesis\_ceremony::CeremonyAllocation [#genesis_ceremonyceremonyallocation] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CeremonyAllocation { pub did: String, pub amount: u64 } ``` Source line: `102`. ## genesis\_ceremony::UnsignedValidatorClaim [#genesis_ceremonyunsignedvalidatorclaim] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UnsignedValidatorClaim { pub chain_id: String, pub did: String, pub human_root_did: String, pub generation: u32, pub stake: u64, pub mode: String, pub consensus_pubkey: String, pub network_pubkey: String, pub operator: String, pub jurisdiction: String, pub hmr: String } ``` Source line: `108`. ## genesis\_ceremony::SignedValidatorClaim [#genesis_ceremonysignedvalidatorclaim] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SignedValidatorClaim { pub claim: UnsignedValidatorClaim, pub consensus_signature: String, pub network_signature: String } ``` Source line: `123`. ## genesis\_ceremony::CommitmentRecord [#genesis_ceremonycommitmentrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CommitmentRecord { pub id: String, pub commitment_hash: String } ``` Source line: `130`. ## genesis\_ceremony::RevealRecord [#genesis_ceremonyrevealrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevealRecord { pub id: String, pub value: serde_json::Value, pub salt_hex: String } ``` Source line: `136`. ## genesis\_ceremony::CeremonySigner [#genesis_ceremonyceremonysigner] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CeremonySigner { pub signer_id: String, pub did: String, pub public_key: String } ``` Source line: `143`. ## genesis\_ceremony::GenesisHashSignature [#genesis_ceremonygenesishashsignature] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GenesisHashSignature { pub signer_id: String, pub signature: String } ``` Source line: `150`. ## genesis\_ceremony::GenesisSignatureBundle [#genesis_ceremonygenesissignaturebundle] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GenesisSignatureBundle { pub chain_id: String, pub genesis_hash: String, pub threshold: usize, pub signers: Vec, pub signatures: Vec } ``` Source line: `156`. ## genesis\_ceremony::CeremonyInputs [#genesis_ceremonyceremonyinputs] ```rust #[derive(Debug, Clone)] pub struct CeremonyInputs { pub chain_id: String, pub genesis_time: u64, pub validators: Vec, pub allocations: Vec, pub challenge_resolver_dids: Vec, pub proposer_dids: Vec, pub beacon_dids: Vec, pub system_contracts_activation_height: Option, pub system_contract_artifact_root: Option, pub vigils_params: Option } ``` Source line: `165`. ## genesis\_ceremony::CeremonyTranscript [#genesis_ceremonyceremonytranscript] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CeremonyTranscript { pub chain_id: String, pub genesis_hash: String, pub validator_count: usize, pub allocation_count: usize, pub challenge_resolver_dids: Vec, pub proposer_dids: Vec, pub beacon_dids: Vec, pub contract_params: Option, pub vigils_params: Option, pub note: String } ``` Source line: `179`. ## genesis\_ceremony::parse\_validator\_roster\_csv [#genesis_ceremonyparse_validator_roster_csv] ```rust pub fn parse_validator_roster_csv( csv: &str, ) -> Result, GenesisCeremonyError>; ``` Source line: `192`. ## genesis\_ceremony::assemble\_genesis\_from\_inputs [#genesis_ceremonyassemble_genesis_from_inputs] ```rust pub fn assemble_genesis_from_inputs( inputs: CeremonyInputs, ) -> Result; ``` Source line: `271`. ## genesis\_ceremony::system\_reference\_contracts\_from\_registry [#genesis_ceremonysystem_reference_contracts_from_registry] ```rust pub fn system_reference_contracts_from_registry( artifact_root: &Path, ) -> Result, GenesisCeremonyError>; ``` Source line: `320`. ## genesis\_ceremony::parse\_vigil\_source\_kinds [#genesis_ceremonyparse_vigil_source_kinds] ```rust pub fn parse_vigil_source_kinds(raw: &str) -> Result, GenesisCeremonyError>; ``` Source line: `415`. ## genesis\_ceremony::genesis\_hash\_hex [#genesis_ceremonygenesis_hash_hex] ```rust pub fn genesis_hash_hex(genesis: &GenesisConfig) -> Result; ``` Source line: `455`. ## genesis\_ceremony::validator\_claim\_signing\_bytes [#genesis_ceremonyvalidator_claim_signing_bytes] ```rust pub fn validator_claim_signing_bytes( claim: &UnsignedValidatorClaim, ) -> Result, GenesisCeremonyError>; ``` Source line: `460`. ## genesis\_ceremony::verify\_signed\_validator\_claims [#genesis_ceremonyverify_signed_validator_claims] ```rust pub fn verify_signed_validator_claims( claims: &[SignedValidatorClaim], expected_chain_id: &str, ) -> Result, GenesisCeremonyError>; ``` Source line: `472`. ## genesis\_ceremony::validator\_roster\_csv\_from\_claims [#genesis_ceremonyvalidator_roster_csv_from_claims] ```rust pub fn validator_roster_csv_from_claims(validators: &[CeremonyValidator]) -> String; ``` Source line: `526`. ## genesis\_ceremony::read\_signed\_validator\_claims [#genesis_ceremonyread_signed_validator_claims] ```rust pub fn read_signed_validator_claims( path: &Path, ) -> Result, GenesisCeremonyError>; ``` Source line: `550`. ## genesis\_ceremony::read\_commitments [#genesis_ceremonyread_commitments] ```rust pub fn read_commitments(path: &Path) -> Result, GenesisCeremonyError>; ``` Source line: `557`. ## genesis\_ceremony::read\_reveals [#genesis_ceremonyread_reveals] ```rust pub fn read_reveals(path: &Path) -> Result, GenesisCeremonyError>; ``` Source line: `562`. ## genesis\_ceremony::read\_genesis\_signature\_bundle [#genesis_ceremonyread_genesis_signature_bundle] ```rust pub fn read_genesis_signature_bundle( path: &Path, ) -> Result; ``` Source line: `567`. ## genesis\_ceremony::genesis\_hash\_signing\_bytes [#genesis_ceremonygenesis_hash_signing_bytes] ```rust pub fn genesis_hash_signing_bytes( chain_id: &str, genesis_hash: &str, ) -> Result, GenesisCeremonyError>; ``` Source line: `574`. ## genesis\_ceremony::normalized\_genesis\_hash\_hex [#genesis_ceremonynormalized_genesis_hash_hex] ```rust pub fn normalized_genesis_hash_hex(genesis_hash: &str) -> Result; ``` Source line: `591`. ## genesis\_ceremony::verify\_genesis\_signature\_bundle\_for\_hash [#genesis_ceremonyverify_genesis_signature_bundle_for_hash] ```rust pub fn verify_genesis_signature_bundle_for_hash( bundle: &GenesisSignatureBundle, expected_genesis_hash: &str, ) -> Result; ``` Source line: `596`. ## genesis\_ceremony::verify\_genesis\_signature\_bundle [#genesis_ceremonyverify_genesis_signature_bundle] ```rust pub fn verify_genesis_signature_bundle( bundle: &GenesisSignatureBundle, ) -> Result; ``` Source line: `612`. ## genesis\_ceremony::commitment\_hash\_hex [#genesis_ceremonycommitment_hash_hex] ```rust pub fn commitment_hash_hex( id: &str, value: &serde_json::Value, salt_hex: &str, ) -> Result; ``` Source line: `668`. ## genesis\_ceremony::verify\_commit\_reveal [#genesis_ceremonyverify_commit_reveal] ```rust pub fn verify_commit_reveal( commitments: &[CommitmentRecord], reveals: &[RevealRecord], ) -> Result<(), GenesisCeremonyError>; ``` Source line: `685`. ## genesis\_ceremony::write\_collect\_template [#genesis_ceremonywrite_collect_template] ```rust pub fn write_collect_template(path: &Path) -> Result<(), GenesisCeremonyError>; ``` Source line: `730`. ## genesis\_ceremony::read\_allocations [#genesis_ceremonyread_allocations] ```rust pub fn read_allocations(path: &Path) -> Result, GenesisCeremonyError>; ``` Source line: `736`. ## genesis\_ceremony::transcript\_for\_genesis [#genesis_ceremonytranscript_for_genesis] ```rust pub fn transcript_for_genesis( genesis: &GenesisConfig, allocation_count: usize, challenge_resolver_dids: Vec, proposer_dids: Vec, beacon_dids: Vec, ) -> Result; ``` Source line: `767`. # sigil-cli URL: https://docs.sigil.ml/reference/rust/sigil-cli Markdown: https://docs.sigil.ml/reference/rust/sigil-cli.md Command-line interface for the Sigil blockchain Command-line interface for the Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-cli` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-cli/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_cli` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-cli = { path = "../sigil-cli" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `testnet` | `sigil-node`, `sigil-network` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-cli/crate) — 34 declarations * [genesis\_ceremony](/reference/rust/sigil-cli/genesis_ceremony) — 33 declarations # sigil-compute · bridge_arise URL: https://docs.sigil.ml/reference/rust/sigil-compute/bridge_arise Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/bridge_arise.md Source declarations, signatures and documentation for bridge_arise. Source: `sigil/node/sigil-compute/src/bridge_arise.rs`. SHA-256: `cf567abd0d3e5055d57f977b1d68d8c7afef65385f6e2fded7c37c1b81d01a6d`. 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. ## bridge\_arise::AriseProviderRegistration [#bridge_ariseariseproviderregistration] Wire-compatible provider registration. Mirrors `arise_sigil::provider::ProviderRegistration`. ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct AriseProviderRegistration { pub provider_did: String, pub human_root_did: String, pub tier: AriseProviderTier, pub stake: u64, pub capabilities: serde_json::Value, pub pricing: AriseComputePricing, pub registered_epoch: u64, pub status: AriseProviderStatus } ``` Source line: `32`. ## bridge\_arise::AriseProviderTier [#bridge_ariseariseprovidertier] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum AriseProviderTier { Consumer, Professional, Enterprise, Cluster, } ``` Source line: `44`. ## bridge\_arise::AriseProviderStatus [#bridge_ariseariseproviderstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum AriseProviderStatus { Active, Suspended, Exiting, Exited, } ``` Source line: `52`. ## bridge\_arise::AriseComputePricing [#bridge_arisearisecomputepricing] ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct AriseComputePricing { pub price_per_input_token: u64, pub price_per_output_token: u64, pub price_per_gpu_second: u64, pub min_job_cost: u64 } ``` Source line: `60`. ## bridge\_arise::AriseComputeReceipt [#bridge_arisearisecomputereceipt] Wire-compatible compute receipt. Mirrors `arise_sigil::receipt::ComputeReceipt`. ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct AriseComputeReceipt { pub receipt_id: String, pub job_id: String, pub provider_did: String, pub consumer_did: String, pub model_id: String, pub tokens_in: u64, pub tokens_out: u64, pub gpu_seconds: f64, pub total_cost: u64, pub started_at: String, pub completed_at: String, pub input_hash: SigilHash, pub output_hash: SigilHash, pub receipt_hash: SigilHash, pub provider_signature: Vec } ``` Source line: `70`. ## bridge\_arise::AriseComputeReceipt::from\_sigil [#bridge_arisearisecomputereceiptfrom_sigil] Convert from a Sigil on-chain receipt. Field-for-field mapping; the MACA-only fields (commitments, authority context, TEE) are dropped — arise-bridge's wire format does not carry them today. ```rust pub fn from_sigil(r: &ComputeReceipt) -> Self; ``` Source line: `92`. ## bridge\_arise::AriseSettlementAction [#bridge_arisearisesettlementaction] Wire-compatible settlement action — matches `arise_sigil::settlement::SettlementAction`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AriseSettlementAction { pub receipt: AriseComputeReceipt, pub provider_did: String, pub consumer_did: String, pub amount: u64 } ``` Source line: `120`. ## bridge\_arise::AriseSettlementAction::from\_sigil [#bridge_arisearisesettlementactionfrom_sigil] ```rust pub fn from_sigil(r: &ComputeReceipt) -> Self; ``` Source line: `128`. ## bridge\_arise::T1Outcome [#bridge_ariset1outcome] Result of optimistic verification. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum T1Outcome { Accept, Reject(String), } ``` Source line: `144`. ## bridge\_arise::verify\_t1\_optimistic [#bridge_ariseverify_t1_optimistic] T1 optimistic verification of a Sigil compute receipt. Performs the structural checks that match `arise_verify::optimistic` semantics: * receipt hash matches recomputed canonical hash; * signature length is Ed25519 (64 bytes); * cost is non-zero. ```rust pub fn verify_t1_optimistic(receipt: &ComputeReceipt) -> T1Outcome; ``` Source line: `155`. ## bridge\_arise::T2ProviderResult [#bridge_ariset2providerresult] One provider's contribution to a T2 quorum. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct T2ProviderResult { pub provider_did: String, pub human_root_did: Option, pub output_hash: SigilHash } ``` Source line: `177`. ## bridge\_arise::T2RedundantVerifier [#bridge_ariset2redundantverifier] T2 verifier with Sybil resistance and majority output selection. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct T2RedundantVerifier { pub job_id: String, pub required_providers: usize, pub required_majority: usize } ``` Source line: `185`. ## bridge\_arise::T2Error [#bridge_ariset2error] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", rename_all = "snake_case")] pub enum T2Error { DuplicateProvider { provider_did: String }, DuplicateHumanRoot { human_root_did: String }, Capacity { required: usize, current: usize }, } ``` Source line: `194`. ## bridge\_arise::T2Outcome [#bridge_ariset2outcome] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "outcome", rename_all = "snake_case")] pub enum T2Outcome { Majority { winning_hash: SigilHash, agreeing: Vec, outliers: Vec, }, NoQuorum { votes: HashMap, }, } ``` Source line: `220`. ## bridge\_arise::T2RedundantVerifier::new [#bridge_ariset2redundantverifiernew] ```rust pub fn new(job_id: String, n: usize) -> Self; ``` Source line: `232`. ## bridge\_arise::T2RedundantVerifier::add [#bridge_ariset2redundantverifieradd] ```rust pub fn add(&mut self, r: T2ProviderResult) -> Result<(), T2Error>; ``` Source line: `242`. ## bridge\_arise::T2RedundantVerifier::results [#bridge_ariset2redundantverifierresults] ```rust pub fn results(&self) -> &[T2ProviderResult]; ``` Source line: `273`. ## bridge\_arise::T2RedundantVerifier::tally [#bridge_ariset2redundantverifiertally] Tally output hashes; if any reaches `required_majority`, return its agreeing/outlier provider partition. Otherwise `NoQuorum`. ```rust pub fn tally(&self) -> T2Outcome; ``` Source line: `279`. ## bridge\_arise::T3Outcome [#bridge_ariset3outcome] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum T3Outcome { Accept, Reject(String), } ``` Source line: `327`. ## bridge\_arise::verify\_t3\_attestation [#bridge_ariseverify_t3_attestation] Structural verification of a TEE attestation report. This deliberately fails closed after shape validation. A structurally plausible TEE quote is not a verified attestation until a vendor-specific verifier has checked the report signature, certificate chain, measurement policy, nonce binding, and revocation material. ```rust pub fn verify_t3_attestation(att: &SigilTeeAttestation) -> T3Outcome; ``` Source line: `338`. ## bridge\_arise::verify\_receipt\_for\_tier [#bridge_ariseverify_receipt_for_tier] Selects the appropriate verification path for a Sigil receipt and runs the structural checks for T1 / T3 (T2 quorum is multi-receipt and uses `T2RedundantVerifier` directly). ```rust pub fn verify_receipt_for_tier(receipt: &ComputeReceipt) -> T1Outcome; ``` Source line: `373`. # sigil-compute · crate URL: https://docs.sigil.ml/reference/rust/sigil-compute/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-compute/src/lib.rs`. SHA-256: `fb582083d367ace694104d8dd48d3d61dc90a7a09a100224138bf6b8b0276568`. 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. ## bridge\_arise [#bridge_arise] ```rust pub mod bridge_arise; ``` Source line: `5`. ## dispatch [#dispatch] ```rust pub mod dispatch; ``` Source line: `6`. ## error [#error] ```rust pub mod error; ``` Source line: `7`. ## facade [#facade] ```rust pub mod facade; ``` Source line: `8`. ## selector [#selector] ```rust pub mod selector; ``` Source line: `9`. ## pub use dispatch::\{ComputeJob, JobStatus, VerificationTier}; [#pub-use-dispatchcomputejob-jobstatus-verificationtier] ```rust pub use dispatch::{ComputeJob, JobStatus, VerificationTier}; ``` Source line: `11`. ## pub use error::ComputeError; [#pub-use-errorcomputeerror] ```rust pub use error::ComputeError; ``` Source line: `12`. ## pub use facade::\{ProviderCandidate, ProviderSelector}; [#pub-use-facadeprovidercandidate-providerselector] ```rust pub use facade::{ProviderCandidate, ProviderSelector}; ``` Source line: `13`. ## pub use selector::\{ [#pub-use-selector] MacaCandidate, MacaProviderSelector, MacaWeights, RequiredTier, SelectionRequest, SelectorProviderStatus, }; ```rust pub use selector::{ MacaCandidate, MacaProviderSelector, MacaWeights, RequiredTier, SelectionRequest, SelectorProviderStatus, }; ``` Source line: `14`. # sigil-compute · dispatch URL: https://docs.sigil.ml/reference/rust/sigil-compute/dispatch Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/dispatch.md Source declarations, signatures and documentation for dispatch. Source: `sigil/node/sigil-compute/src/dispatch.rs`. SHA-256: `9d5406b05356ad6b5438a2eb00b4f7c64fb06e9330dea03257bc4e61b7421bc0`. 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. ## dispatch::ComputeJob [#dispatchcomputejob] A compute job submitted by a consumer and assigned to a provider. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeJob { /// Unique identifier for this job (UUID v7 recommended). pub job_id: String, /// OAS DID of the consumer requesting compute. pub consumer_did: String, /// OAS DID of the selected provider. pub provider_did: String, /// Identifier of the model or computation to run. pub model_id: String, /// BLAKE3 hash of the input payload. pub input_hash: SigilHash, /// Maximum budget in micro-MINT the consumer will pay. pub max_cost: u64, /// ISO 8601 timestamp when the job was created. pub created_at: String, /// Current lifecycle status of the job. pub status: JobStatus, /// Level of result verification required. pub verification_tier: VerificationTier } ``` Source line: `13`. ## dispatch::JobStatus [#dispatchjobstatus] Lifecycle status of a compute job. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum JobStatus { /// Job created, awaiting dispatch. Pending, /// Job sent to the provider. Dispatched, /// Provider is executing the job. Running, /// Job completed successfully; result available. Completed, /// Job failed during execution. Failed, /// Job result is under dispute. Challenged, } ``` Source line: `37`. ## dispatch::JobStatus::is\_terminal [#dispatchjobstatusis_terminal] Returns `true` if the job is in a terminal state. ```rust pub fn is_terminal(&self) -> bool; ``` Source line: `54`. ## dispatch::JobStatus::is\_active [#dispatchjobstatusis_active] Returns `true` if the job is still in progress. ```rust pub fn is_active(&self) -> bool; ``` Source line: `59`. ## dispatch::VerificationTier [#dispatchverificationtier] Verification tier controlling how compute results are validated. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(tag = "tier", rename_all = "snake_case")] pub enum VerificationTier { /// Optimistic verification: trust the provider, challenge on dispute. T1Optimistic, /// Lumen verification: provider supplies a signed inference commitment. T15Lumen, /// Redundant verification: run on `n_providers` and compare results. T2Redundant { /// Number of providers that must produce matching results. n_providers: usize, }, /// Trusted execution environment: provider uses hardware attestation. T3Tee, } ``` Source line: `67`. # sigil-compute · error URL: https://docs.sigil.ml/reference/rust/sigil-compute/error Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-compute/src/error.rs`. SHA-256: `d85d33e2d0a3a8b1a1b3c33c9f4300d9107a74c5358668a6e2e77fe898a771bb`. 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. ## error::ComputeError [#errorcomputeerror] Compute facade error types. Errors produced by compute marketplace operations. ```rust #[derive(Debug, thiserror::Error)] pub enum ComputeError { /// No provider is available to fulfill the job. #[error("no provider available")] NoProviderAvailable, /// The job's cost exceeds the consumer's budget. #[error("budget exceeded: limit={limit}, cost={cost}")] BudgetExceeded { /// Maximum budget set by the consumer (micro-MINT). limit: u64, /// Actual estimated cost (micro-MINT). cost: u64, }, /// An error occurred while communicating with a provider. #[error("provider error: {0}")] ProviderError(String), /// The job dispatch failed. #[error("dispatch failed: {0}")] DispatchFailed(String), /// Verification of compute results failed. #[error("verification failed: {0}")] VerificationFailed(String), /// The requested job was not found. #[error("job not found: {0}")] JobNotFound(String), } ``` Source line: `5`. # sigil-compute · facade URL: https://docs.sigil.ml/reference/rust/sigil-compute/facade Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/facade.md Source declarations, signatures and documentation for facade. Source: `sigil/node/sigil-compute/src/facade.rs`. SHA-256: `86a71512e77a33a31e7e828ccbc2b3420bdad716c937b3f3a73694708f18a536`. 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. ## facade::ProviderCandidate [#facadeprovidercandidate] A candidate compute provider with normalized scoring factors. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProviderCandidate { /// OAS DID of the provider. pub provider_did: String, /// Normalized price factor in \[0, 1\]. Lower is cheaper. pub price_factor: f64, /// Normalized latency factor in \[0, 1\]. Lower is faster. pub latency_factor: f64, /// OATS reputation score in \[0, 1\]. Higher is better. pub reputation: f64, /// Normalized capacity factor in \[0, 1\]. Higher means more available. pub capacity_factor: f64 } ``` Source line: `21`. ## facade::ProviderSelector [#facadeproviderselector] Score-based provider selection for the compute marketplace. ```rust pub struct ProviderSelector; ``` Source line: `35`. ## facade::ProviderSelector::score\_provider [#facadeproviderselectorscore_provider] Compute a composite score for a provider. Score = reputation \* 0.35 + (1 - price) \* 0.25 * (1 - latency) \* 0.25 + capacity \* 0.15 All input factors should be normalized to \[0, 1]. ```rust pub fn score_provider( price_factor: f64, latency_factor: f64, reputation: f64, capacity_factor: f64, ) -> f64; ``` Source line: `44`. ## facade::ProviderSelector::score [#facadeproviderselectorscore] Score a `ProviderCandidate`. ```rust pub fn score(candidate: &ProviderCandidate) -> f64; ``` Source line: `57`. ## facade::ProviderSelector::select\_best [#facadeproviderselectorselect_best] Select the best provider from a list of candidates. Returns `None` if the list is empty. ```rust pub fn select_best(providers: &[ProviderCandidate]) -> Option<&ProviderCandidate>; ``` Source line: `69`. ## facade::ProviderSelector::rank [#facadeproviderselectorrank] Rank all candidates by descending score, returning scored pairs. ```rust pub fn rank(providers: &[ProviderCandidate]) -> Vec<(&ProviderCandidate, f64)>; ``` Source line: `78`. # sigil-compute URL: https://docs.sigil.ml/reference/rust/sigil-compute Markdown: https://docs.sigil.ml/reference/rust/sigil-compute.md Compute marketplace facade for the Sigil blockchain Compute marketplace facade for the Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-compute` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-compute/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_compute` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-compute = { path = "../sigil-compute" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-compute/crate) — 9 declarations * [bridge\_arise](/reference/rust/sigil-compute/bridge_arise) — 21 declarations * [dispatch](/reference/rust/sigil-compute/dispatch) — 5 declarations * [error](/reference/rust/sigil-compute/error) — 1 declarations * [facade](/reference/rust/sigil-compute/facade) — 6 declarations * [selector](/reference/rust/sigil-compute/selector) — 12 declarations # sigil-compute · selector URL: https://docs.sigil.ml/reference/rust/sigil-compute/selector Markdown: https://docs.sigil.ml/reference/rust/sigil-compute/selector.md Source declarations, signatures and documentation for selector. Source: `sigil/node/sigil-compute/src/selector.rs`. SHA-256: `e11e549e82a7d3a5f31636511bf83927ddf3b1fe05c34ba973f4c05b515de313`. 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. ## selector::RequiredTier [#selectorrequiredtier] Required tier for a job. Wider than `VerificationTier` because callers may not care about T2's `n_providers` count when filtering. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RequiredTier { T1Optimistic, T15Lumen, T2Redundant, T3Tee, } ``` Source line: `22`. ## selector::RequiredTier::matches [#selectorrequiredtiermatches] ```rust pub fn matches(self, declared: &VerificationTier) -> bool; ``` Source line: `30`. ## selector::SelectorProviderStatus [#selectorselectorproviderstatus] Operational status — matches the on-chain enum. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SelectorProviderStatus { Active, Suspended, Exiting, Exited, } ``` Source line: `44`. ## selector::SelectorProviderStatus::is\_eligible [#selectorselectorproviderstatusis_eligible] ```rust pub fn is_eligible(self) -> bool; ``` Source line: `52`. ## selector::MacaCandidate [#selectormacacandidate] MACA-aware provider candidate. Extends the basic 4-factor candidate. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaCandidate { pub provider_did: String, /// Human root anchoring the provider (HMR DID). Used for distinct-root /// constraints in T2 redundant verification. pub human_root_did: Option, pub status: SelectorProviderStatus, pub price_factor: f64, pub latency_factor: f64, pub reputation: f64, pub capacity_factor: f64, /// Penalty derived from `recent_challenges_lost / recent_challenges_total`. /// Should be in `[0, 1]`. 0 = clean record; 1 = mostly lost. pub recent_challenge_penalty: f64, /// Liveness in `[0, 1]` — 1 = fully responsive to sentinel probes. pub liveness: f64, /// Declared verification tiers. pub declared_tiers: Vec, /// Declared model / capability identifiers (e.g. model family names). pub capabilities: Vec, /// True when the provider's controller has presented an accepted ACT /// or scoped authority context. Selectors used in privileged contexts /// MUST treat `false` as ineligible. pub authority_ok: bool } ``` Source line: `59`. ## selector::SelectionRequest [#selectorselectionrequest] Required filter: model id + tier + authority. ```rust #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct SelectionRequest { pub required_model: Option, pub required_tier: Option, pub require_authority: bool, /// Caller-provided diversity hint: providers whose human root appears in /// this set are penalised (for T2 quorum diversity). #[serde(default)] pub already_selected_human_roots: Vec } ``` Source line: `94`. ## selector::MacaWeights [#selectormacaweights] Score weights. Defaults sum to 1.0 for the positive-direction terms; the challenge penalty / liveness penalty subtract independently. ```rust #[derive(Debug, Clone, Copy)] pub struct MacaWeights { pub reputation: f64, pub price: f64, pub latency: f64, pub capacity: f64, pub liveness: f64, pub root_diversity: f64, pub challenge_penalty: f64 } ``` Source line: `107`. ## selector::MacaProviderSelector [#selectormacaproviderselector] ```rust pub struct MacaProviderSelector; ``` Source line: `131`. ## selector::MacaProviderSelector::score [#selectormacaproviderselectorscore] Compute the MACA-aware score. The result is in `(-∞, 1]`. Higher is better. Negative scores are theoretically possible when challenge penalty + capacity drops outweigh the positive contribution; in practice the comparator will simply rank such providers last. ```rust pub fn score( candidate: &MacaCandidate, request: &SelectionRequest, weights: &MacaWeights, ) -> f64; ``` Source line: `138`. ## selector::MacaProviderSelector::is\_eligible [#selectormacaproviderselectoris_eligible] Returns true when the candidate is eligible for this request. ```rust pub fn is_eligible(candidate: &MacaCandidate, request: &SelectionRequest) -> bool; ``` Source line: `190`. ## selector::MacaProviderSelector::select\_deterministic [#selectormacaproviderselectorselect_deterministic] Deterministic selection. Filters out ineligible candidates, scores the rest, and resolves ties by `(score desc, provider_did asc)` so the result is reproducible across nodes. ```rust pub fn select_deterministic<'a>( candidates: &'a [MacaCandidate], request: &SelectionRequest, weights: &MacaWeights, ) -> Option<&'a MacaCandidate>; ``` Source line: `213`. ## selector::MacaProviderSelector::select\_redundant [#selectormacaproviderselectorselect_redundant] Multi-pick selection used by T2 redundant verification. Greedily picks the next-best candidate that does not share a human root with any previously selected candidate. Returns up to `n` candidates. ```rust pub fn select_redundant<'a>( candidates: &'a [MacaCandidate], request: &SelectionRequest, weights: &MacaWeights, n: usize, ) -> Vec<&'a MacaCandidate>; ``` Source line: `234`. # sigil-consensus · crate URL: https://docs.sigil.ml/reference/rust/sigil-consensus/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-consensus/src/lib.rs`. SHA-256: `9eaf77d76b624d831b9dcd2a807035c60430967960eeff26ce407f15142536a3`. 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. ## election [#election] ```rust pub mod election; ``` Source line: `16`. ## epoch [#epoch] ```rust pub mod epoch; ``` Source line: `17`. ## error [#error] ```rust pub mod error; ``` Source line: `18`. ## round [#round] ```rust pub mod round; ``` Source line: `19`. ## semantic [#semantic] ```rust pub mod semantic; ``` Source line: `20`. ## signing [#signing] ```rust pub mod signing; ``` Source line: `21`. ## validator [#validator] ```rust pub mod validator; ``` Source line: `22`. ## view\_change [#view_change] ```rust pub mod view_change; ``` Source line: `23`. ## pub use election::\{compute\_score, elect\_proposer, ElectionConfig, ElectionWeights}; [#pub-use-electioncompute_score-elect_proposer-electionconfig-electionweights] ```rust pub use election::{compute_score, elect_proposer, ElectionConfig, ElectionWeights}; ``` Source line: `26`. ## pub use epoch::\{epoch\_for\_height, genesis\_epoch, is\_epoch\_boundary, transition\_epoch, EpochInfo}; [#pub-use-epochepoch_for_height-genesis_epoch-is_epoch_boundary-transition_epoch-epochinfo] ```rust pub use epoch::{epoch_for_height, genesis_epoch, is_epoch_boundary, transition_epoch, EpochInfo}; ``` Source line: `27`. ## pub use error::\{ConsensusError, ConsensusPhase}; [#pub-use-errorconsensuserror-consensusphase] ```rust pub use error::{ConsensusError, ConsensusPhase}; ``` Source line: `28`. ## pub use round::\{ConsensusDecision, ConsensusMessage, ConsensusRound, PreCommit, PreVote}; [#pub-use-roundconsensusdecision-consensusmessage-consensusround-precommit-prevote] ```rust pub use round::{ConsensusDecision, ConsensusMessage, ConsensusRound, PreCommit, PreVote}; ``` Source line: `29`. ## pub use semantic::\{SemanticValidationError, SemanticValidator, SemanticValidatorRegistry}; [#pub-use-semanticsemanticvalidationerror-semanticvalidator-semanticvalidatorregistry] ```rust pub use semantic::{SemanticValidationError, SemanticValidator, SemanticValidatorRegistry}; ``` Source line: `30`. ## pub use validator::\{Validator, ValidatorSet}; [#pub-use-validatorvalidator-validatorset] ```rust pub use validator::{Validator, ValidatorSet}; ``` Source line: `31`. ## pub use view\_change::\{ [#pub-use-view_change] next\_proposer\_after\_view\_change, NewViewMessage, ViewChangeCertificate, ViewChangeMessage, ViewChangeReason, ViewChangeTracker, }; ```rust pub use view_change::{ next_proposer_after_view_change, NewViewMessage, ViewChangeCertificate, ViewChangeMessage, ViewChangeReason, ViewChangeTracker, }; ``` Source line: `32`. # sigil-consensus · election URL: https://docs.sigil.ml/reference/rust/sigil-consensus/election Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/election.md Source declarations, signatures and documentation for election. Source: `sigil/node/sigil-consensus/src/election.rs`. SHA-256: `8f5217b41cc4646c8307f84f489ec66817ef2c1a2e5bf94c902ed55de3574abe`. 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. ## election::ElectionWeights [#electionelectionweights] Weights for the composite election score formula. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ElectionWeights { /// Weight for normalized stake component. pub stake: f64, /// Weight for uptime component. pub uptime: f64, /// Weight for OATS trust score component. pub trust_score: f64, /// Weight for hardware performance component. pub hw_performance: f64, /// Weight for participation component. pub participation: f64 } ``` Source line: `20`. ## election::ElectionConfig [#electionelectionconfig] Configuration for the proposer election algorithm. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ElectionConfig { /// The weights for each score component. pub weights: ElectionWeights, /// Alpha parameter for the concentration penalty. /// Higher values penalize stake concentration more heavily. pub concentration_alpha: f64, /// Maximum allowed stake fraction before the concentration penalty /// begins to apply significantly. Validators holding more than this /// fraction of total stake receive a logarithmic penalty. pub max_stake_fraction: f64 } ``` Source line: `47`. ## election::compute\_score [#electioncompute_score] Compute the composite election score for a single validator. The formula is: ```text Score = w1*(stake/total_stake) + w2*uptime + w3*trust_score + w4*hw_performance + w5*participation - alpha * ln(CP) ``` where CP = (stake / total\_stake) / max\_stake\_fraction. The concentration penalty uses the natural logarithm of the ratio between the validator's stake fraction and the configured maximum. When the validator's fraction is at or below the maximum, the penalty is zero or negative (i.e., a slight benefit). When it exceeds the maximum, the penalty grows logarithmically. ```rust pub fn compute_score(validator: &Validator, config: &ElectionConfig, total_stake: u64) -> f64; ``` Source line: `82`. ## election::elect\_proposer [#electionelect_proposer] Elect the proposer for a given block height from the validator set. Only Block Producers are eligible to propose blocks. The selection uses a deterministic VRF-like mechanism: hash(epoch\_seed || height) produces a seed that is combined with each candidate's score to deterministically select the proposer. Returns the DID of the elected proposer, or an empty string if no Block Producers are available. ```rust pub fn elect_proposer( validator_set: &ValidatorSet, config: &ElectionConfig, height: u64, epoch_seed: &SigilHash, ) -> String; ``` Source line: `119`. # sigil-consensus · epoch URL: https://docs.sigil.ml/reference/rust/sigil-consensus/epoch Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/epoch.md Source declarations, signatures and documentation for epoch. Source: `sigil/node/sigil-consensus/src/epoch.rs`. SHA-256: `c9c4786c017569df296bfb09580bfb349458ce50254b7ec11c78079ef6c5bc8a`. 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. ## epoch::EpochInfo [#epochepochinfo] Information about a specific epoch. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct EpochInfo { /// Epoch number (0-indexed). pub epoch: u64, /// First block height in this epoch (inclusive). pub start_height: u64, /// Last block height in this epoch (inclusive). pub end_height: u64, /// The active validator set for this epoch. pub validator_set: ValidatorSet, /// Randomness beacon seed for proposer election and other protocol randomness. pub epoch_seed: SigilHash } ``` Source line: `16`. ## epoch::epoch\_for\_height [#epochepoch_for_height] Returns the epoch number for a given block height. Uses the constant `BLOCKS_PER_EPOCH` from `sigil_core`. ```rust pub fn epoch_for_height(height: u64) -> u64; ``` Source line: `32`. ## epoch::start\_height\_for\_epoch [#epochstart_height_for_epoch] Returns the first block height for a given epoch. ```rust pub fn start_height_for_epoch(epoch: u64) -> u64; ``` Source line: `37`. ## epoch::end\_height\_for\_epoch [#epochend_height_for_epoch] Returns the last block height for a given epoch (inclusive). ```rust pub fn end_height_for_epoch(epoch: u64) -> u64; ``` Source line: `42`. ## epoch::is\_epoch\_boundary [#epochis_epoch_boundary] Returns true if the given height is the first block of a new epoch. Height 0 (genesis) is always an epoch boundary. ```rust pub fn is_epoch_boundary(height: u64) -> bool; ``` Source line: `49`. ## epoch::transition\_epoch [#epochtransition_epoch] Transition to a new epoch. Derives a new epoch seed by hashing the current seed with the transition height, and creates a new `EpochInfo` with the provided validator set. ```rust pub fn transition_epoch( current: &EpochInfo, new_validators: ValidatorSet, ) -> Result; ``` Source line: `57`. ## epoch::genesis\_epoch [#epochgenesis_epoch] Create the genesis epoch (epoch 0). ```rust pub fn genesis_epoch(validator_set: ValidatorSet, genesis_seed: SigilHash) -> EpochInfo; ``` Source line: `88`. # sigil-consensus · error URL: https://docs.sigil.ml/reference/rust/sigil-consensus/error Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-consensus/src/error.rs`. SHA-256: `9eb0f1f601109ee559977aef680da78d8667ca8be59caec6ff223b645d363cfe`. 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. ## error::ConsensusError [#errorconsensuserror] Errors that can occur during consensus operations. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum ConsensusError { /// The proposed block comes from an invalid proposer. #[error("invalid proposer: {0}")] InvalidProposer(String), /// The proposed block is structurally or semantically invalid. #[error("invalid block: {0}")] InvalidBlock(String), /// A signature failed verification. #[error("invalid signature: {0}")] InvalidSignature(String), /// Not enough stake has voted to reach quorum. #[error("quorum not reached: received {received}, required {required}")] QuorumNotReached { /// Stake that has voted so far. received: u64, /// Stake required for quorum (2/3 + 1). required: u64, }, /// A validator has already cast a vote in this phase. #[error("duplicate vote from validator: {validator_did}")] DuplicateVote { /// The DID of the validator that voted twice. validator_did: String, }, /// The validator is not in the current active validator set. #[error("not in validator set: {0}")] NotInValidatorSet(String), /// The consensus round is in an unexpected phase. #[error("wrong phase: expected {expected}, actual {actual}")] WrongPhase { /// The expected phase. expected: ConsensusPhase, /// The actual current phase. actual: ConsensusPhase, }, /// A view change is currently in progress; normal operations are paused. #[error("view change in progress")] ViewChangeInProgress, /// An error occurred during epoch transition. #[error("epoch transition error: {0}")] EpochTransitionError(String), /// A semantic validation module rejected the transaction. #[error("semantic validation failed in module '{module}': {reason}")] SemanticValidationFailed { /// The name of the semantic validator module. module: String, /// The reason for rejection. reason: String, }, /// A phase timeout has expired without quorum. #[error("timeout expired")] TimeoutExpired, } ``` Source line: `7`. ## error::ConsensusPhase [#errorconsensusphase] The four phases of the MACA BFT consensus protocol. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] pub enum ConsensusPhase { /// Leader proposes a block. Propose, /// Validators issue pre-votes on the proposed block. PreVote, /// Validators issue pre-commits after seeing 2/3+ pre-votes. PreCommit, /// The block is finalized after 2/3+ pre-commits. Finalize, } ``` Source line: `73`. ## error::ConsensusPhase::next [#errorconsensusphasenext] Returns the next phase in the round progression. Returns `None` if the current phase is `Finalize` (terminal). ```rust pub fn next(self) -> Option; ``` Source line: `99`. # sigil-consensus URL: https://docs.sigil.ml/reference/rust/sigil-consensus Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus.md MACA 4-round BFT consensus engine for the Sigil blockchain MACA 4-round BFT consensus engine for the Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-consensus` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-consensus/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_consensus` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-consensus = { path = "../sigil-consensus" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | ------------ | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `contracts` | `compute` | | `governance` | `sigil-core/governance` | | `tower` | `sigil-core/tower` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-consensus/crate) — 15 declarations * [election](/reference/rust/sigil-consensus/election) — 4 declarations * [epoch](/reference/rust/sigil-consensus/epoch) — 7 declarations * [error](/reference/rust/sigil-consensus/error) — 3 declarations * [round](/reference/rust/sigil-consensus/round) — 19 declarations * [semantic](/reference/rust/sigil-consensus/semantic) — 27 declarations * [signing](/reference/rust/sigil-consensus/signing) — 6 declarations * [validator](/reference/rust/sigil-consensus/validator) — 15 declarations * [view\_change](/reference/rust/sigil-consensus/view_change) — 21 declarations # sigil-consensus · round URL: https://docs.sigil.ml/reference/rust/sigil-consensus/round Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/round.md Source declarations, signatures and documentation for round. Source: `sigil/node/sigil-consensus/src/round.rs`. SHA-256: `c6e695ad63cdafbfbc838e987d55667a21aa9a104c8478e15e1371b7156df8c9`. 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. ## round::PreVote [#roundprevote] A pre-vote message from a validator. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PreVote { /// DID of the voting validator. pub validator_did: String, /// Hash of the block being voted on. pub block_hash: SigilHash, /// Block height this vote applies to. pub height: u64, /// Consensus view this vote applies to. pub view: u64, /// Ed25519 signature over (block_hash || height || epoch || view || "prevote"). pub signature: Vec } ``` Source line: `20`. ## round::PreCommit [#roundprecommit] A pre-commit message from a validator. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PreCommit { /// DID of the committing validator. pub validator_did: String, /// Hash of the block being committed to. pub block_hash: SigilHash, /// Block height this commit applies to. pub height: u64, /// Consensus view this commit applies to. pub view: u64, /// Ed25519 signature over (block_hash || height || epoch || view || "precommit"). pub signature: Vec } ``` Source line: `35`. ## round::ConsensusMessage [#roundconsensusmessage] Messages exchanged during consensus rounds. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum ConsensusMessage { /// A block proposal from the elected proposer. Propose { /// The proposed block (boxed to reduce enum size). block: Box, /// DID of the proposer. proposer_did: String, /// Round view number (increments on view change). view: u64, }, /// A pre-vote for a proposed block. PreVote(PreVote), /// A pre-commit for a proposed block. PreCommit(PreCommit), /// A finalize notification (informational, not a vote). Finalize { /// Hash of the finalized block. block_hash: SigilHash, /// Block height. height: u64, }, } ``` Source line: `50`. ## round::ProposalValidation [#roundproposalvalidation] Result of external proposal validation before the round may enter PreVote. `sigil-consensus` is a pure state-machine crate, so it cannot re-execute blocks or read the node's state snapshot itself. The node/coordinator must validate chain ID, parent hash, proposer authority/signature, every transaction signature and chain ID, transaction/receipt roots, execution state root, non-zero roots for non-empty blocks, and gas limits before constructing `Passed`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ProposalValidation { /// The outer node verified the full proposal validity checklist. Passed, /// The proposal failed validation and must not receive a prevote. Rejected { /// Structured or human-readable rejection reason from the outer node. reason: String, }, } ``` Source line: `82`. ## round::ProposalValidation::passed [#roundproposalvalidationpassed] Convenience constructor for successful outer validation. ```rust pub fn passed() -> Self; ``` Source line: `94`. ## round::ProposalValidation::rejected [#roundproposalvalidationrejected] Convenience constructor for rejected outer validation. ```rust pub fn rejected(reason: impl Into) -> Self; ``` Source line: `99`. ## round::ConsensusDecision [#roundconsensusdecision] The final decision from a consensus round. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ConsensusDecision { /// The finalized block. pub block: Block, /// Block hash. pub block_hash: SigilHash, /// Block height. pub height: u64, /// Epoch this block belongs to. pub epoch: u64, /// Collected pre-commits that formed quorum. pub commits: Vec } ``` Source line: `117`. ## round::ConsensusRound [#roundconsensusround] A consensus round for a specific block height. This is the core state machine. It tracks the current phase, the proposed block, accumulated votes, and determines when thresholds are met. ```rust pub struct ConsensusRound { /// Block height for this round. pub height: u64, /// Epoch number. pub epoch: u64, /// Current phase of the round. pub phase: ConsensusPhase, /// DID of the elected proposer for this height. pub proposer_did: String, /// The proposed block, if one has been received. pub proposed_block: Option, /// Accumulated pre-votes: validator_did -> PreVote. pub prevotes: HashMap, /// Accumulated pre-commits: validator_did -> PreCommit. pub precommits: HashMap, /// View number (increments on view changes). pub view: u64, /// When this round started. pub start_time: Instant } ``` Source line: `134`. ## round::ConsensusRound::new [#roundconsensusroundnew] Create a new consensus round for the given height. ```rust pub fn new(height: u64, epoch: u64, proposer_did: String, validator_set: ValidatorSet) -> Self; ``` Source line: `159`. ## round::ConsensusRound::is\_quorum [#roundconsensusroundis_quorum] Returns true if the given stake amount meets or exceeds the quorum threshold. Uses u128 intermediate to prevent overflow when `total_stake > u64::MAX / 2`. ```rust pub fn is_quorum(votes_stake: u64, total_stake: u64) -> bool; ``` Source line: `177`. ## round::ConsensusRound::receive\_proposal [#roundconsensusroundreceive_proposal] Handle a block proposal. Validates that: * The round is in the Propose phase * The proposal comes from the elected proposer * Basic block structure is valid (height, epoch) * The proposer's Ed25519 signature is valid ```rust pub fn receive_proposal( &mut self, block: Block, proposer_did: &str, signature: &[u8], validation: ProposalValidation, ) -> Result<(), ConsensusError>; ``` Source line: `193`. ## round::ConsensusRound::can\_prevote [#roundconsensusroundcan_prevote] Check whether we can transition to the pre-vote phase. Returns true if: * A block has been proposed * The proposer is valid (is the elected proposer and in the validator set) ```rust pub fn can_prevote(&self) -> bool; ``` Source line: `263`. ## round::ConsensusRound::add\_prevote [#roundconsensusroundadd_prevote] Add a pre-vote from a validator. Validates that: * The round is in the PreVote phase * The validator is in the active set * The validator has not already voted * The Ed25519 signature is valid Returns `true` if quorum has been reached after adding this vote. ```rust pub fn add_prevote(&mut self, vote: PreVote) -> Result; ``` Source line: `280`. ## round::ConsensusRound::can\_precommit [#roundconsensusroundcan_precommit] Check whether the pre-vote quorum has been reached and we can transition to the PreCommit phase. ```rust pub fn can_precommit(&self) -> bool; ``` Source line: `338`. ## round::ConsensusRound::advance\_to\_precommit [#roundconsensusroundadvance_to_precommit] Advance from PreVote to PreCommit phase. Should be called once `can_precommit()` returns true. ```rust pub fn advance_to_precommit(&mut self) -> Result<(), ConsensusError>; ``` Source line: `346`. ## round::ConsensusRound::add\_precommit [#roundconsensusroundadd_precommit] Add a pre-commit from a validator. Validates that: * The round is in the PreCommit phase * The validator is in the active set * The validator has not already committed * The Ed25519 signature is valid Returns `true` if quorum has been reached after adding this commit. ```rust pub fn add_precommit(&mut self, commit: PreCommit) -> Result; ``` Source line: `382`. ## round::ConsensusRound::try\_finalize [#roundconsensusroundtry_finalize] Attempt to finalize the round. If 2/3+ of stake has pre-committed, produces a `ConsensusDecision` and transitions to the Finalize phase. ```rust pub fn try_finalize(&mut self) -> Result, ConsensusError>; ``` Source line: `442`. ## round::ConsensusRound::validator\_set [#roundconsensusroundvalidator_set] Returns a reference to the validator set. ```rust pub fn validator_set(&self) -> &ValidatorSet; ``` Source line: `499`. ## round::ConsensusRound::elapsed [#roundconsensusroundelapsed] Returns the elapsed time since the round started. ```rust pub fn elapsed(&self) -> std::time::Duration; ``` Source line: `504`. # sigil-consensus · semantic URL: https://docs.sigil.ml/reference/rust/sigil-consensus/semantic Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/semantic.md Source declarations, signatures and documentation for semantic. Source: `sigil/node/sigil-consensus/src/semantic.rs`. SHA-256: `b0ecc4ada3f75fdc6082d3ddfb716d9cc8e60714dfe828e85401d096da006b85`. 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. ## semantic::SemanticValidationError [#semanticsemanticvalidationerror] Error type for semantic validation failures. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum SemanticValidationError { /// The transaction type does not match what this module handles. #[error("wrong transaction category: expected {expected:?}, got {actual:?}")] WrongCategory { expected: TransactionCategory, actual: TransactionCategory, }, /// A domain-specific validation rule was violated. #[error("validation failed: {0}")] ValidationFailed(String), /// The validator module encountered an internal error. #[error("internal error: {0}")] InternalError(String), } ``` Source line: `15`. ## semantic::SemanticValidator [#semanticsemanticvalidator] A semantic validation module that checks domain-specific rules on transactions. Each module handles a specific transaction category and applies rules that go beyond structural validation (e.g., lineage checks for identity transactions, bond verification for MARS transactions). ```rust pub trait SemanticValidator: Send + Sync { /// Returns the human-readable name of this validator module. fn name(&self) -> &str; /// Returns the transaction category this module handles. fn category(&self) -> TransactionCategory; /// Validate a signed transaction against domain-specific rules. /// /// Returns `Ok(())` if the transaction passes validation, or a /// `SemanticValidationError` describing why it was rejected. fn validate(&self, tx: &SignedTransaction) -> Result<(), SemanticValidationError>; } ``` Source line: `37`. ## semantic::SemanticValidatorRegistry [#semanticsemanticvalidatorregistry] Registry that routes transactions to the appropriate semantic validator modules. ```rust pub struct SemanticValidatorRegistry { } ``` Source line: `52`. ## semantic::SemanticValidatorRegistry::new [#semanticsemanticvalidatorregistrynew] Create a new empty registry. ```rust pub fn new() -> Self; ``` Source line: `58`. ## semantic::SemanticValidatorRegistry::with\_defaults [#semanticsemanticvalidatorregistrywith_defaults] Create a registry pre-populated with validators that enforce at least state-independent production checks. Unsupported categories fail closed. ```rust pub fn with_defaults() -> Self; ``` Source line: `66`. ## semantic::SemanticValidatorRegistry::with\_economics\_state [#semanticsemanticvalidatorregistrywith_economics_state] Create a default registry with economics checks backed by live state. Consensus/node production paths should prefer this constructor whenever an execution-state snapshot is available; the plain default registry keeps economics fail-closed because balance and nonce checks require state access. ```rust pub fn with_economics_state(state: Arc) -> Self; ``` Source line: `88`. ## semantic::SemanticValidatorRegistry::register [#semanticsemanticvalidatorregistryregister] Register a new semantic validator module. ```rust pub fn register(&mut self, validator: Box); ``` Source line: `105`. ## semantic::SemanticValidatorRegistry::validate [#semanticsemanticvalidatorregistryvalidate] Validate a transaction by routing it to all matching validator modules. A module matches if its category equals the transaction's category. All matching modules must pass for the transaction to be considered valid. ```rust pub fn validate(&self, tx: &SignedTransaction) -> Result<(), ConsensusError>; ``` Source line: `118`. ## semantic::SemanticValidatorRegistry::has\_validator\_for\_category [#semanticsemanticvalidatorregistryhas_validator_for_category] Returns true if this registry has at least one validator for `category`. ```rust pub fn has_validator_for_category(&self, category: TransactionCategory) -> bool; ``` Source line: `145`. ## semantic::SemanticValidatorRegistry::len [#semanticsemanticvalidatorregistrylen] Returns the number of registered validator modules. ```rust pub fn len(&self) -> usize; ``` Source line: `150`. ## semantic::SemanticValidatorRegistry::is\_empty [#semanticsemanticvalidatorregistryis_empty] Returns true if no validator modules are registered. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `155`. ## semantic::SemanticValidatorRegistry::module\_names [#semanticsemanticvalidatorregistrymodule_names] Returns the names of all registered modules. ```rust pub fn module_names(&self) -> Vec<&str>; ``` Source line: `160`. ## semantic::OasVerifyModule [#semanticoasverifymodule] Validates OAS identity transactions (lineage checks, DID format, etc.). ```rust pub struct OasVerifyModule; ``` Source line: `194`. ## semantic::AttestationVerifyModule [#semanticattestationverifymodule] Validates attestation and verifiable credential transactions. ```rust pub struct AttestationVerifyModule; ``` Source line: `281`. ## semantic::GovernanceVerifyModule [#semanticgovernanceverifymodule] Validates governance proposals and votes. ```rust pub struct GovernanceVerifyModule; ``` Source line: `310`. ## semantic::EconomicsState [#semanticeconomicsstate] Trait for balance/nonce state lookups needed by economics validation. ```rust pub trait EconomicsState: Send + Sync { fn get_balance(&self, did: &str) -> Result; fn get_nonce(&self, did: &str) -> Result; } ``` Source line: `366`. ## semantic::EconomicsVerifyModule [#semanticeconomicsverifymodule] Validates staking, unstaking, delegation, and reward transactions. ```rust pub struct EconomicsVerifyModule { } ``` Source line: `372`. ## semantic::EconomicsVerifyModule::new [#semanticeconomicsverifymodulenew] Create with no state. State-independent checks still run, but state-dependent economics admission fails closed. ```rust pub fn new() -> Self; ``` Source line: `385`. ## semantic::EconomicsVerifyModule::with\_state [#semanticeconomicsverifymodulewith_state] Create with a state backend for real validation. ```rust pub fn with_state(state: Arc) -> Self; ``` Source line: `390`. ## semantic::MarsVerifyModule [#semanticmarsverifymodule] Validates MARS registry anchoring transactions. ```rust pub struct MarsVerifyModule; ``` Source line: `531`. ## semantic::GalVerifyModule [#semanticgalverifymodule] Validates typed Global Anchor Layer transactions. ```rust #[cfg(feature = "tower")] pub struct GalVerifyModule; ``` Source line: `590`. ## semantic::ComputeVerifyModule [#semanticcomputeverifymodule] Validates compute marketplace transactions (feature-gated). State-independent rules only — provider existence, escrow balance, and double-settle prevention live in the executor. ```rust #[cfg(feature = "compute")] pub struct ComputeVerifyModule; ``` Source line: `817`. ## semantic::VigilsVerifyModule [#semanticvigilsverifymodule] Validates Vigils transactions for state-independent consensus invariants. State-dependent checks (subscription existence, replay protection, gas tank solvency, source activation, callback scheduling, and cryptographic proof verification) live in the executor because they require the block-height and execution-state snapshot. ```rust pub struct VigilsVerifyModule; ``` Source line: `1247`. ## semantic::ContractsVerifyModule [#semanticcontractsverifymodule] Validates `DeployContract`, `CallContract`, `UpgradeContract`, and `SetContractPolicy` for *state-independent* properties only. State-dependent checks (controller authorization, code-blob presence, zone status, mandate / budget) live in the executor. ```rust #[cfg(feature = "contracts")] pub struct ContractsVerifyModule; ``` Source line: `1426`. ## semantic::ContractsVerifyModule::MAX\_CALL\_ARGS\_BYTES [#semanticcontractsverifymodulemax_call_args_bytes] Maximum size of a single CallContract `args` JSON value, in bytes. Hard limit — large inputs go through cross-zone messaging. ```rust #[cfg(feature = "contracts")] pub const MAX_CALL_ARGS_BYTES: usize; ``` Source line: `1432`. ## semantic::ContractsVerifyModule::MAX\_FUNCTION\_NAME\_LEN [#semanticcontractsverifymodulemax_function_name_len] Maximum length of a contract function name. ```rust #[cfg(feature = "contracts")] pub const MAX_FUNCTION_NAME_LEN: usize; ``` Source line: `1434`. ## semantic::ContractsVerifyModule::MAX\_GAS\_BUDGET [#semanticcontractsverifymodulemax_gas_budget] Hard upper bound on per-call gas budget (also bounded by tx `gas_limit` upstream). ```rust #[cfg(feature = "contracts")] pub const MAX_GAS_BUDGET: u64; ``` Source line: `1437`. # sigil-consensus · signing URL: https://docs.sigil.ml/reference/rust/sigil-consensus/signing Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/signing.md Source declarations, signatures and documentation for signing. Source: `sigil/node/sigil-consensus/src/signing.rs`. SHA-256: `542eebed93668c09a2127566f9b65e0e375574b546ac087e0cf53eee0d111b02`. 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. ## signing::prevote\_signing\_payload [#signingprevote_signing_payload] Build canonical payload for prevote signing: prefix || H || height || epoch || round. ```rust pub fn prevote_signing_payload(block_hash: &[u8], height: u64, epoch: u64, round: u64) -> Vec; ``` Source line: `12`. ## signing::precommit\_signing\_payload [#signingprecommit_signing_payload] Build canonical payload for precommit signing: prefix || H || height || epoch || round. ```rust pub fn precommit_signing_payload( block_hash: &[u8], height: u64, epoch: u64, round: u64, ) -> Vec; ``` Source line: `23`. ## signing::proposal\_signing\_payload [#signingproposal_signing_payload] Build canonical payload for proposal signing: prefix || H || height || epoch || view. ```rust pub fn proposal_signing_payload(block_hash: &[u8], height: u64, epoch: u64, view: u64) -> Vec; ``` Source line: `39`. ## signing::view\_change\_signing\_payload [#signingview_change_signing_payload] Build canonical payload for view-change signing: prefix || height || epoch || from\_view || new\_view || reason. ```rust pub fn view_change_signing_payload( height: u64, epoch: u64, from_view: u64, new_view: u64, reason: &[u8], ) -> Vec; ``` Source line: `51`. ## signing::new\_view\_signing\_payload [#signingnew_view_signing_payload] Build canonical payload for new-view signing: prefix || height || epoch || new\_view || view\_change\_certificate\_hash. ```rust pub fn new_view_signing_payload( height: u64, epoch: u64, new_view: u64, certificate_hash: &[u8], ) -> Vec; ``` Source line: `70`. ## signing::verify\_signature [#signingverify_signature] Verify an Ed25519 signature against a public key and payload. # Errors [#errors] Returns `ConsensusError::InvalidSignature` if: * The public key is not exactly 32 bytes or is an invalid Ed25519 point * The signature is not exactly 64 bytes * The signature does not verify against the payload and public key ```rust pub fn verify_signature( pubkey_bytes: &[u8], payload: &[u8], signature_bytes: &[u8], ) -> Result<(), ConsensusError>; ``` Source line: `93`. # sigil-consensus · validator URL: https://docs.sigil.ml/reference/rust/sigil-consensus/validator Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/validator.md Source declarations, signatures and documentation for validator. Source: `sigil/node/sigil-consensus/src/validator.rs`. SHA-256: `99e8d2349bcc96bc6c2a7bcdb790403f6d6e8f1d9358bb15bee8b1c3438b2c2a`. 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. ## validator::Validator [#validatorvalidator] A validator in the active consensus set. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Validator { /// OAS DID of the validator entity. pub did: String, /// Human root DID in the lineage chain (OAS lineage requirement). pub human_root_did: String, /// Generation distance from human root. pub generation: u32, /// Staked amount in micro-MINT. pub stake: u64, /// Whether this validator is a Block Producer or Block Validator. pub mode: ValidatorMode, /// Uptime ratio (0.0 to 1.0) measured over the recent window. pub uptime: f64, /// OATS composite trust score (0.0 to 1.0). pub trust_score: f64, /// Hardware performance metric (0.0 to 1.0). pub hw_performance: f64, /// Recent consensus participation rate (0.0 to 1.0). pub participation: f64, /// Ed25519 consensus public key bytes. pub consensus_pubkey: Vec } ``` Source line: `11`. ## validator::ValidatorSet [#validatorvalidatorset] The active validator set for an epoch. Contains all validators that are eligible to participate in consensus during the current epoch. The total stake is cached for efficient quorum threshold calculations. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ValidatorSet { } ``` Source line: `40`. ## validator::ValidatorSet::new [#validatorvalidatorsetnew] Create a new validator set from a list of validators. Computes the total stake from all validators. ```rust pub fn new(validators: Vec) -> Self; ``` Source line: `51`. ## validator::ValidatorSet::total\_stake [#validatorvalidatorsettotal_stake] Returns the total stake across all validators. ```rust pub fn total_stake(&self) -> u64; ``` Source line: `60`. ## validator::ValidatorSet::quorum\_threshold [#validatorvalidatorsetquorum_threshold] Returns the quorum threshold: the minimum stake required for 2/3 + 1. For Byzantine fault tolerance, we need strictly more than 2/3 of the total stake. Uses u128 intermediate to prevent overflow when `total_stake > u64::MAX / 2`. ```rust pub fn quorum_threshold(&self) -> u64; ``` Source line: `69`. ## validator::ValidatorSet::get\_validator [#validatorvalidatorsetget_validator] Look up a validator by DID. ```rust pub fn get_validator(&self, did: &str) -> Option<&Validator>; ``` Source line: `78`. ## validator::ValidatorSet::stake\_of [#validatorvalidatorsetstake_of] Returns the stake of a specific validator, or 0 if not found. ```rust pub fn stake_of(&self, did: &str) -> u64; ``` Source line: `83`. ## validator::ValidatorSet::is\_block\_producer [#validatorvalidatorsetis_block_producer] Returns true if the given DID is a Block Producer. ```rust pub fn is_block_producer(&self, did: &str) -> bool; ``` Source line: `88`. ## validator::ValidatorSet::block\_producers [#validatorvalidatorsetblock_producers] Returns an iterator over Block Producers. ```rust pub fn block_producers(&self) -> impl Iterator; ``` Source line: `94`. ## validator::ValidatorSet::block\_validators [#validatorvalidatorsetblock_validators] Returns an iterator over Block Validators. ```rust pub fn block_validators(&self) -> impl Iterator; ``` Source line: `101`. ## validator::ValidatorSet::contains [#validatorvalidatorsetcontains] Returns true if the validator set contains the given DID. ```rust pub fn contains(&self, did: &str) -> bool; ``` Source line: `108`. ## validator::ValidatorSet::len [#validatorvalidatorsetlen] Returns the number of validators in the set. ```rust pub fn len(&self) -> usize; ``` Source line: `113`. ## validator::ValidatorSet::is\_empty [#validatorvalidatorsetis_empty] Returns true if the validator set is empty. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `118`. ## validator::ValidatorSet::iter [#validatorvalidatorsetiter] Returns an iterator over all validators. ```rust pub fn iter(&self) -> impl Iterator; ``` Source line: `123`. ## validator::ValidatorSet::validators [#validatorvalidatorsetvalidators] Returns a slice of all validators. ```rust pub fn validators(&self) -> &[Validator]; ``` Source line: `128`. # sigil-consensus · view_change URL: https://docs.sigil.ml/reference/rust/sigil-consensus/view_change Markdown: https://docs.sigil.ml/reference/rust/sigil-consensus/view_change.md Source declarations, signatures and documentation for view_change. Source: `sigil/node/sigil-consensus/src/view_change.rs`. SHA-256: `ea54a867db540ae019df8243ecd5ff5acf7a831003827ea0c9784f14b2eff447`. 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. ## view\_change::ViewChangeReason [#view_changeviewchangereason] Reason for requesting a view change. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ViewChangeReason { /// The proposer did not produce a block within the timeout. Timeout, /// The proposed block was invalid. InvalidBlock, /// The expected proposer is offline or unreachable. MissingProposer, } ``` Source line: `18`. ## view\_change::ViewChangeReason::signing\_tag [#view_changeviewchangereasonsigning_tag] Stable protocol tag included in signed view-change payloads. ```rust pub fn signing_tag(self) -> &'static [u8]; ``` Source line: `39`. ## view\_change::ViewChangeMessage [#view_changeviewchangemessage] A view change request from a validator. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ViewChangeMessage { /// DID of the requesting validator. pub validator_did: String, /// Block height where the view change is requested. pub height: u64, /// View this validator is leaving. pub from_view: u64, /// New view number being requested. pub view: u64, /// Why this validator is requesting a view change. pub reason: ViewChangeReason, /// Ed25519 signature over (height || epoch || from_view || view || reason). pub signature: Vec } ``` Source line: `50`. ## view\_change::ViewChangeCertificate [#view_changeviewchangecertificate] Quorum certificate proving 2/3+ stake requested the same new view. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ViewChangeCertificate { /// Block height where the view change is requested. pub height: u64, /// Epoch for signature payloads. pub epoch: u64, /// New view certified by the messages. pub view: u64, /// Signed view-change messages forming the quorum certificate. pub messages: Vec } ``` Source line: `67`. ## view\_change::ViewChangeCertificate::digest [#view_changeviewchangecertificatedigest] Hash the certificate into a stable byte string for new-view signing. ```rust pub fn digest(&self) -> [u8; 32]; ``` Source line: `80`. ## view\_change::ViewChangeCertificate::verify [#view_changeviewchangecertificateverify] Verify every signed view-change message and that the certificate has quorum. ```rust pub fn verify( &self, current_view: u64, validator_set: &ValidatorSet, ) -> Result<(), ConsensusError>; ``` Source line: `101`. ## view\_change::NewViewMessage [#view_changenewviewmessage] New-view message from the elected proposer for a certified view. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NewViewMessage { /// DID of the proposer for the certified new view. pub proposer_did: String, /// Block height where the view change applies. pub height: u64, /// Certified view number. pub view: u64, /// Quorum certificate authorizing the view change. pub certificate: ViewChangeCertificate, /// Ed25519 signature over the new-view envelope and certificate digest. pub signature: Vec } ``` Source line: `173`. ## view\_change::ViewChangeTracker [#view_changeviewchangetracker] Tracks view change messages and determines when a view change should occur. ```rust pub struct ViewChangeTracker { } ``` Source line: `187`. ## view\_change::ViewChangeTracker::new [#view_changeviewchangetrackernew] Create a new view change tracker. ```rust pub fn new(height: u64, epoch: u64, current_view: u64, validator_set: ValidatorSet) -> Self; ``` Source line: `202`. ## view\_change::ViewChangeTracker::add\_view\_change [#view_changeviewchangetrackeradd_view_change] Add a view change message from a validator. Validates that: * The message is for the current height * The message requests a higher view than the current view * The validator is in the active set * The validator has not already submitted a view change message * The Ed25519 signature is valid Returns `true` if the view change threshold has been reached. ```rust pub fn add_view_change(&mut self, msg: ViewChangeMessage) -> Result; ``` Source line: `222`. ## view\_change::ViewChangeTracker::should\_change\_view [#view_changeviewchangetrackershould_change_view] Check if the view change threshold has been reached. A view change occurs when 2/3+ of the total stake has submitted view change messages. ```rust pub fn should_change_view(&self) -> bool; ``` Source line: `290`. ## view\_change::ViewChangeTracker::ready\_view [#view_changeviewchangetrackerready_view] Returns the highest target view with a quorum certificate ready. If a lower target view is certified but its elected proposer never broadcasts `NewView`, validators must still be able to certify a later target view and make progress. ```rust pub fn ready_view(&self) -> Option; ``` Source line: `299`. ## view\_change::ViewChangeTracker::view\_change\_certificate [#view_changeviewchangetrackerview_change_certificate] Returns a quorum certificate for the highest ready target view. ```rust pub fn view_change_certificate(&self) -> Option; ``` Source line: `318`. ## view\_change::ViewChangeTracker::current\_view [#view_changeviewchangetrackercurrent_view] Returns the current view number. ```rust pub fn current_view(&self) -> u64; ``` Source line: `335`. ## view\_change::ViewChangeTracker::message\_count [#view_changeviewchangetrackermessage_count] Returns the number of view change messages received. ```rust pub fn message_count(&self) -> usize; ``` Source line: `340`. ## view\_change::ViewChangeTracker::view\_change\_stake [#view_changeviewchangetrackerview_change_stake] Returns the total stake of validators that have requested a view change. ```rust pub fn view_change_stake(&self) -> u64; ``` Source line: `348`. ## view\_change::ViewChangeTracker::view\_change\_stake\_for\_view [#view_changeviewchangetrackerview_change_stake_for_view] Returns the total stake requesting a specific target view. ```rust pub fn view_change_stake_for_view(&self, view: u64) -> Option; ``` Source line: `357`. ## view\_change::ViewChangeTracker::advance\_view [#view_changeviewchangetrackeradvance_view] Advance to the next view. Clears accumulated messages. ```rust pub fn advance_view(&mut self); ``` Source line: `367`. ## view\_change::ViewChangeTracker::advance\_to\_view [#view_changeviewchangetrackeradvance_to_view] Advance to a certified view. Clears accumulated messages. ```rust pub fn advance_to_view(&mut self, new_view: u64); ``` Source line: `372`. ## view\_change::ViewChangeTracker::reset [#view_changeviewchangetrackerreset] Reset the tracker for a new height. ```rust pub fn reset(&mut self, new_height: u64, new_epoch: u64); ``` Source line: `383`. ## view\_change::next\_proposer\_after\_view\_change [#view_changenext_proposer_after_view_change] Determine the next proposer after a view change. The proposer for view N+1 is elected using the same deterministic algorithm but with a modified seed that incorporates the new view number. ```rust pub fn next_proposer_after_view_change( validator_set: &ValidatorSet, config: &ElectionConfig, height: u64, new_view: u64, epoch_seed: &SigilHash, ) -> String; ``` Source line: `395`. # sigil-crucible · crate URL: https://docs.sigil.ml/reference/rust/sigil-crucible/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-crucible/src/lib.rs`. SHA-256: `6a30dfaddaa439aec787cb6792f3d28d6f40faf07bb6e2267a95300fcdbaed81`. 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. ## errors [#errors] ```rust pub mod errors; ``` Source line: `5`. ## rewards [#rewards] ```rust pub mod rewards; ``` Source line: `6`. ## rollout [#rollout] ```rust pub mod rollout; ``` Source line: `7`. ## run [#run] ```rust pub mod run; ``` Source line: `8`. ## types [#types] ```rust pub mod types; ``` Source line: `9`. ## weights [#weights] ```rust pub mod weights; ``` Source line: `10`. ## pub use errors::CrucibleError; [#pub-use-errorscrucibleerror] ```rust pub use errors::CrucibleError; ``` Source line: `12`. ## pub use rewards::\{ [#pub-use-rewards] DistributionOutcome, LineageRewardMode, RewardBatchAttestation, RewardDistributionPlan, RewardPayout, }; ```rust pub use rewards::{ DistributionOutcome, LineageRewardMode, RewardBatchAttestation, RewardDistributionPlan, RewardPayout, }; ``` Source line: `13`. ## pub use rollout::\{RolloutBatchCommitment, RolloutBatchMetadata}; [#pub-use-rolloutrolloutbatchcommitment-rolloutbatchmetadata] ```rust pub use rollout::{RolloutBatchCommitment, RolloutBatchMetadata}; ``` Source line: `17`. ## pub use run::\{ [#pub-use-run] CloseReason, CruciblePolicy, RolloutPolicy, TrainingRun, TrainingRunConfig, TrainingRunStatus, }; ```rust pub use run::{ CloseReason, CruciblePolicy, RolloutPolicy, TrainingRun, TrainingRunConfig, TrainingRunStatus, }; ``` Source line: `18`. ## pub use types::\{TrainingSlashReason, TrainingSlashRecord, VerifierMode}; [#pub-use-typestrainingslashreason-trainingslashrecord-verifiermode] ```rust pub use types::{TrainingSlashReason, TrainingSlashRecord, VerifierMode}; ``` Source line: `21`. ## pub use weights::WeightPublicationRecord; [#pub-use-weightsweightpublicationrecord] ```rust pub use weights::WeightPublicationRecord; ``` Source line: `22`. # sigil-crucible · errors URL: https://docs.sigil.ml/reference/rust/sigil-crucible/errors Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/errors.md Source declarations, signatures and documentation for errors. Source: `sigil/node/sigil-crucible/src/errors.rs`. SHA-256: `303f7ad4c354162ae1dc404dd70069fc9839e3854662e46eeb76ec6962756b36`. 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. ## errors::CrucibleError [#errorscrucibleerror] ```rust #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum CrucibleError { #[error("crucible is disabled by policy")] FeatureDisabled, #[error("invalid crucible policy: {0}")] InvalidPolicy(String), #[error("artifact commitment is not content-addressed and identity-bound")] ArtifactIdentityUnverified, #[error("training run `{0}` already exists")] RunAlreadyExists(String), #[error("training run `{0}` was not found")] RunNotFound(String), #[error("training run is not open")] RunNotOpen, #[error("training run id mismatch: expected `{expected}`, got `{got}`")] RunMismatch { expected: String, got: String }, #[error("policy version mismatch: expected {expected}, got {got}")] PolicyVersionMismatch { expected: u32, got: u32 }, #[error( "rollout is stale: committed at epoch {committed_at_epoch}, current epoch {current_epoch}, max staleness {max_staleness_epochs}" )] StaleRollout { committed_at_epoch: u64, current_epoch: u64, max_staleness_epochs: u64, }, #[error("verifier mode {0:?} is unavailable")] VerifierModeUnavailable(VerifierMode), #[error("verifier mode mismatch: expected {expected:?}, got {got:?}")] VerifierModeMismatch { expected: VerifierMode, got: VerifierMode, }, #[error("unauthorized verifier `{0}`")] UnauthorizedVerifier(String), #[error("unauthorized publisher `{0}`")] UnauthorizedPublisher(String), #[error("reward pool has {available}, needs {needed}")] RewardPoolInsufficient { available: u64, needed: u64 }, #[error("unsupported reward token `{0}`")] UnsupportedRewardToken(String), #[error("lineage reward integration is unavailable")] LineageRewardsUnavailable, #[error("reward amount must be non-zero")] InvalidRewardAmount, #[error("previous weight root does not match the run head")] PreviousRootMismatch, #[error("run close is not allowed in the current state")] CloseNotAllowed, #[error("invalid epoch ordering")] InvalidEpoch, } ``` Source line: `6`. # sigil-crucible URL: https://docs.sigil.ml/reference/rust/sigil-crucible Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible.md L1-coordinated distributed training state machine for Sigil L1-coordinated distributed training state machine for Sigil | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-crucible` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-crucible/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_crucible` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-crucible = { path = "../sigil-crucible" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-crucible/crate) — 12 declarations * [errors](/reference/rust/sigil-crucible/errors) — 1 declarations * [rewards](/reference/rust/sigil-crucible/rewards) — 6 declarations * [rollout](/reference/rust/sigil-crucible/rollout) — 3 declarations * [run](/reference/rust/sigil-crucible/run) — 21 declarations * [types](/reference/rust/sigil-crucible/types) — 3 declarations * [weights](/reference/rust/sigil-crucible/weights) — 2 declarations # sigil-crucible · rewards URL: https://docs.sigil.ml/reference/rust/sigil-crucible/rewards Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/rewards.md Source declarations, signatures and documentation for rewards. Source: `sigil/node/sigil-crucible/src/rewards.rs`. SHA-256: `7d9295b6d4685891b013703067617b4dc0d1ea1033ebe4806099534dfd5749fb`. 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. ## rewards::RewardPayout [#rewardsrewardpayout] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RewardPayout { pub recipient_did: String, pub amount: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub generation: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub lineage_parent_did: Option } ``` Source line: `8`. ## rewards::RewardBatchAttestation [#rewardsrewardbatchattestation] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RewardBatchAttestation { pub attestation_id: String, pub run_id: String, pub rollout_batch_id: String, pub verifier_did: String, pub policy_version: u32, pub payouts: Vec, pub artifact: ArtifactCommitment, pub attested_at_epoch: u64 } ``` Source line: `18`. ## rewards::LineageRewardMode [#rewardslineagerewardmode] Boundary for lineage payout integration. `GenerationDecay` is supported by the existing economics API; parent/root lineage payout verification fails closed until a concrete GAL/lineage adapter is available. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum LineageRewardMode { UnavailableFailClosed, GenerationDecay { config: RewardConfig }, } ``` Source line: `33`. ## rewards::DistributionOutcome [#rewardsdistributionoutcome] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DistributionOutcome { pub recipient_did: String, pub amount: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub generation: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub lineage_parent_did: Option } ``` Source line: `39`. ## rewards::RewardDistributionPlan [#rewardsrewarddistributionplan] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RewardDistributionPlan { pub attestation_id: String, pub run_id: String, pub rollout_batch_id: String, pub total_amount: u64, pub outcomes: Vec } ``` Source line: `49`. ## rewards::RewardDistributionPlan::from\_attestation [#rewardsrewarddistributionplanfrom_attestation] ```rust pub fn from_attestation( attestation: &RewardBatchAttestation, pool_remaining: u64, mode: LineageRewardMode, ) -> Result; ``` Source line: `58`. # sigil-crucible · rollout URL: https://docs.sigil.ml/reference/rust/sigil-crucible/rollout Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/rollout.md Source declarations, signatures and documentation for rollout. Source: `sigil/node/sigil-crucible/src/rollout.rs`. SHA-256: `0186ce61c7a35abb164985384aee80db90cf6d947dfc939685583516a6481e09`. 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. ## rollout::RolloutBatchMetadata [#rolloutrolloutbatchmetadata] Per-batch roots and environment anchors. The rollout payload itself stays off-chain behind `artifact`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RolloutBatchMetadata { pub environment_commitment: ArtifactCommitment, pub policy_digest: SigilHash, pub rollout_root: SigilHash, pub metrics_root: SigilHash } ``` Source line: `9`. ## rollout::RolloutBatchCommitment [#rolloutrolloutbatchcommitment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RolloutBatchCommitment { pub run_id: String, pub batch_id: String, pub policy_version: u32, pub artifact: ArtifactCommitment, pub sample_count: u64, pub total_reward: u64, pub committed_by_did: String, pub committed_at_epoch: u64, pub verifier_mode: VerifierMode, pub metadata: RolloutBatchMetadata } ``` Source line: `17`. ## rollout::RolloutBatchCommitment::validate\_for\_run [#rolloutrolloutbatchcommitmentvalidate_for_run] ```rust pub fn validate_for_run( &self, run: &TrainingRun, launch_policy: &CruciblePolicy, current_epoch: u64, ) -> Result<(), CrucibleError>; ``` Source line: `31`. # sigil-crucible · run URL: https://docs.sigil.ml/reference/rust/sigil-crucible/run Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/run.md Source declarations, signatures and documentation for run. Source: `sigil/node/sigil-crucible/src/run.rs`. SHA-256: `d0df4cfc9323a5eaea09c02bcf593bc142e260f077db8c6d2aac5efb7b1e39ba`. 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. ## run::CruciblePolicy [#runcruciblepolicy] Runtime policy for exposing Crucible. Canary/mainnet should boot with `fail_closed()` until governance or an explicit launch gate enables it. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CruciblePolicy { pub enabled: bool, pub coordinator_signed_verification: bool, pub commitment_only_verification: bool, pub redundant_verification: bool, pub tee_verification: bool, pub zk_verification: bool, pub lineage_rewards: bool, pub max_rollout_staleness_epochs: u64, #[serde(default = "default_reward_token_id")] pub reward_token_id: String, pub reward_pool_account_did: String } ``` Source line: `9`. ## run::CruciblePolicy::fail\_closed [#runcruciblepolicyfail_closed] ```rust pub fn fail_closed() -> Self; ``` Source line: `24`. ## run::CruciblePolicy::mode\_available [#runcruciblepolicymode_available] ```rust pub fn mode_available(&self, mode: VerifierMode) -> bool; ``` Source line: `39`. ## run::CruciblePolicy::from\_env [#runcruciblepolicyfrom_env] ```rust pub fn from_env() -> Result; ``` Source line: `49`. ## run::CruciblePolicy::require\_enabled [#runcruciblepolicyrequire_enabled] ```rust pub fn require_enabled(&self) -> Result<(), CrucibleError>; ``` Source line: `102`. ## run::CruciblePolicy::require\_mode [#runcruciblepolicyrequire_mode] ```rust pub fn require_mode(&self, mode: VerifierMode) -> Result<(), CrucibleError>; ``` Source line: `110`. ## run::RolloutPolicy [#runrolloutpolicy] Versioned rollout verification policy selected at run open. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RolloutPolicy { pub version: u32, pub verifier_mode: VerifierMode, pub max_staleness_epochs: u64, pub min_verifier_attestations: u32, pub allow_commitment_only: bool } ``` Source line: `122`. ## run::TrainingRunConfig [#runtrainingrunconfig] Immutable run configuration committed at open. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainingRunConfig { pub run_id: String, pub coordinator_did: String, pub reward_token_id: String, pub reward_pool: u64, pub model_family: String, pub objective_commitment: ArtifactCommitment, pub policy: RolloutPolicy, pub eligible_verifier_dids: Vec, pub authorized_publishers: Vec, pub opened_at_epoch: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub deadline_epoch: Option } ``` Source line: `132`. ## run::TrainingRunStatus [#runtrainingrunstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TrainingRunStatus { Open, Closed, Cancelled, } ``` Source line: `149`. ## run::CloseReason [#runclosereason] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum CloseReason { Completed, Expired, Cancelled, } ``` Source line: `157`. ## run::TrainingRun [#runtrainingrun] On-chain run state. It anchors policy, pool accounting, and weight heads; rollout bytes and model weights remain off-chain behind commitments. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainingRun { pub config: TrainingRunConfig, pub status: TrainingRunStatus, pub reward_pool_remaining: u64, #[serde(default)] pub reward_pool_reserved: u64, #[serde(default)] pub reward_pool_distributed: u64, pub current_policy_version: u32, #[serde(default, skip_serializing_if = "Option::is_none")] pub current_weight_root: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub previous_weight_root: Option, pub opened_at_epoch: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub closed_at_epoch: Option } ``` Source line: `166`. ## run::TrainingRun::open [#runtrainingrunopen] ```rust pub fn open( config: TrainingRunConfig, launch_policy: &CruciblePolicy, ) -> Result; ``` Source line: `185`. ## run::TrainingRun::ensure\_open [#runtrainingrunensure_open] ```rust pub fn ensure_open(&self) -> Result<(), CrucibleError>; ``` Source line: `231`. ## run::TrainingRun::verifier\_is\_eligible [#runtrainingrunverifier_is_eligible] ```rust pub fn verifier_is_eligible(&self, verifier_did: &str) -> bool; ``` Source line: `239`. ## run::TrainingRun::publisher\_is\_authorized [#runtrainingrunpublisher_is_authorized] ```rust pub fn publisher_is_authorized(&self, publisher_did: &str) -> bool; ``` Source line: `249`. ## run::TrainingRun::reserve\_reward [#runtrainingrunreserve_reward] ```rust pub fn reserve_reward(&mut self, amount: u64) -> Result<(), CrucibleError>; ``` Source line: `258`. ## run::TrainingRun::settle\_reserved\_reward [#runtrainingrunsettle_reserved_reward] ```rust pub fn settle_reserved_reward(&mut self, amount: u64) -> Result<(), CrucibleError>; ``` Source line: `278`. ## run::TrainingRun::refundable\_reward\_pool [#runtrainingrunrefundable_reward_pool] ```rust pub fn refundable_reward_pool(&self) -> u64; ``` Source line: `299`. ## run::TrainingRun::record\_weight\_root [#runtrainingrunrecord_weight_root] ```rust pub fn record_weight_root(&mut self, model_root: SigilHash) -> Result<(), CrucibleError>; ``` Source line: `304`. ## run::TrainingRun::can\_close [#runtrainingruncan_close] ```rust pub fn can_close(&self, reason: CloseReason, current_epoch: u64) -> bool; ``` Source line: `311`. ## run::TrainingRun::close [#runtrainingrunclose] ```rust pub fn close(&mut self, reason: CloseReason, current_epoch: u64) -> Result<(), CrucibleError>; ``` Source line: `327`. # sigil-crucible · types URL: https://docs.sigil.ml/reference/rust/sigil-crucible/types Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/types.md Source declarations, signatures and documentation for types. Source: `sigil/node/sigil-crucible/src/types.rs`. SHA-256: `e8f0f1577641d7c9c8827561650d846a67684a0b61be0ad0c561d4b366f3a559`. 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. ## types::VerifierMode [#typesverifiermode] Verification path required for a rollout batch. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum VerifierMode { /// Launch-live mode: the run coordinator's signed reward attestation is /// the verifier signal. This requires no external verifier registry. CoordinatorSigned, /// Only an artifact commitment is anchored. Disabled by default because it /// does not independently verify the rollout. CommitmentOnly, /// Multiple independent verifier attestations over the same batch. Redundant, /// Trusted execution environment attestation. Fails closed until a concrete /// verifier is wired. Tee, /// Zero-knowledge proof verification. Fails closed until a concrete /// verifier is wired. Zk, } ``` Source line: `7`. ## types::TrainingSlashReason [#typestrainingslashreason] Slashable behavior in the Crucible training protocol. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TrainingSlashReason { InvalidCommitment, StaleRollout, PolicyViolation, Equivocation, InvalidWeights, FalseAttestation, } ``` Source line: `27`. ## types::TrainingSlashRecord [#typestrainingslashrecord] Evidence anchor for a slashing event. Evidence bytes live off-chain. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainingSlashRecord { pub slash_id: String, pub run_id: String, pub offender_did: String, pub reporter_did: String, pub reason: TrainingSlashReason, pub evidence: ArtifactCommitment, pub amount: u64, pub slashed_at_epoch: u64 } ``` Source line: `38`. # sigil-crucible · weights URL: https://docs.sigil.ml/reference/rust/sigil-crucible/weights Markdown: https://docs.sigil.ml/reference/rust/sigil-crucible/weights.md Source declarations, signatures and documentation for weights. Source: `sigil/node/sigil-crucible/src/weights.rs`. SHA-256: `eb17c61f909f083b30b3548cfcb841cd2e82eff1a77a168b2d7d011832169f55`. 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. ## weights::WeightPublicationRecord [#weightsweightpublicationrecord] Anchor for a published model checkpoint. The model weights remain off-chain behind `artifact`; consensus stores roots and authorization metadata only. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WeightPublicationRecord { pub run_id: String, pub model_root: SigilHash, pub artifact: ArtifactCommitment, #[serde(default, skip_serializing_if = "Option::is_none")] pub previous_root: Option, pub publisher_did: String, pub published_at_epoch: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub rollout_batch_id: Option } ``` Source line: `9`. ## weights::WeightPublicationRecord::validate\_for\_run [#weightsweightpublicationrecordvalidate_for_run] ```rust pub fn validate_for_run(&self, run: &TrainingRun) -> Result<(), CrucibleError>; ``` Source line: `22`. # sigil-czac · channel URL: https://docs.sigil.ml/reference/rust/sigil-czac/channel Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/channel.md Source declarations, signatures and documentation for channel. Source: `sigil/node/sigil-czac/src/channel.rs`. SHA-256: `b8a5b579ba269b40c30c72bdf9f5ba9c1d307832106c0402ba892689d03f89be`. 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. ## channel::ChannelType [#channelchanneltype] Channel type determines the lifecycle and behavior of the channel. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ChannelType { /// Short-lived channel that auto-closes after inactivity. Ephemeral { /// Seconds of inactivity before auto-close (default: 300). auto_close_secs: u64, }, /// Long-lived channel with periodic heartbeats. Persistent { /// Seconds between heartbeats. heartbeat_interval: u64, }, /// Pub/sub channel for one-to-many messaging. Broadcast { /// Maximum number of subscribers. max_subscribers: u32, }, /// Payment channel with escrow for economic transactions. Payment { /// Escrow amount in micro-MINT. escrow_amount: u64, }, } ``` Source line: `43`. ## channel::ChannelState [#channelchannelstate] Channel state machine states. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ChannelState { /// Initial state — channel created, handshake not started. Init, /// Challenge issued by the responder; awaiting signed response. ChallengeIssued { /// The 32-byte random challenge. challenge: [u8; 32], }, /// Initiator has responded with an Ed25519 signature over the transcript. /// /// The 64-byte signature is stored (as bytes) so the responder can include /// it in audit logs and so future verification paths can re-check the proof. ChallengeResponded { /// The 64-byte Ed25519 signature from the initiator, serialized as bytes. signature: Vec, }, /// Handshake confirmed by both parties. Confirmed, /// Channel is open and ready for message exchange. Open { /// Unix timestamp when the channel was opened. opened_at: u64, }, /// Channel close has been requested. Closing { /// Unix timestamp when close was requested. close_requested_at: u64, }, /// Channel is closed and no longer usable. Closed, } ``` Source line: `68`. ## channel::Channel [#channelchannel] A cross-zone communication channel. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Channel { /// Unique channel identifier (UUID v4). pub channel_id: String, /// The channel type and its parameters. pub channel_type: ChannelType, /// OAS DID of the channel initiator. pub initiator_did: String, /// OAS DID of the channel responder. pub responder_did: String, /// Source organization zone. pub source_zone: String, /// Target organization zone. pub target_zone: String, /// Current channel state. pub state: ChannelState, /// Unix timestamp when the channel was created. pub created_at: u64, /// Unix timestamp of the last activity on this channel. pub last_activity: u64, /// Number of messages sent on this channel. pub messages_sent: u64, /// Number of messages received on this channel. pub messages_received: u64 } ``` Source line: `117`. ## channel::HandshakeMessage [#channelhandshakemessage] Handshake messages exchanged during channel establishment. The 5-step handshake: 1. Initiator sends `Request` 2. Responder sends `Challenge` 3. Initiator sends `Response` (Ed25519 signature over domain-separated transcript) 4. Responder sends `Confirm` 5. Either party sends `Open` ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum HandshakeMessage { /// Step 1: Channel open request from the initiator. Request { /// Requested channel type. channel_type: ChannelType, /// OAS DID of the initiator. initiator_did: String, /// Source zone of the initiator. source_zone: String, }, /// Step 2: Challenge from the responder. Challenge { /// 32-byte cryptographic random challenge. challenge: [u8; 32], }, /// Step 3: Challenge response from the initiator. Response { /// 64-byte Ed25519 signature over the domain-separated transcript. /// /// Signed by the initiator's long-term Ed25519 key (resolved via DID). /// The responder verifies this against the initiator's published key. /// Serialized as bytes (Vec) because serde only derives [u8; N] for N <= 32. challenge_response: Vec, /// Key material for session key derivation. session_key_material: Vec, }, /// Step 4: Confirmation from the responder. Confirm { /// Key material for session key derivation. session_key_material: Vec, }, /// Step 5: Channel is now open. Open, } ``` Source line: `151`. ## channel::ChannelManager [#channelchannelmanager] Manages all active channels and their state transitions. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ChannelManager { } ``` Source line: `188`. ## channel::ChannelManager::new [#channelchannelmanagernew] Create a new, empty channel manager. ```rust pub fn new() -> Self; ``` Source line: `197`. ## channel::ChannelManager::initiate [#channelchannelmanagerinitiate] Initiate a new channel handshake. Creates a channel in `Init` state and returns the channel ID and the first handshake message (`Request`) to send to the responder. ```rust pub fn initiate( &mut self, channel_type: ChannelType, initiator_did: String, responder_did: String, source_zone: String, target_zone: String, ) -> Result<(String, HandshakeMessage), CzacError>; ``` Source line: `208`. ## channel::ChannelManager::handle\_handshake [#channelchannelmanagerhandle_handshake] Process a handshake message for a given channel. Returns `Ok(Some(reply))` if a reply handshake message should be sent, or `Ok(None)` if the handshake step was terminal (e.g., `Open`). # Signature-based challenge verification (steps 2 → 3) [#signature-based-challenge-verification-steps-2--3] When the responder processes a `Response` message, it verifies the Ed25519 signature using \[`verify_handshake_signature`]. Verification failure causes an immediate `HandshakeError` — the channel is NOT advanced to `Confirmed`. In the test-only path (via \[`handle_handshake_with_key`]) the caller supplies the verifying key directly. In the production path the key would be resolved via DID; the signature API is identical. ```rust pub fn handle_handshake( &mut self, channel_id: &str, message: HandshakeMessage, ) -> Result, CzacError>; ``` Source line: `287`. ## channel::ChannelManager::handle\_handshake\_with\_signing\_key [#channelchannelmanagerhandle_handshake_with_signing_key] Process a step-2→3 `Challenge` message using a caller-supplied signing key. This is the **production entry point** for the initiator side of the handshake: the caller resolves the signing key from the DID store and passes it here. The signature is created over the full domain-separated transcript so the responder can verify it against the published verifying key. # Errors [#errors] Returns \[`CzacError::HandshakeError`] if the channel is not in `ChallengeIssued` state or if the challenge does not match. ```rust pub fn handle_handshake_with_signing_key( &mut self, channel_id: &str, received_challenge: [u8; 32], signing_key: &SigningKey, ) -> Result; ``` Source line: `411`. ## channel::ChannelManager::handle\_handshake\_with\_verifying\_key [#channelchannelmanagerhandle_handshake_with_verifying_key] Process a step-3→4 `Response` message and verify the Ed25519 signature. This is the **production entry point** for the responder side: the caller resolves the initiator's verifying key from its DID document and passes it here. The signature is verified against the full domain-separated transcript reconstructed from the channel's stored state. # Errors [#errors-1] Returns \[`CzacError::HandshakeError`] immediately on signature failure — the channel state is **not** advanced. ```rust pub fn handle_handshake_with_verifying_key( &mut self, channel_id: &str, challenge: [u8; 32], challenge_response: Vec, verifying_key_bytes: &[u8; 32], session_key_material: Vec, ) -> Result; ``` Source line: `469`. ## channel::ChannelManager::close [#channelchannelmanagerclose] Close a channel. Transitions the channel to `Closing` if open, or directly to `Closed` if it was in a handshake state. ```rust pub fn close(&mut self, channel_id: &str) -> Result<(), CzacError>; ``` Source line: `506`. ## channel::ChannelManager::get [#channelchannelmanagerget] Get a reference to a channel by its ID. ```rust pub fn get(&self, channel_id: &str) -> Option<&Channel>; ``` Source line: `538`. ## channel::ChannelManager::get\_mut [#channelchannelmanagerget_mut] Get a mutable reference to a channel by its ID. ```rust pub fn get_mut(&mut self, channel_id: &str) -> Option<&mut Channel>; ``` Source line: `543`. ## channel::ChannelManager::channels\_for\_zone\_pair [#channelchannelmanagerchannels_for_zone_pair] Find all channels between a source and target zone. ```rust pub fn channels_for_zone_pair(&self, source: &str, target: &str) -> Vec<&Channel>; ``` Source line: `548`. ## channel::ChannelManager::cleanup\_expired [#channelchannelmanagercleanup_expired] Remove expired ephemeral channels. Returns the IDs of removed channels. ```rust pub fn cleanup_expired(&mut self, now: u64) -> Vec; ``` Source line: `556`. ## channel::ChannelManager::len [#channelchannelmanagerlen] Returns the total number of channels (all states). ```rust pub fn len(&self) -> usize; ``` Source line: `595`. ## channel::ChannelManager::is\_empty [#channelchannelmanageris_empty] Returns true if there are no channels. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `600`. ## channel::build\_handshake\_transcript [#channelbuild_handshake_transcript] Build the domain-separated transcript that the initiator signs during step 3. ```text transcript = DOMAIN_TAG || channel_id || "\n" || source_zone || "\n" || target_zone || "\n" || challenge (32 bytes, raw) ``` Each text field is separated by a newline byte so the encoding is unambiguous regardless of field content. ```rust pub fn build_handshake_transcript( channel_id: &str, source_zone: &str, target_zone: &str, challenge: &[u8; 32], ) -> Vec; ``` Source line: `627`. ## channel::verify\_handshake\_signature [#channelverify_handshake_signature] Verify an Ed25519 handshake signature. Returns `Ok(())` if the signature is valid. Returns \[`CzacError::HandshakeError`] on any failure — including invalid key bytes, invalid signature bytes, or verification mismatch. The error message does not reveal whether the failure was due to a key parse error or a signature mismatch to avoid oracle attacks. ```rust pub fn verify_handshake_signature( verifying_key_bytes: &[u8; 32], transcript: &[u8], signature_bytes: &[u8], ) -> Result<(), CzacError>; ``` Source line: `661`. # sigil-czac · crate URL: https://docs.sigil.ml/reference/rust/sigil-czac/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-czac/src/lib.rs`. SHA-256: `fa84c49445ca82dbac816bbb3e209a8079a92d7e779e9ebe4b596d582321e2cc`. 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. ## channel [#channel] ```rust pub mod channel; ``` Source line: `9`. ## envelope [#envelope] ```rust pub mod envelope; ``` Source line: `10`. ## error [#error] ```rust pub mod error; ``` Source line: `11`. ## flow [#flow] ```rust pub mod flow; ``` Source line: `12`. ## payment [#payment] ```rust pub mod payment; ``` Source line: `13`. ## routing [#routing] ```rust pub mod routing; ``` Source line: `14`. ## session [#session] ```rust pub mod session; ``` Source line: `15`. ## settlement [#settlement] ```rust pub mod settlement; ``` Source line: `16`. # sigil-czac · envelope URL: https://docs.sigil.ml/reference/rust/sigil-czac/envelope Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/envelope.md Source declarations, signatures and documentation for envelope. Source: `sigil/node/sigil-czac/src/envelope.rs`. SHA-256: `7b6f48a76d700190d4280147ebeb2a80be76901017a3f8b858c2e86169c89278`. 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. ## envelope::CZAC\_PROTOCOL\_VERSION [#envelopeczac_protocol_version] Protocol version for CZAC envelopes. ```rust pub const CZAC_PROTOCOL_VERSION: u8; ``` Source line: `32`. ## envelope::DEFAULT\_TTL\_SECS [#envelopedefault_ttl_secs] Default TTL for envelopes: 5 minutes. ```rust pub const DEFAULT_TTL_SECS: u64; ``` Source line: `35`. ## envelope::ENVELOPE\_DOMAIN\_TAG [#envelopeenvelope_domain_tag] Domain separation tag for CZAC envelope signatures. Prefixes every signed transcript so that an Ed25519 signature produced for a CZAC envelope **cannot** be replayed against the handshake path (which uses `b"sigil/czac/handshake/v1\n"`) or any other context. # Field ordering (canonical bytes) [#field-ordering-canonical-bytes] The signed transcript is: ```text ENVELOPE_DOMAIN_TAG || u8:version || u32-le:len(message_id) || message_id || u32-le:len(channel_id) || channel_id || u64-le:sequence || u32-le:len(sender_did) || sender_did || u32-le:len(recipient_did) || recipient_did || u32-le:len(source_zone) || source_zone || u32-le:len(target_zone) || target_zone || u64-le:timestamp || u64-le:ttl || nonce (12 bytes, raw) || u32-le:len(payload) || payload ``` \*\*This ordering must not be changed without bumping the domain tag version. ```rust pub const ENVELOPE_DOMAIN_TAG: &[u8]; ``` Source line: `64`. ## envelope::CzacEnvelope [#envelopeczacenvelope] A signed message envelope for cross-zone agent communication. The envelope carries all metadata needed for routing, replay protection, and signature verification. The `payload` field contains the encrypted or plaintext application data. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacEnvelope { /// Protocol version (currently 1). pub version: u8, /// Unique message identifier (UUID v4). pub message_id: String, /// Channel this message belongs to. pub channel_id: String, /// Per-channel monotonic sequence number. pub sequence: u64, /// OAS DID of the sender. pub sender_did: String, /// OAS DID of the recipient (or zone DID for broadcast). pub recipient_did: String, /// Source organization zone ID. pub source_zone: String, /// Target organization zone ID. pub target_zone: String, /// Unix timestamp (seconds) when the envelope was created. pub timestamp: u64, /// Time-to-live in seconds. pub ttl: u64, /// Unique nonce for replay protection. pub nonce: [u8; 12], /// Encrypted or plaintext payload. pub payload: Vec, /// Ed25519 signature (64 bytes) over the domain-separated transcript. pub signature: Vec } ``` Source line: `72`. ## envelope::CzacEnvelope::canonical\_bytes [#envelopeczacenvelopecanonical_bytes] Compute the canonical byte representation for signing. Uses length-prefixed (u32 LE) encoding for variable-length string and byte fields, and little-endian encoding for all integer fields. The ordering is fixed by \[`ENVELOPE_DOMAIN_TAG`] — do not reorder. The `signature` field is **excluded** from the canonical bytes; this is what makes it safe to call after signing. ```rust pub fn canonical_bytes(&self) -> Vec; ``` Source line: `110`. ## envelope::CzacEnvelope::digest [#envelopeczacenvelopedigest] Compute the BLAKE3 digest of the domain-separated transcript. This 32-byte value is what Ed25519 signs / verifies. ```rust pub fn digest(&self) -> [u8; 32]; ``` Source line: `141`. ## envelope::CzacEnvelope::sign [#envelopeczacenvelopesign] Sign this envelope with the given Ed25519 signing key. Computes `BLAKE3(ENVELOPE_DOMAIN_TAG || canonical_bytes())` and signs the resulting 32-byte digest with Ed25519. The resulting 64-byte signature is stored in `envelope.signature`. # Errors [#errors] Returns \[`CzacError::InvalidSignature`] if the signing key bytes are not a valid 32-byte Ed25519 seed. ```rust pub fn sign(envelope: &mut CzacEnvelope, signing_key: &SigningKey) -> Result<(), CzacError>; ``` Source line: `155`. ## envelope::CzacEnvelope::sign\_from\_bytes [#envelopeczacenvelopesign_from_bytes] Sign this envelope from raw 32-byte Ed25519 seed bytes. Convenience wrapper around \[`sign`] for callers that hold key material as raw bytes rather than a typed \[`SigningKey`]. # Errors [#errors-1] Returns \[`CzacError::InvalidSignature`] if `seed_bytes` is not exactly 32 bytes. ```rust pub fn sign_from_bytes( envelope: &mut CzacEnvelope, seed_bytes: &[u8], ) -> Result<(), CzacError>; ``` Source line: `171`. ## envelope::CzacEnvelope::verify\_signature [#envelopeczacenvelopeverify_signature] Verify the envelope signature against an Ed25519 verifying key. Recomputes `BLAKE3(ENVELOPE_DOMAIN_TAG || canonical_bytes())` and verifies the stored 64-byte signature against it using the supplied key. Returns `Ok(())` on success. Returns \[`CzacError::InvalidSignature`] for any failure (empty signature, wrong key, tampered fields, etc.) — the error message does **not** distinguish between a key parse failure and a signature mismatch to avoid oracle attacks. ```rust pub fn verify_signature(&self, verifying_key: &VerifyingKey) -> Result<(), CzacError>; ``` Source line: `194`. ## envelope::CzacEnvelope::verify\_signature\_from\_bytes [#envelopeczacenvelopeverify_signature_from_bytes] Verify from a raw 32-byte Ed25519 compressed point. Convenience wrapper around \[`verify_signature`] for callers that hold key material as raw bytes. # Errors [#errors-2] Returns \[`CzacError::InvalidSignature`] if the key bytes are not a valid compressed Ed25519 point, the signature is empty, or verification fails. ```rust pub fn verify_signature_from_bytes( &self, verifying_key_bytes: &[u8; 32], ) -> Result<(), CzacError>; ``` Source line: `221`. ## envelope::CzacEnvelope::is\_expired [#envelopeczacenvelopeis_expired] Check whether this envelope has expired given the current time. ```rust pub fn is_expired(&self, now: u64) -> bool; ``` Source line: `231`. ## envelope::new\_envelope [#envelopenew_envelope] Create a new envelope builder for convenience. ```rust pub fn new_envelope( channel_id: String, sequence: u64, sender_did: String, recipient_did: String, source_zone: String, target_zone: String, payload: Vec, ) -> CzacEnvelope; ``` Source line: `248`. # sigil-czac · error URL: https://docs.sigil.ml/reference/rust/sigil-czac/error Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-czac/src/error.rs`. SHA-256: `a5e03869ecccc65a95e64b60deb12a4ed1b7113f62b9b6d22663042d7bd19fc5`. 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. ## error::CzacError [#errorczacerror] Error types for the Cross-Zone Agent Communication protocol. 22 error codes covering all CZAC protocol layers: envelope, routing, channel, session, flow control, payment, and settlement. All errors produced by the CZAC protocol stack. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum CzacError { // -- Envelope (4) ------------------------------------------------------- /// Envelope signature verification failed. #[error("envelope: invalid signature — {0}")] InvalidSignature(String), /// Envelope has expired (TTL exceeded). #[error("envelope: message expired — age {age_secs}s exceeds ttl {ttl_secs}s")] MessageExpired { age_secs: u64, ttl_secs: u64 }, /// Envelope nonce has already been seen (replay attempt). #[error("envelope: replay detected — nonce already consumed")] ReplayDetected, /// Envelope serialization or deserialization failed. #[error("envelope: serialization error — {0}")] SerializationError(String), // -- Routing (3) -------------------------------------------------------- /// The requested zone was not found in the routing table. #[error("routing: zone not found — {zone_id}")] ZoneNotFound { zone_id: String }, /// A zone endpoint registration was invalid or conflicting. #[error("routing: invalid endpoint — {0}")] InvalidEndpoint(String), /// No route exists to the target zone. #[error("routing: no route to zone {zone_id}")] NoRoute { zone_id: String }, // -- Channel (5) -------------------------------------------------------- /// The channel was not found. #[error("channel: not found — {channel_id}")] ChannelNotFound { channel_id: String }, /// The channel is in an unexpected state for the requested operation. #[error("channel: invalid state transition from {from} to {to}")] InvalidChannelState { from: String, to: String }, /// The handshake message is out of order or unexpected. #[error("channel: unexpected handshake step — {0}")] HandshakeError(String), /// A duplicate channel initiation was attempted. #[error("channel: duplicate initiation — channel {channel_id} already exists")] DuplicateChannel { channel_id: String }, /// The channel has timed out (no activity within threshold). #[error("channel: timed out — channel {channel_id} idle for {idle_secs}s")] ChannelTimeout { channel_id: String, idle_secs: u64 }, // -- Session (2) -------------------------------------------------------- /// Session encryption or decryption failed. #[error("session: crypto error — {0}")] SessionCryptoError(String), /// Session keys need rekeying (nonce counter exhausted). #[error("session: rekey required — {messages_sent} messages sent, limit {limit}")] RekeyRequired { messages_sent: u64, limit: u64 }, // -- Flow Control (3) --------------------------------------------------- /// No send credits available (backpressured). #[error("flow: no credits available — {available} of {required} credits")] NoCredits { available: u64, required: u64 }, /// The priority queue is full. #[error("flow: queue full — {queue_depth} messages queued")] QueueFull { queue_depth: usize }, /// Invalid priority value. #[error("flow: invalid priority — {0}")] InvalidPriority(String), // -- Payment (3) -------------------------------------------------------- /// Payment channel balance invariant violated (a + b != escrow). #[error( "payment: balance invariant violated — a={balance_a} + b={balance_b} != escrow={escrow}" )] BalanceInvariant { balance_a: u64, balance_b: u64, escrow: u64, }, /// The payment channel is in an invalid state for the requested operation. #[error("payment: invalid state — {0}")] InvalidPaymentState(String), /// The balance update sequence is stale or out of order. #[error("payment: stale update — got seq {got}, expected > {expected}")] StaleUpdate { got: u64, expected: u64 }, // -- Settlement (2) ----------------------------------------------------- /// Settlement proof verification failed. #[error("settlement: invalid proof — {0}")] InvalidProof(String), /// The dispute window has not yet elapsed. #[error("settlement: dispute window active — {blocks_remaining} blocks remaining")] DisputeWindowActive { blocks_remaining: u64 }, } ``` Source line: `8`. # sigil-czac · flow URL: https://docs.sigil.ml/reference/rust/sigil-czac/flow Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/flow.md Source declarations, signatures and documentation for flow. Source: `sigil/node/sigil-czac/src/flow.rs`. SHA-256: `ef935128d1b14110dc355f149051894b62bb46de0488715086f84ab105ac2785`. 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. ## flow::DEFAULT\_INITIAL\_CREDITS [#flowdefault_initial_credits] Default initial credits per channel. ```rust pub const DEFAULT_INITIAL_CREDITS: u64; ``` Source line: `18`. ## flow::DEFAULT\_MAX\_CREDITS [#flowdefault_max_credits] Default maximum credits per channel. ```rust pub const DEFAULT_MAX_CREDITS: u64; ``` Source line: `21`. ## flow::Priority [#flowpriority] Message priority levels. Lower numeric value = higher priority. Critical messages are always dequeued before High, High before Normal, Normal before Low. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Priority { /// Highest priority — system-critical messages. Critical = 0, /// High priority — time-sensitive messages. High = 1, /// Normal priority — default for application messages. Normal = 2, /// Low priority — background/bulk transfers. Low = 3, } ``` Source line: `31`. ## flow::Priority::COUNT [#flowprioritycount] Number of priority levels. ```rust pub const COUNT: usize; ``` Source line: `44`. ## flow::Priority::from\_index [#flowpriorityfrom_index] Convert from a numeric index. ```rust pub fn from_index(idx: usize) -> Result; ``` Source line: `47`. ## flow::FlowController [#flowflowcontroller] Credit-based flow controller with priority queues. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct FlowController { /// Initial credits assigned when the channel opens. pub initial_credits: u64, /// Currently available send credits. pub available_credits: u64, /// Maximum credits that can be accumulated. pub max_credits: u64, /// Congestion window (for adaptive flow control). pub window_size: u64, /// Four priority queues: [Critical, High, Normal, Low]. pub priority_queues: [VecDeque>; 4] } ``` Source line: `62`. ## flow::FlowController::new [#flowflowcontrollernew] Create a new flow controller with the given credit limits. ```rust pub fn new(initial_credits: u64, max_credits: u64) -> Self; ``` Source line: `77`. ## flow::FlowController::can\_send [#flowflowcontrollercan_send] Check whether there are credits available to send. ```rust pub fn can_send(&self) -> bool; ``` Source line: `93`. ## flow::FlowController::consume\_credit [#flowflowcontrollerconsume_credit] Consume one send credit. ```rust pub fn consume_credit(&mut self) -> Result<(), CzacError>; ``` Source line: `98`. ## flow::FlowController::replenish [#flowflowcontrollerreplenish] Replenish credits (called when the remote acknowledges messages). Credits are capped at `max_credits`. ```rust pub fn replenish(&mut self, amount: u64); ``` Source line: `112`. ## flow::FlowController::enqueue [#flowflowcontrollerenqueue] Enqueue a message at the given priority. Returns an error if the total queue depth exceeds the maximum. ```rust pub fn enqueue(&mut self, data: Vec, priority: Priority) -> Result<(), CzacError>; ``` Source line: `122`. ## flow::FlowController::dequeue [#flowflowcontrollerdequeue] Dequeue the highest-priority message. Returns `None` if all queues are empty. ```rust pub fn dequeue(&mut self) -> Option<(Priority, Vec)>; ``` Source line: `134`. ## flow::FlowController::queue\_depth [#flowflowcontrollerqueue_depth] Total number of messages across all priority queues. ```rust pub fn queue_depth(&self) -> usize; ``` Source line: `146`. ## flow::FlowController::is\_backpressured [#flowflowcontrolleris_backpressured] Check whether backpressure should be applied. Returns `true` if either credits are exhausted or queues are deep. ```rust pub fn is_backpressured(&self) -> bool; ``` Source line: `153`. ## flow::FlowController::queue\_depth\_for [#flowflowcontrollerqueue_depth_for] Returns the number of messages in a specific priority queue. ```rust pub fn queue_depth_for(&self, priority: Priority) -> usize; ``` Source line: `158`. # sigil-czac URL: https://docs.sigil.ml/reference/rust/sigil-czac Markdown: https://docs.sigil.ml/reference/rust/sigil-czac.md Cross-Zone Agent Communication Protocol — 4-layer messaging stack for inter-zone communication Cross-Zone Agent Communication Protocol — 4-layer messaging stack for inter-zone communication | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-czac` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-czac/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_czac` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-czac = { path = "../sigil-czac" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-czac/crate) — 8 declarations * [channel](/reference/rust/sigil-czac/channel) — 19 declarations * [envelope](/reference/rust/sigil-czac/envelope) — 12 declarations * [error](/reference/rust/sigil-czac/error) — 1 declarations * [flow](/reference/rust/sigil-czac/flow) — 15 declarations * [payment](/reference/rust/sigil-czac/payment) — 16 declarations * [routing](/reference/rust/sigil-czac/routing) — 13 declarations * [session](/reference/rust/sigil-czac/session) — 7 declarations * [settlement](/reference/rust/sigil-czac/settlement) — 8 declarations # sigil-czac · payment URL: https://docs.sigil.ml/reference/rust/sigil-czac/payment Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/payment.md Source declarations, signatures and documentation for payment. Source: `sigil/node/sigil-czac/src/payment.rs`. SHA-256: `4034bf3daff47fd3728e90dc3e7a9e60817915ad7ad3288744e8082f3870d46c`. 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. ## payment::DEFAULT\_DISPUTE\_WINDOW [#paymentdefault_dispute_window] Default dispute window in blocks. ```rust pub const DEFAULT_DISPUTE_WINDOW: u64; ``` Source line: `21`. ## payment::BALANCE\_UPDATE\_DOMAIN\_TAG [#paymentbalance_update_domain_tag] Domain separator for signed CZAC payment-channel balance updates. The signed transcript is: ```text BALANCE_UPDATE_DOMAIN_TAG || u32-le:len(channel_id) || channel_id || u64-le:sequence || u64-le:balance_a || u64-le:balance_b || u64-le:escrow_amount ``` `escrow_amount` is included to bind the update to the funded channel size. ```rust pub const BALANCE_UPDATE_DOMAIN_TAG: &[u8]; ``` Source line: `37`. ## payment::PaymentChannelState [#paymentpaymentchannelstate] Payment channel state. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum PaymentChannelState { /// Channel has been funded and is ready for use. Funded, /// Channel is actively exchanging balance updates. Active, /// Both parties agreed to close cooperatively. CooperativeClose, /// One party initiated a unilateral close. UnilateralClose { /// DID of the party who initiated the close. closer_did: String, /// Block height at which the close was initiated. close_height: u64, }, /// A dispute has been filed against a unilateral close. Disputed { /// DID of the party who filed the dispute. disputer_did: String, /// Block height at which the dispute was filed. dispute_height: u64, }, /// Channel has been settled on-chain. Settled, } ``` Source line: `41`. ## payment::BalanceUpdate [#paymentbalanceupdate] A signed balance update exchanged between channel parties. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BalanceUpdate { /// Channel this update belongs to. pub channel_id: String, /// Monotonically increasing sequence number. pub sequence: u64, /// Party A's balance after this update. pub balance_a: u64, /// Party B's balance after this update. pub balance_b: u64, /// Party A's signature over (channel_id, sequence, balance_a, balance_b). pub signature_a: Vec, /// Party B's signature over (channel_id, sequence, balance_a, balance_b). pub signature_b: Vec } ``` Source line: `68`. ## payment::PaymentChannel [#paymentpaymentchannel] A payment channel between two parties. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PaymentChannel { /// Unique channel identifier. pub channel_id: String, /// OAS DID of party A (typically the initiator). pub party_a_did: String, /// OAS DID of party B (typically the responder). pub party_b_did: String, /// Total escrow amount locked in the channel. pub escrow_amount: u64, /// Party A's current balance. pub balance_a: u64, /// Party B's current balance. pub balance_b: u64, /// Current state update sequence number. pub sequence: u64, /// Current channel state. pub state: PaymentChannelState, /// Dispute window in blocks. pub dispute_window: u64 } ``` Source line: `85`. ## payment::PaymentChannel::new [#paymentpaymentchannelnew] Create a new payment channel in the `Funded` state. Initially, all funds belong to party A. ```rust pub fn new(channel_id: String, party_a: String, party_b: String, escrow: u64) -> Self; ``` Source line: `110`. ## payment::PaymentChannel::update\_balance [#paymentpaymentchannelupdate_balance] Apply a balance update to the channel. The update must: 1. Reference this channel. 2. Have a sequence > current sequence. 3. Preserve the balance invariant (a + b == escrow). 4. Have non-empty signatures from both parties. ```rust pub fn update_balance(&mut self, update: BalanceUpdate) -> Result<(), CzacError>; ``` Source line: `131`. ## payment::PaymentChannel::update\_balance\_with\_keys [#paymentpaymentchannelupdate_balance_with_keys] Apply a balance update after verifying both party signatures. The verifying keys must be resolved from the channel participants by the caller. They are deliberately not stored in the update payload, so an update cannot authorize itself with attacker-chosen keys. ```rust pub fn update_balance_with_keys( &mut self, update: BalanceUpdate, party_a_verifying_key_bytes: &[u8; 32], party_b_verifying_key_bytes: &[u8; 32], ) -> Result<(), CzacError>; ``` Source line: `195`. ## payment::PaymentChannel::cooperative\_close [#paymentpaymentchannelcooperative_close] Close the channel cooperatively. Returns the final balances `(balance_a, balance_b)`. ```rust pub fn cooperative_close(&mut self) -> Result<(u64, u64), CzacError>; ``` Source line: `245`. ## payment::PaymentChannel::unilateral\_close [#paymentpaymentchannelunilateral_close] Initiate a unilateral close. The closer publishes their latest known state. The other party has `dispute_window` blocks to dispute with a newer state. ```rust pub fn unilateral_close( &mut self, closer_did: &str, current_height: u64, ) -> Result<(), CzacError>; ``` Source line: `263`. ## payment::PaymentChannel::dispute [#paymentpaymentchanneldispute] Dispute a unilateral close by providing a newer balance update. The disputer must provide a state with a higher sequence number than the current state, and must file during the dispute window. ```rust pub fn dispute( &mut self, disputer_did: &str, newer_update: BalanceUpdate, current_height: u64, ) -> Result<(), CzacError>; ``` Source line: `295`. ## payment::PaymentChannel::can\_settle [#paymentpaymentchannelcan_settle] Check whether the channel can be settled on-chain. For unilateral closes: the dispute window must have elapsed. For cooperative closes: always true. For disputes: the dispute window from the dispute height must have elapsed. ```rust pub fn can_settle(&self, current_height: u64) -> bool; ``` Source line: `361`. ## payment::PaymentChannel::settle [#paymentpaymentchannelsettle] Settle the channel, returning the final balances. SECURITY: Enforces `can_settle(current_height)` to prevent premature settlement. Without this check, a party could publish a stale state via unilateral close and settle before the counterparty has time to dispute, effectively stealing funds. ```rust pub fn settle(&mut self, current_height: u64) -> Result<(u64, u64), CzacError>; ``` Source line: `380`. ## payment::create\_signed\_balance\_update [#paymentcreate_signed_balance_update] Create a balance update signed by both channel parties. ```rust pub fn create_signed_balance_update( channel_id: String, sequence: u64, balance_a: u64, balance_b: u64, escrow_amount: u64, signing_key_a: &SigningKey, signing_key_b: &SigningKey, ) -> Result; ``` Source line: `418`. ## payment::verify\_balance\_update\_signatures [#paymentverify_balance_update_signatures] Verify both signatures on a balance update. ```rust pub fn verify_balance_update_signatures( update: &BalanceUpdate, escrow_amount: u64, party_a_verifying_key_bytes: &[u8; 32], party_b_verifying_key_bytes: &[u8; 32], ) -> Result<(), CzacError>; ``` Source line: `445`. ## payment::balance\_update\_digest [#paymentbalance_update_digest] Compute the canonical digest signed by channel parties for balance updates. ```rust pub fn balance_update_digest(update: &BalanceUpdate, escrow_amount: u64) -> [u8; 32]; ``` Source line: `468`. # sigil-czac · routing URL: https://docs.sigil.ml/reference/rust/sigil-czac/routing Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/routing.md Source declarations, signatures and documentation for routing. Source: `sigil/node/sigil-czac/src/routing.rs`. SHA-256: `1d6fb16ae6411c0cd764e687dae5a9397e292d3ec0ab24308f272db2c023fb6d`. 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. ## routing::ZoneEndpoint [#routingzoneendpoint] A zone endpoint registration in the routing table. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ZoneEndpoint { /// Unique zone identifier. pub zone_id: String, /// OAS DID of the organization that owns this zone. pub org_did: String, /// Multiaddresses where this zone can be reached. pub addresses: Vec, /// Capabilities this zone advertises (e.g., "czac.payment", "czac.broadcast"). pub capabilities: Vec, /// Unix timestamp when this endpoint was last seen / refreshed. pub last_seen: u64, /// Time-to-live in seconds before this entry is considered stale. pub ttl: u64 } ``` Source line: `16`. ## routing::ZoneEndpoint::is\_expired [#routingzoneendpointis_expired] Check whether this endpoint has expired at the given time. ```rust pub fn is_expired(&self, now: u64) -> bool; ``` Source line: `33`. ## routing::RoutingTable [#routingroutingtable] Routing table for zone endpoint discovery. Provides O(1) lookup by zone ID and O(n) lookup by org DID. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RoutingTable { } ``` Source line: `42`. ## routing::RoutingTable::new [#routingroutingtablenew] Create a new routing table with the given default cache TTL. ```rust pub fn new(cache_ttl: u64) -> Self; ``` Source line: `51`. ## routing::RoutingTable::register [#routingroutingtableregister] Register or update a zone endpoint. Returns an error if the endpoint has no zone ID or no addresses. ```rust pub fn register(&mut self, endpoint: ZoneEndpoint) -> Result<(), CzacError>; ``` Source line: `61`. ## routing::RoutingTable::lookup [#routingroutingtablelookup] Look up a zone endpoint by zone ID. ```rust pub fn lookup(&self, zone_id: &str) -> Option<&ZoneEndpoint>; ``` Source line: `78`. ## routing::RoutingTable::lookup\_by\_org [#routingroutingtablelookup_by_org] Look up all zone endpoints belonging to a given organization. ```rust pub fn lookup_by_org(&self, org_did: &str) -> Vec<&ZoneEndpoint>; ``` Source line: `83`. ## routing::RoutingTable::remove\_expired [#routingroutingtableremove_expired] Remove all expired endpoints. Returns the number of entries removed. ```rust pub fn remove_expired(&mut self, now: u64) -> usize; ``` Source line: `91`. ## routing::RoutingTable::all\_zones [#routingroutingtableall_zones] Return zone IDs of all registered endpoints. ```rust pub fn all_zones(&self) -> Vec<&str>; ``` Source line: `98`. ## routing::RoutingTable::len [#routingroutingtablelen] Returns the number of registered endpoints. ```rust pub fn len(&self) -> usize; ``` Source line: `103`. ## routing::RoutingTable::is\_empty [#routingroutingtableis_empty] Returns true if the routing table is empty. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `108`. ## routing::RoutingTable::cache\_ttl [#routingroutingtablecache_ttl] Returns the default cache TTL. ```rust pub fn cache_ttl(&self) -> u64; ``` Source line: `113`. ## routing::RoutingTable::remove [#routingroutingtableremove] Remove a specific zone endpoint by zone ID. ```rust pub fn remove(&mut self, zone_id: &str) -> Option; ``` Source line: `118`. # sigil-czac · session URL: https://docs.sigil.ml/reference/rust/sigil-czac/session Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/session.md Source declarations, signatures and documentation for session. Source: `sigil/node/sigil-czac/src/session.rs`. SHA-256: `09f9716637b09055431b19d296c252c0d554087d9e7ff92d4c32cbcc4666b9dd`. 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. ## session::DEFAULT\_REKEY\_AFTER [#sessiondefault_rekey_after] Default number of messages before rekeying is required. 2^20 ≈ 1M messages. ChaCha20-Poly1305 with a 96-bit nonce allows up to 2^32 unique nonces per key before the birthday bound becomes significant; we rekey at 2^20 to provide a conservative safety margin and ensure forward secrecy through frequent key rotation. ```rust pub const DEFAULT_REKEY_AFTER: u64; ``` Source line: `39`. ## session::SessionKeys [#sessionsessionkeys] Session keys derived after a successful channel handshake. The initiator and responder derive different key pairs from the same shared secret to prevent key reuse in both directions. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SessionKeys { /// Local encryption key (ChaCha20-Poly1305, 32 bytes). pub local_key: [u8; 32], /// Remote encryption key for decrypting incoming messages. pub remote_key: [u8; 32], /// Nonce counter for outgoing messages. pub local_nonce_counter: u64, /// Nonce counter for incoming messages (next expected value). pub remote_nonce_counter: u64, /// Number of messages before rekeying (default: 2^20). pub rekey_after: u64, /// Unix timestamp when these keys were derived. pub created_at: u64 } ``` Source line: `46`. ## session::SessionKeys::derive [#sessionsessionkeysderive] Derive session keys from a shared secret. Both sides call this with the same `shared_secret` but opposite `initiator` values, ensuring they agree on which key is local vs. remote. Key derivation uses BLAKE3 KDF with distinct context strings so the two keys are cryptographically independent. # Arguments [#arguments] * `shared_secret` - 32-byte shared secret from the handshake. * `initiator` - `true` if this side initiated the channel. # Returns [#returns] A \[`SessionKeys`] ready to encrypt/decrypt with nonce counters at zero. ```rust pub fn derive(shared_secret: &[u8; 32], initiator: bool) -> Self; ``` Source line: `77`. ## session::SessionKeys::needs\_rekey [#sessionsessionkeysneeds_rekey] Check whether the session keys need rekeying. ```rust pub fn needs_rekey(&self) -> bool; ``` Source line: `103`. ## session::SessionKeys::next\_nonce [#sessionsessionkeysnext_nonce] Construct the next nonce from the local counter and increment it. ```rust pub fn next_nonce(&mut self) -> [u8; 12]; ``` Source line: `109`. ## session::SessionKeys::encrypt [#sessionsessionkeysencrypt] Encrypt plaintext with the local ChaCha20-Poly1305 key. Output format: `[nonce (12 bytes)] [ciphertext + tag (plaintext.len() + 16 bytes)]` The `aad` bytes (e.g. the serialized message header) are authenticated but not included in the output; the caller must transmit them alongside the ciphertext and supply identical bytes to [`decrypt`](Self::decrypt). # Errors [#errors] Returns \[`CzacError::RekeyRequired`] if the nonce counter has reached `rekey_after`. Returns \[`CzacError::SessionCryptoError`] on cipher failure. ```rust pub fn encrypt(&mut self, plaintext: &[u8], aad: &[u8]) -> Result, CzacError>; ``` Source line: `127`. ## session::SessionKeys::decrypt [#sessionsessionkeysdecrypt] Decrypt ciphertext with the remote ChaCha20-Poly1305 key. Expects input format: `[nonce (12 bytes)] [ciphertext + tag]` The `aad` must be identical to the bytes passed to [`encrypt`](Self::encrypt) on the sending side. Any mismatch, ciphertext tampering, or tag failure causes an immediate hard error — no plaintext is returned on failure. Nonce ordering is enforced: a message with a nonce counter less than the current `remote_nonce_counter` is rejected as a replay. # Errors [#errors-1] Returns \[`CzacError::SessionCryptoError`] if: * The input is too short (\< 12 + 16 bytes) * Nonce replay is detected * AAD mismatch or ciphertext tampering (authentication tag fails) ```rust pub fn decrypt(&mut self, data: &[u8], aad: &[u8]) -> Result, CzacError>; ``` Source line: `174`. # sigil-czac · settlement URL: https://docs.sigil.ml/reference/rust/sigil-czac/settlement Markdown: https://docs.sigil.ml/reference/rust/sigil-czac/settlement.md Source declarations, signatures and documentation for settlement. Source: `sigil/node/sigil-czac/src/settlement.rs`. SHA-256: `a2702b3b42d029b729dcf3f7e192ca308ee035d165700ae0fd461dab2c22edd8`. 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. ## settlement::SETTLEMENT\_DOMAIN\_TAG [#settlementsettlement_domain_tag] Domain separator for CZAC settlement signatures. The signed transcript is: ```text SETTLEMENT_DOMAIN_TAG || u32-le:len(channel_id) || channel_id || u64-le:latest_sequence || u64-le:final_balance_a || u64-le:final_balance_b || u64-le:escrow_amount ``` The `signatures` field is excluded. `escrow_amount` is included so a valid signature for one escrow cannot be replayed into a different channel amount even if a channel identifier is reused by a caller. ```rust pub const SETTLEMENT_DOMAIN_TAG: &[u8]; ``` Source line: `29`. ## settlement::SettlementProof [#settlementsettlementproof] A settlement proof submitted to the consensus layer. This proof authorizes the on-chain release of escrowed funds according to the final balance distribution. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SettlementProof { /// Payment channel ID being settled. pub channel_id: String, /// Final balance for party A. pub final_balance_a: u64, /// Final balance for party B. pub final_balance_b: u64, /// Latest state update sequence number. pub latest_sequence: u64, /// Signatures from both parties over the final state. pub signatures: Vec> } ``` Source line: `36`. ## settlement::verify\_settlement [#settlementverify_settlement] Verify that a settlement proof is valid against the escrow amount. Checks: 1. Balance invariant: `final_balance_a + final_balance_b == escrow_amount` 2. At least 2 signatures are present (both parties). 3. Channel ID is non-empty. ```rust pub fn verify_settlement(proof: &SettlementProof, escrow_amount: u64) -> Result; ``` Source line: `55`. ## settlement::verify\_settlement\_with\_keys [#settlementverify_settlement_with_keys] Verify that a settlement proof carries valid party signatures. The verifying keys must come from the already-resolved channel parties (typically via OAS/DID resolution). They are not read from the proof, which prevents a proof from self-authorizing with attacker-chosen keys. ```rust pub fn verify_settlement_with_keys( proof: &SettlementProof, escrow_amount: u64, party_a_verifying_key_bytes: &[u8; 32], party_b_verifying_key_bytes: &[u8; 32], ) -> Result; ``` Source line: `65`. ## settlement::create\_signed\_settlement\_proof [#settlementcreate_signed_settlement_proof] Create a settlement proof signed by both channel parties. ```rust pub fn create_signed_settlement_proof( channel_id: String, balance_a: u64, balance_b: u64, sequence: u64, escrow_amount: u64, signing_key_a: &SigningKey, signing_key_b: &SigningKey, ) -> Result; ``` Source line: `98`. ## settlement::settlement\_digest [#settlementsettlement_digest] Compute the canonical digest signed by settlement participants. ```rust pub fn settlement_digest(proof: &SettlementProof, escrow_amount: u64) -> [u8; 32]; ``` Source line: `127`. ## settlement::calculate\_settlement\_amounts [#settlementcalculate_settlement_amounts] Calculate the settlement amounts from a proof. Returns `(amount_a, amount_b)` after verifying the balance invariant against the sum. ```rust pub fn calculate_settlement_amounts(proof: &SettlementProof) -> Result<(u64, u64), CzacError>; ``` Source line: `219`. ## settlement::create\_settlement\_proof [#settlementcreate_settlement_proof] Create a settlement proof from a closed payment channel. ```rust pub fn create_settlement_proof( channel_id: String, balance_a: u64, balance_b: u64, sequence: u64, signature_a: Vec, signature_b: Vec, ) -> SettlementProof; ``` Source line: `233`. # sigil-core · address URL: https://docs.sigil.ml/reference/rust/sigil-core/address Markdown: https://docs.sigil.ml/reference/rust/sigil-core/address.md Source declarations, signatures and documentation for address. Source: `sigil/node/sigil-core/src/address.rs`. SHA-256: `e325c6571d81a330e2ede0038b29317a62f70509bf9c33fb2fd8a77944e9689a`. 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. ## address::SIGIL\_ADDRESS\_LEN [#addresssigil_address_len] Length of a Sigil address in bytes. ```rust pub const SIGIL_ADDRESS_LEN: usize; ``` Source line: `27`. ## address::Address [#addressaddress] A 32-byte Sigil address. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Address(#[serde(with = "address_hex")] pub [u8; SIGIL_ADDRESS_LEN]); ``` Source line: `31`. ## address::Address::from\_bytes [#addressaddressfrom_bytes] Construct an address from a 32-byte slice. # Errors [#errors] Returns \[`CoreError::ValidationError`] if `bytes.len() != 32`. ```rust pub fn from_bytes(bytes: &[u8]) -> Result; ``` Source line: `38`. ## address::Address::from\_did [#addressaddressfrom_did] Derive the address from a DID per the canonical scheme. `address = blake3(canonicalize(did))[..32]` Canonicalization rules (must match `wallet-extension/src/crypto/address.ts::canonicalizeDid`): * Trim outer ASCII whitespace. * Lowercase the entire DID (URI schemes are case-insensitive per RFC 3986; the OAS DID method-specific portion is also case-insensitive in practice). * Reject empty input. * Reject DIDs that don't start with `did:`. * Reject embedded whitespace, control characters (U+0000..U+001F), or U+007F. ```rust pub fn from_did(did: &str) -> Result; ``` Source line: `63`. ## address::Address::to\_hex [#addressaddressto_hex] Render as a `0x`-prefixed lowercase hex string (66 chars). Sigil display convention follows Ethereum's `0x...` prefix for instant visual distinction from DIDs (`did:oas:...`) and usernames (`@alice`). ```rust pub fn to_hex(&self) -> String; ``` Source line: `75`. ## address::Address::as\_bytes [#addressaddressas_bytes] Get the raw 32-byte representation. ```rust pub fn as_bytes(&self) -> &[u8; SIGIL_ADDRESS_LEN]; ``` Source line: `85`. ## address::canonicalize\_did [#addresscanonicalize_did] Canonicalize a DID string for hashing. See `Address::from_did` for the rules. Returns the canonicalized (lowercased + validated) string. ```rust pub fn canonicalize_did(did: &str) -> Result; ``` Source line: `92`. ## address::address\_hex::serialize [#addressaddress_hexserialize] ```rust pub fn serialize( bytes: &[u8; SIGIL_ADDRESS_LEN], s: S, ) -> Result; ``` Source line: `118`. ## address::address\_hex::deserialize [#addressaddress_hexdeserialize] ```rust pub fn deserialize<'de, D: Deserializer<'de>>( d: D, ) -> Result<[u8; SIGIL_ADDRESS_LEN], D::Error>; ``` Source line: `130`. # sigil-core · artifact URL: https://docs.sigil.ml/reference/rust/sigil-core/artifact Markdown: https://docs.sigil.ml/reference/rust/sigil-core/artifact.md Source declarations, signatures and documentation for artifact. Source: `sigil/node/sigil-core/src/artifact.rs`. SHA-256: `c4cc452c9390e6399bcc2ccf3ccfad9c724dff07beadaa9df347eb14ff704234`. 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. ## artifact::WeftRootCommitment [#artifactweftrootcommitment] Typed Weft root metadata attached to an artifact commitment. The enclosing \[`ArtifactCommitment`] still commits to exact bytes with its `blake3` field. For Weft, those bytes SHOULD be the canonical Weft manifest; this extension carries the large-payload Merkle root without pretending that the root is the byte digest of the manifest or original payload. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WeftRootCommitment { /// Weft Merkle root over ordered chunk IDs. pub root: SigilHash, /// Configured chunk size in bytes. pub chunk_size: u64, /// Number of chunks in the manifest. pub chunk_count: u64, /// Original payload byte length. pub total_len: u64, /// CID of the committed Weft manifest. pub manifest_cid: String } ``` Source line: `18`. ## artifact::WeftRootCommitment::new [#artifactweftrootcommitmentnew] Build a validated Weft root commitment. ```rust pub fn new( root: SigilHash, chunk_size: u64, chunk_count: u64, total_len: u64, manifest_cid: String, ) -> Result; ``` Source line: `33`. ## artifact::WeftRootCommitment::deterministic\_root\_cid [#artifactweftrootcommitmentdeterministic_root_cid] Deterministic CID-like identity for a Weft Merkle root. ```rust pub fn deterministic_root_cid(root: &SigilHash) -> String; ``` Source line: `62`. ## artifact::WeftRootCommitment::root\_cid [#artifactweftrootcommitmentroot_cid] Deterministic CID-like identity for this Weft Merkle root. ```rust pub fn root_cid(&self) -> String; ``` Source line: `67`. ## artifact::ArtifactCommitment [#artifactartifactcommitment] Canonical off-chain artifact commitment recorded by Sigil transactions, receipts, metadata manifests, and RPC responses. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ArtifactCommitment { /// Weave content ID. Sigil's deterministic fallback CID form is /// `weave:blake3:`. pub cid: String, /// BLAKE3 digest of the exact committed bytes. pub blake3: SigilHash, /// Exact artifact byte length. pub byte_len: u64, /// Optional Weft root metadata for sharded large-blob artifacts. #[serde(default, skip_serializing_if = "Option::is_none")] pub weft: Option, /// Media type such as `application/json` or `model/gltf-binary`. pub media_type: String, /// Schema identifier for deterministic interpretation. pub schema: String, /// Producer DID that created or published the artifact. pub producer_did: String, /// Producer signature over the domain-separated commitment envelope. pub signature: Vec, /// Block height at which this commitment became visible. pub created_height: u64 } ``` Source line: `75`. ## artifact::ArtifactCommitment::deterministic\_cid [#artifactartifactcommitmentdeterministic_cid] Build the deterministic Sigil/Weave CID form used until a concrete mounted Weave model adapter supplies a stronger native CID verifier. ```rust pub fn deterministic_cid(blake3: &SigilHash) -> String; ``` Source line: `101`. ## artifact::ArtifactCommitment::verifies\_bytes [#artifactartifactcommitmentverifies_bytes] Verify byte length, BLAKE3 digest, and the deterministic CID binding. ```rust pub fn verifies_bytes(&self, bytes: &[u8]) -> bool; ``` Source line: `106`. ## artifact::ArtifactCommitment::has\_verified\_identity [#artifactartifactcommitmenthas_verified_identity] Return true when the commitment has the required content-addressing fields and is bound to the deterministic CID form. ```rust pub fn has_verified_identity(&self) -> bool; ``` Source line: `114`. # sigil-core · authority URL: https://docs.sigil.ml/reference/rust/sigil-core/authority Markdown: https://docs.sigil.ml/reference/rust/sigil-core/authority.md Source declarations, signatures and documentation for authority. Source: `sigil/node/sigil-core/src/authority.rs`. SHA-256: `99ec62c615a12e4fe4d9b9600712a20dfef12daa450a933fe53761209daebe40`. 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. ## authority::RootKind [#authorityrootkind] Root identity type. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RootKind { /// Human root. Hmr, /// Machine/model root. Mhr, /// Enterprise/entity root. Enr, } ``` Source line: `12`. ## authority::AuthorityStatus [#authorityauthoritystatus] Status for root and agent identities. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AuthorityStatus { Active, Rotating, Revoked, } ``` Source line: `24`. ## authority::WeightedMember [#authorityweightedmember] A weighted member in a root group. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WeightedMember { pub did: String, pub weight: u64 } ``` Source line: `32`. ## authority::ProfitShare [#authorityprofitshare] Profit share assignment in basis points. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ProfitShare { pub recipient_did: String, pub basis_points: u16 } ``` Source line: `39`. ## authority::ThresholdPolicy [#authoritythresholdpolicy] Weighted threshold policy. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ThresholdPolicy { pub threshold_weight: u64, pub members: Vec } ``` Source line: `46`. ## authority::ThresholdPolicy::total\_weight [#authoritythresholdpolicytotal_weight] Total configured member weight. ```rust pub fn total_weight(&self) -> u64; ``` Source line: `53`. ## authority::ThresholdPolicy::is\_satisfied\_by [#authoritythresholdpolicyis_satisfied_by] Returns true if the supplied signer DIDs satisfy the threshold. ```rust pub fn is_satisfied_by<'a>(&self, signers: impl IntoIterator) -> bool; ``` Source line: `58`. ## authority::Permission [#authoritypermission] Permission granted to an agent or app agent. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum Permission { IssueAgent, RotateAgent, RevokeAgent, DeployContract, CallContract, UpgradeContract, CreateToken, MintToken, BurnToken, TransferToken, CreateTreasury, WithdrawTreasury, DistributeRevenue, ManageApp, ManageValidator, } ``` Source line: `73`. ## authority::ControlPolicy [#authoritycontrolpolicy] Policy for a controlled object. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum ControlPolicy { /// Any signed transaction sender may perform the action. Open, /// A single DID controls the object. Single { controller_did: String }, /// Weighted threshold control. Threshold(ThresholdPolicy), /// A root or group controls the object with specific permissions. Delegated { controller_did: String, delegate_did: String, permissions: Vec, }, } ``` Source line: `94`. ## authority::ControlPolicy::is\_authorized [#authoritycontrolpolicyis_authorized] Returns true when the supplied signers satisfy this control policy. ```rust pub fn is_authorized<'a>( &self, actor_did: &str, requested_permission: Option<&Permission>, signers: impl IntoIterator, ) -> bool; ``` Source line: `111`. ## authority::AgentKind [#authorityagentkind] Agent role used for lineage and explorer display. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AgentKind { Validator, App, Service, ContractOperator, ComputeWorker, AutonomousOrg, } ``` Source line: `143`. ## authority::ContractRuntime [#authoritycontractruntime] Smart contract runtime. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ContractRuntime { Wasm, } ``` Source line: `155`. ## authority::SupplyPolicy [#authoritysupplypolicy] Token supply policy. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum SupplyPolicy { Fixed { max_supply: u128, }, Controlled { controller_did: String, max_supply: Option, }, } ``` Source line: `162`. ## authority::DistributionPolicy [#authoritydistributionpolicy] Revenue distribution policy. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DistributionPolicy { pub shares: Vec } ``` Source line: `174`. ## authority::DistributionPolicy::is\_complete [#authoritydistributionpolicyis_complete] Returns true when all shares sum to 100%. ```rust pub fn is_complete(&self) -> bool; ``` Source line: `180`. # sigil-core · block URL: https://docs.sigil.ml/reference/rust/sigil-core/block Markdown: https://docs.sigil.ml/reference/rust/sigil-core/block.md Source declarations, signatures and documentation for block. Source: `sigil/node/sigil-core/src/block.rs`. SHA-256: `0eadbef175837a1271abe0244993b837f5bf0e58f1affab3dc2ed9471d7e5386`. 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. ## block::Block [#blockblock] A complete Sigil blockchain block. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Block { /// Block header with metadata and commitments. pub header: BlockHeader, /// Block body with transactions and receipts. pub body: BlockBody } ``` Source line: `15`. ## block::Block::hash [#blockblockhash] Compute the block hash from the header. ```rust pub fn hash(&self) -> SigilHash; ``` Source line: `24`. ## block::Block::height [#blockblockheight] Returns the block height. ```rust pub fn height(&self) -> u64; ``` Source line: `29`. ## block::Block::tx\_count [#blockblocktx_count] Returns the number of transactions in this block. ```rust pub fn tx_count(&self) -> usize; ``` Source line: `34`. ## block::Block::verify\_tx\_root [#blockblockverify_tx_root] Verify that the tx\_root in the header matches the actual transactions. Returns an error if any transaction fails to serialize. ```rust pub fn verify_tx_root(&self) -> Result; ``` Source line: `41`. ## block::Block::verify\_receipt\_root [#blockblockverify_receipt_root] Verify that the receipt\_root matches the actual receipts. Returns an error if any receipt fails to serialize. ```rust pub fn verify_receipt_root(&self) -> Result; ``` Source line: `49`. ## block::BlockHeader [#blockblockheader] Block header containing metadata and Merkle root commitments. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockHeader { /// Hash of the parent block (ZERO for genesis). pub parent_hash: SigilHash, /// Merkle root of the post-execution state. pub state_root: SigilHash, /// Merkle root of the transactions in this block. pub tx_root: SigilHash, /// Merkle root of the transaction receipts. pub receipt_root: SigilHash, /// OAS DID of the block proposer. pub proposer_did: String, /// Block height (0 for genesis). pub height: u64, /// Unix timestamp in seconds. pub timestamp: u64, /// Epoch number (height / BLOCKS_PER_EPOCH). pub epoch: u64, /// Chain ID string. pub chain_id: String, /// Protocol version at time of block creation. pub protocol_version: String, /// Optional ZK proof of correct block execution. /// Only Block Producers generate this; Block Validators verify it. #[serde(skip_serializing_if = "Option::is_none")] pub zk_proof: Option, /// Gas used by all transactions in this block. pub gas_used: u64, /// Gas limit for this block. pub gas_limit: u64, /// Extra data (up to 32 bytes, for proposer vanity or protocol signals). #[serde(default)] pub extra_data: Vec } ``` Source line: `57`. ## block::BlockHeader::compute\_hash [#blockblockheadercompute_hash] Compute the block hash: BLAKE3 of the serialized header (excluding zk\_proof). ```rust pub fn compute_hash(&self) -> SigilHash; ``` Source line: `93`. ## block::BlockHeader::is\_genesis [#blockblockheaderis_genesis] Check if this is a genesis block header. ```rust pub fn is_genesis(&self) -> bool; ``` Source line: `113`. ## block::ZkProof [#blockzkproof] A zero-knowledge proof of correct block execution. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ZkProof { /// The proof bytes (format depends on proving system). pub proof_bytes: Vec, /// The proving system identifier (e.g., "jolt-v1"). pub proving_system: String, /// Public inputs to the proof (block hash, state transitions). pub public_inputs: Vec>, /// Verification key hash (identifies the circuit). pub verification_key_hash: SigilHash } ``` Source line: `120`. ## block::BlockBody [#blockblockbody] Block body containing transactions and their receipts. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockBody { /// Signed transactions included in this block. pub transactions: Vec, /// Receipts for each transaction (same order as transactions). pub receipts: Vec } ``` Source line: `133`. ## block::MAX\_EXTRA\_DATA\_SIZE [#blockmax_extra_data_size] Maximum allowed size of the block header `extra_data` field (bytes). ```rust pub const MAX_EXTRA_DATA_SIZE: usize; ``` Source line: `141`. ## block::MAX\_CLOCK\_DRIFT\_SECS [#blockmax_clock_drift_secs] Maximum allowed clock drift for block timestamps (seconds). ```rust pub const MAX_CLOCK_DRIFT_SECS: u64; ``` Source line: `144`. ## block::validate\_timestamp [#blockvalidate_timestamp] Validate that a block timestamp is strictly after the parent and within acceptable clock drift of the current time. ```rust pub fn validate_timestamp( header: &BlockHeader, parent_timestamp: u64, current_time: u64, ) -> Result<(), CoreError>; ``` Source line: `148`. ## block::validate\_extra\_data [#blockvalidate_extra_data] Validate that the extra\_data field does not exceed the maximum allowed size. ```rust pub fn validate_extra_data(extra_data: &[u8]) -> Result<(), CoreError>; ``` Source line: `169`. ## block::compute\_tx\_root [#blockcompute_tx_root] Compute the Merkle root of a list of signed transactions. Returns an error if any transaction fails to serialize. ```rust pub fn compute_tx_root(txs: &[SignedTransaction]) -> Result; ``` Source line: `183`. ## block::compute\_receipt\_root [#blockcompute_receipt_root] Compute the Merkle root of a list of receipts. Returns an error if any receipt fails to serialize. ```rust pub fn compute_receipt_root(receipts: &[Receipt]) -> Result; ``` Source line: `197`. # sigil-core · chain URL: https://docs.sigil.ml/reference/rust/sigil-core/chain Markdown: https://docs.sigil.ml/reference/rust/sigil-core/chain.md Source declarations, signatures and documentation for chain. Source: `sigil/node/sigil-core/src/chain.rs`. SHA-256: `378285946e54e679832127450aab3df687ab160a5c1deb8c4f6c401dad08e08d`. 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. ## chain::ChainId [#chainchainid] A chain identifier for distinguishing networks. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct ChainId(String); ``` Source line: `8`. ## chain::ChainId::mainnet [#chainchainidmainnet] Sigil mainnet chain ID. ```rust pub fn mainnet() -> Self; ``` Source line: `12`. ## chain::ChainId::testnet [#chainchainidtestnet] Sigil testnet chain ID. ```rust pub fn testnet() -> Self; ``` Source line: `17`. ## chain::ChainId::devnet [#chainchainiddevnet] Sigil devnet chain ID. ```rust pub fn devnet() -> Self; ``` Source line: `22`. ## chain::ChainId::custom [#chainchainidcustom] Custom chain ID. ```rust pub fn custom(id: impl Into) -> Self; ``` Source line: `27`. ## chain::ChainId::as\_str [#chainchainidas_str] Returns the chain ID string. ```rust pub fn as_str(&self) -> &str; ``` Source line: `32`. # sigil-core · crate URL: https://docs.sigil.ml/reference/rust/sigil-core/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-core/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-core/src/lib.rs`. SHA-256: `b15b55ecc46a1aa15783af977419234a1e328b5cd211462c4f54b1c686e98d0a`. 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. ## address [#address] ```rust pub mod address; ``` Source line: `5`. ## artifact [#artifact] ```rust pub mod artifact; ``` Source line: `6`. ## authority [#authority] ```rust pub mod authority; ``` Source line: `7`. ## block [#block] ```rust pub mod block; ``` Source line: `8`. ## chain [#chain] ```rust pub mod chain; ``` Source line: `9`. ## dao [#dao] ```rust pub mod dao; ``` Source line: `10`. ## dex [#dex] ```rust pub mod dex; ``` Source line: `11`. ## error [#error] ```rust pub mod error; ``` Source line: `12`. ## evidence [#evidence] ```rust pub mod evidence; ``` Source line: `13`. ## gal [#gal] ```rust pub mod gal; ``` Source line: `14`. ## genesis [#genesis] ```rust pub mod genesis; ``` Source line: `15`. ## hash [#hash] ```rust pub mod hash; ``` Source line: `16`. ## labor [#labor] ```rust pub mod labor; ``` Source line: `17`. ## mail [#mail] ```rust pub mod mail; ``` Source line: `18`. ## mandate [#mandate] ```rust pub mod mandate; ``` Source line: `19`. ## nft [#nft] ```rust pub mod nft; ``` Source line: `20`. ## nova [#nova] ```rust pub mod nova; ``` Source line: `21`. ## receipt [#receipt] ```rust pub mod receipt; ``` Source line: `22`. ## recovery [#recovery] ```rust pub mod recovery; ``` Source line: `23`. ## serde\_helpers [#serde_helpers] ```rust pub mod serde_helpers; ``` Source line: `24`. ## sns [#sns] ```rust pub mod sns; ``` Source line: `25`. ## storage\_market [#storage_market] ```rust pub mod storage_market; ``` Source line: `26`. ## system\_contracts [#system_contracts] ```rust pub mod system_contracts; ``` Source line: `27`. ## transaction [#transaction] ```rust pub mod transaction; ``` Source line: `28`. ## username [#username] ```rust pub mod username; ``` Source line: `29`. ## velocity [#velocity] ```rust pub mod velocity; ``` Source line: `30`. ## vigil [#vigil] ```rust pub mod vigil; ``` Source line: `31`. ## pub use address::\{canonicalize\_did, Address, SIGIL\_ADDRESS\_LEN}; [#pub-use-addresscanonicalize_did-address-sigil_address_len] ```rust pub use address::{canonicalize_did, Address, SIGIL_ADDRESS_LEN}; ``` Source line: `33`. ## pub use artifact::\{ArtifactCommitment, WeftRootCommitment}; [#pub-use-artifactartifactcommitment-weftrootcommitment] ```rust pub use artifact::{ArtifactCommitment, WeftRootCommitment}; ``` Source line: `34`. ## pub use authority::\{ [#pub-use-authority] AgentKind, AuthorityStatus, ContractRuntime, ControlPolicy, DistributionPolicy, Permission, ProfitShare, RootKind, SupplyPolicy, ThresholdPolicy, WeightedMember, }; ```rust pub use authority::{ AgentKind, AuthorityStatus, ContractRuntime, ControlPolicy, DistributionPolicy, Permission, ProfitShare, RootKind, SupplyPolicy, ThresholdPolicy, WeightedMember, }; ``` Source line: `35`. ## pub use block::\{Block, BlockBody, BlockHeader}; [#pub-use-blockblock-blockbody-blockheader] ```rust pub use block::{Block, BlockBody, BlockHeader}; ``` Source line: `39`. ## pub use chain::ChainId; [#pub-use-chainchainid] ```rust pub use chain::ChainId; ``` Source line: `40`. ## pub use dao::\{DaoIdentity, GovernancePolicy, HiringPolicy, TreasuryRef}; [#pub-use-daodaoidentity-governancepolicy-hiringpolicy-treasuryref] ```rust pub use dao::{DaoIdentity, GovernancePolicy, HiringPolicy, TreasuryRef}; ``` Source line: `41`. ## pub use dex::\{ [#pub-use-dex] add\_liquidity\_quote, canonical\_pool\_assets, canonical\_pool\_id, create\_pool\_quote, remove\_liquidity\_quote, swap\_exact\_in\_quote, swap\_exact\_out\_quote, AddLiquidityQuote, CreatePoolQuote, DexEvent, DexPool, DexPoolAsset, DexPoolSide, DexPosition, DexQuoteError, RemoveLiquidityQuote, SwapExactInQuote, SwapExactOutQuote, DEX\_FEE\_DENOMINATOR\_BPS, DEX\_MAX\_FEE\_BPS, DEX\_POOL\_ID\_PREFIX, }; ```rust pub use dex::{ add_liquidity_quote, canonical_pool_assets, canonical_pool_id, create_pool_quote, remove_liquidity_quote, swap_exact_in_quote, swap_exact_out_quote, AddLiquidityQuote, CreatePoolQuote, DexEvent, DexPool, DexPoolAsset, DexPoolSide, DexPosition, DexQuoteError, RemoveLiquidityQuote, SwapExactInQuote, SwapExactOutQuote, DEX_FEE_DENOMINATOR_BPS, DEX_MAX_FEE_BPS, DEX_POOL_ID_PREFIX, }; ``` Source line: `42`. ## pub use error::CoreError; [#pub-use-errorcoreerror] ```rust pub use error::CoreError; ``` Source line: `49`. ## pub use evidence::\{ [#pub-use-evidence] evidence\_anchor\_id, validate\_digest\_hex, EvidenceAnchorData, EvidenceAnchorRecord, MAX\_EVIDENCE\_CLIENT\_NONCE\_LEN, MAX\_EVIDENCE\_LABEL\_LEN, MAX\_EVIDENCE\_METADATA\_BYTES, MAX\_EVIDENCE\_URI\_LEN, }; ```rust pub use evidence::{ evidence_anchor_id, validate_digest_hex, EvidenceAnchorData, EvidenceAnchorRecord, MAX_EVIDENCE_CLIENT_NONCE_LEN, MAX_EVIDENCE_LABEL_LEN, MAX_EVIDENCE_METADATA_BYTES, MAX_EVIDENCE_URI_LEN, }; ``` Source line: `50`. ## pub use gal::\{ [#pub-use-gal] is\_revoked, validate\_root\_anchor, verify\_metadata\_commitment, AffinityKind, EnrAnchor, GalValidationError, HmrAnchor, MhrAnchor, OrgLineageRoot, RevocationKind, RevocationRecord, RevocationStatus, RootAnchor, RootStatus, ShardAssignment, ShardOp, ShardTopologyEntry, }; ```rust pub use gal::{ is_revoked, validate_root_anchor, verify_metadata_commitment, AffinityKind, EnrAnchor, GalValidationError, HmrAnchor, MhrAnchor, OrgLineageRoot, RevocationKind, RevocationRecord, RevocationStatus, RootAnchor, RootStatus, ShardAssignment, ShardOp, ShardTopologyEntry, }; ``` Source line: `55`. ## pub use genesis::\{ [#pub-use-genesis] generate\_testnet\_genesis, ContractParams, CzacParams, EconomicParams, GenesisBuilder, GenesisConfig, GenesisValidationError, GenesisValidator, GovernanceParams, ProtocolParams, TowerParams, ValidatorGenesisMode, }; ```rust pub use genesis::{ generate_testnet_genesis, ContractParams, CzacParams, EconomicParams, GenesisBuilder, GenesisConfig, GenesisValidationError, GenesisValidator, GovernanceParams, ProtocolParams, TowerParams, ValidatorGenesisMode, }; ``` Source line: `60`. ## pub use hash::SigilHash; [#pub-use-hashsigilhash] ```rust pub use hash::SigilHash; ``` Source line: `65`. ## pub use labor::\{ [#pub-use-labor] AttestationPolicy, AttestationVerdict, AttesterKind, BidStatus, BidderKind, BountyClaim, BountyClaimState, BountyOffer, BountyState, CapabilitySpec, ClaimAttestation, CompletionAttestation, ContractState, CounterpartyFilter, DecayPolicy, Deliverable, DeliverableRef, Dispute, DisputeCause, DisputeResolution, DisputeState, EscrowPolicy, JobStatus, LaborBid, LaborContract, LaborEscrow, LaborJob, LaborOffer, Milestone, MilestonePlan, MilestoneState, MilestoneTemplate, ReputationSignal, ReputationSnapshot, RevenueShare, RevenueShareError, Review, RoyaltyRecipient, ShareRevocability, SignalSource, SkillTag, VerificationMode, }; ```rust pub use labor::{ AttestationPolicy, AttestationVerdict, AttesterKind, BidStatus, BidderKind, BountyClaim, BountyClaimState, BountyOffer, BountyState, CapabilitySpec, ClaimAttestation, CompletionAttestation, ContractState, CounterpartyFilter, DecayPolicy, Deliverable, DeliverableRef, Dispute, DisputeCause, DisputeResolution, DisputeState, EscrowPolicy, JobStatus, LaborBid, LaborContract, LaborEscrow, LaborJob, LaborOffer, Milestone, MilestonePlan, MilestoneState, MilestoneTemplate, ReputationSignal, ReputationSnapshot, RevenueShare, RevenueShareError, Review, RoyaltyRecipient, ShareRevocability, SignalSource, SkillTag, VerificationMode, }; ``` Source line: `66`. ## pub use mail::\{ [#pub-use-mail] abuse\_id, alias\_id, delegation\_id, delivery\_commitment\_id, evaluate\_policy, key\_id, mailbox\_id, policy\_id, AbuseReport, AbuseResolution, AbuseStatus, AliasStatus, DeliveryCommitmentRecord, DeliveryStatus, EconomicsStatus, MailAddAliasData, MailAliasKind, MailAliasRecord, MailCreateMailboxData, MailDeactivateMailboxData, MailDelegationGrant, MailExpireKeysData, MailGrantPermissionData, MailKeyPurpose, MailLockMailboxData, MailMailboxStatusData, MailPermissionScope, MailPublicKeyRecord, MailPublishDeliveryCommitmentData, MailPublishKeyData, MailRecoverMailboxData, MailRemoveAliasData, MailReportAbuseData, MailResolveAbuseData, MailRevokeKeyData, MailRevokePermissionData, MailRevokeReceivePolicyData, MailRotateKeyData, MailSetPrimaryAliasData, MailUnlockMailboxData, MailUpdateReceivePolicyData, MailboxCapabilityRecord, MailboxPolicyRecord, MailboxStatus, PolicyAction, PolicyStatus, ReceivePolicyRule, SenderEconomicsRecord, SenderRoute, SenderSelector, MAILBOX\_ID\_DOMAIN, }; ```rust pub use mail::{ abuse_id, alias_id, delegation_id, delivery_commitment_id, evaluate_policy, key_id, mailbox_id, policy_id, AbuseReport, AbuseResolution, AbuseStatus, AliasStatus, DeliveryCommitmentRecord, DeliveryStatus, EconomicsStatus, MailAddAliasData, MailAliasKind, MailAliasRecord, MailCreateMailboxData, MailDeactivateMailboxData, MailDelegationGrant, MailExpireKeysData, MailGrantPermissionData, MailKeyPurpose, MailLockMailboxData, MailMailboxStatusData, MailPermissionScope, MailPublicKeyRecord, MailPublishDeliveryCommitmentData, MailPublishKeyData, MailRecoverMailboxData, MailRemoveAliasData, MailReportAbuseData, MailResolveAbuseData, MailRevokeKeyData, MailRevokePermissionData, MailRevokeReceivePolicyData, MailRotateKeyData, MailSetPrimaryAliasData, MailUnlockMailboxData, MailUpdateReceivePolicyData, MailboxCapabilityRecord, MailboxPolicyRecord, MailboxStatus, PolicyAction, PolicyStatus, ReceivePolicyRule, SenderEconomicsRecord, SenderRoute, SenderSelector, MAILBOX_ID_DOMAIN, }; ``` Source line: `76`. ## pub use mandate::\{ [#pub-use-mandate] AllowedCounterparties, ApprovalPolicy, CounterpartyClass, DelegationPolicy, DisputePolicy, JobCategory, Mandate, MandateBudget, MandateClearance, MandateError, MandateId, MandateScope, MandateStatus, MilestonePolicy, ReputationImpactPolicy, RevocationPolicy, SpendLimits, SpendRequest, TokenId, }; ```rust pub use mandate::{ AllowedCounterparties, ApprovalPolicy, CounterpartyClass, DelegationPolicy, DisputePolicy, JobCategory, Mandate, MandateBudget, MandateClearance, MandateError, MandateId, MandateScope, MandateStatus, MilestonePolicy, ReputationImpactPolicy, RevocationPolicy, SpendLimits, SpendRequest, TokenId, }; ``` Source line: `89`. ## pub use nft::\{ [#pub-use-nft] BurnAuth, CollectionId, CollectionPolicy, DidIdentityIndex, IdentityBinding, IdentityNftKind, LockState, NftCollection, NftEvent, NftEventKind, NftKind, NftToken, OwnerIndexEntry, TokenId as NftTokenId, }; ```rust pub use nft::{ BurnAuth, CollectionId, CollectionPolicy, DidIdentityIndex, IdentityBinding, IdentityNftKind, LockState, NftCollection, NftEvent, NftEventKind, NftKind, NftToken, OwnerIndexEntry, TokenId as NftTokenId, }; ``` Source line: `95`. ## pub use nova::\{ [#pub-use-nova] canonical\_json\_string, deterministic\_auction\_id, deterministic\_avatar\_id, deterministic\_building\_id, deterministic\_component\_id, deterministic\_parcel\_id, deterministic\_world\_id, NovaAuctionRecord, NovaAuctionStatus, NovaAvatarRecord, NovaBidRecord, NovaBuildingRecord, NovaParams, NovaParcelCoord, NovaParcelRecord, NovaParcelType, NovaWorldConfig, NOVA\_AUCTION\_PREFIX, NOVA\_AVATAR\_PREFIX, NOVA\_BUILDING\_PREFIX, NOVA\_PARCEL\_PREFIX, NOVA\_WORLD\_PREFIX, }; ```rust pub use nova::{ canonical_json_string, deterministic_auction_id, deterministic_avatar_id, deterministic_building_id, deterministic_component_id, deterministic_parcel_id, deterministic_world_id, NovaAuctionRecord, NovaAuctionStatus, NovaAvatarRecord, NovaBidRecord, NovaBuildingRecord, NovaParams, NovaParcelCoord, NovaParcelRecord, NovaParcelType, NovaWorldConfig, NOVA_AUCTION_PREFIX, NOVA_AVATAR_PREFIX, NOVA_BUILDING_PREFIX, NOVA_PARCEL_PREFIX, NOVA_WORLD_PREFIX, }; ``` Source line: `100`. ## pub use receipt::\{Receipt, ReceiptStatus}; [#pub-use-receiptreceipt-receiptstatus] ```rust pub use receipt::{Receipt, ReceiptStatus}; ``` Source line: `108`. ## pub use recovery::\{ [#pub-use-recovery] abort\_signing\_bytes, compute\_ceremony\_id, recovery\_signing\_bytes, validate\_recovery\_config, AbortReason, AbortRecoveryData, AddRecoveryAuthorizationData, FinalizeRecoveryData, GuardianAuthorization, InitiateRecoveryData, RecoveryCeremony, RecoveryConfig, RecoveryGuardian, RecoveryStatus, RegisterRecoveryData, BLOCKS\_PER\_DAY, DEFAULT\_RECOVERY\_TIMELOCK\_BLOCKS, MAX\_RECOVERY\_GUARDIANS, MAX\_RECOVERY\_TIMELOCK\_BLOCKS, MIN\_RECOVERY\_GUARDIANS, MIN\_RECOVERY\_TIMELOCK\_BLOCKS, RECOVERY\_DOMAIN\_TAG, }; ```rust pub use recovery::{ abort_signing_bytes, compute_ceremony_id, recovery_signing_bytes, validate_recovery_config, AbortReason, AbortRecoveryData, AddRecoveryAuthorizationData, FinalizeRecoveryData, GuardianAuthorization, InitiateRecoveryData, RecoveryCeremony, RecoveryConfig, RecoveryGuardian, RecoveryStatus, RegisterRecoveryData, BLOCKS_PER_DAY, DEFAULT_RECOVERY_TIMELOCK_BLOCKS, MAX_RECOVERY_GUARDIANS, MAX_RECOVERY_TIMELOCK_BLOCKS, MIN_RECOVERY_GUARDIANS, MIN_RECOVERY_TIMELOCK_BLOCKS, RECOVERY_DOMAIN_TAG, }; ``` Source line: `109`. ## pub use sns::\{ [#pub-use-sns] namehash, normalize\_sigil\_name, CommitNameRegistrationData, CommitSealedNameBidData, DelegateSubdomainData, DeleteNameRecordsData, NameDelegation, NamePermissionScope, NameRecordKind, NameStatus, RegisterNameData, RenewNameData, RevealSealedNameBidData, RevokeDelegationData, SetNameRecordsData, SetPrimaryNameData, SnsNameRecord, SnsResolverRecord, }; ```rust pub use sns::{ namehash, normalize_sigil_name, CommitNameRegistrationData, CommitSealedNameBidData, DelegateSubdomainData, DeleteNameRecordsData, NameDelegation, NamePermissionScope, NameRecordKind, NameStatus, RegisterNameData, RenewNameData, RevealSealedNameBidData, RevokeDelegationData, SetNameRecordsData, SetPrimaryNameData, SnsNameRecord, SnsResolverRecord, }; ``` Source line: `117`. ## pub use storage\_market::\{ [#pub-use-storage_market] storage\_challenge\_id, storage\_contract\_id, storage\_pin\_request\_id, StorageChallengeData, StorageChallengeProof, StorageChallengeRecord, StorageChallengeResolveData, StorageChallengeStatus, StorageChunkProof, StoragePinAcceptData, StoragePinContract, StoragePinReceipt, StoragePinRequest, StoragePinRequestData, StoragePinStatus, StorageProofPosition, StorageProofSibling, StorageProviderExitData, StorageProviderRecord, StorageProviderRegisterData, StorageProviderStatus, StorageProviderUpdateData, StorageReceiptSettleData, }; ```rust pub use storage_market::{ storage_challenge_id, storage_contract_id, storage_pin_request_id, StorageChallengeData, StorageChallengeProof, StorageChallengeRecord, StorageChallengeResolveData, StorageChallengeStatus, StorageChunkProof, StoragePinAcceptData, StoragePinContract, StoragePinReceipt, StoragePinRequest, StoragePinRequestData, StoragePinStatus, StorageProofPosition, StorageProofSibling, StorageProviderExitData, StorageProviderRecord, StorageProviderRegisterData, StorageProviderStatus, StorageProviderUpdateData, StorageReceiptSettleData, }; ``` Source line: `123`. ## pub use transaction::\{ [#pub-use-transaction] InitialDeviceAnchorData, SignedTransaction, SponsoredSetupData, SponsoredSetupScope, Transaction, TransactionCategory, TransactionType, }; ```rust pub use transaction::{ InitialDeviceAnchorData, SignedTransaction, SponsoredSetupData, SponsoredSetupScope, Transaction, TransactionCategory, TransactionType, }; ``` Source line: `132`. ## pub use username::\{ [#pub-use-username] compute\_auction\_opening\_price, compute\_dispute\_id, compute\_lease\_price, compute\_min\_next\_bid, dispute\_resolve\_signing\_bytes, validate\_genesis\_username, validate\_username, AuctionStatus, DisputeMultisigSignature, DisputeOutcome, DisputeSignerEntry, DisputeStatus, RaiseUsernameDisputeData, RegisterUsernameData, ReleaseUsernameData, ResolveUsernameDisputeData, ReverseUsernameRecord, SetReverseUsernameData, SetUsernameMetadataData, TransferUsernameData, UsernameAuction, UsernameAuctionBidData, UsernameAuctionFinalizeData, UsernameDispute, UsernameParams, UsernameRecord, RESERVED\_GENESIS\_USERNAMES, USERNAME\_MAX\_LEASE\_YEARS, USERNAME\_MAX\_LEN, USERNAME\_MIN\_LEN, }; ```rust pub use username::{ compute_auction_opening_price, compute_dispute_id, compute_lease_price, compute_min_next_bid, dispute_resolve_signing_bytes, validate_genesis_username, validate_username, AuctionStatus, DisputeMultisigSignature, DisputeOutcome, DisputeSignerEntry, DisputeStatus, RaiseUsernameDisputeData, RegisterUsernameData, ReleaseUsernameData, ResolveUsernameDisputeData, ReverseUsernameRecord, SetReverseUsernameData, SetUsernameMetadataData, TransferUsernameData, UsernameAuction, UsernameAuctionBidData, UsernameAuctionFinalizeData, UsernameDispute, UsernameParams, UsernameRecord, RESERVED_GENESIS_USERNAMES, USERNAME_MAX_LEASE_YEARS, USERNAME_MAX_LEN, USERNAME_MIN_LEN, }; ``` Source line: `136`. ## pub use vigil::\{ [#pub-use-vigil] canonical\_event\_id, AccountAddress, CanonicalValue, ContractAddress, DepositVigilGasData, DeregisterIngestorData, Event, EventDeliveryData, EventFilter, EventProof, EventSource, EventSourceKind, Ingestor, IngestorStatus, MethodSelector, OasDid, RegisterIngestorData, RegisterVigilSubscriptionData, ScheduledVigilCallback, SlashIngestorData, SubscriptionStatus, TimeKind, UpdateIngestorStakeData, UpdateVigilSubscriptionData, VigilDeliveryRecord, VigilDeliveryStatus, VigilError, VigilSubscription, WithdrawVigilGasData, MIN\_INGESTOR\_BOND, MIN\_VIGIL\_BOND, }; ```rust pub use vigil::{ canonical_event_id, AccountAddress, CanonicalValue, ContractAddress, DepositVigilGasData, DeregisterIngestorData, Event, EventDeliveryData, EventFilter, EventProof, EventSource, EventSourceKind, Ingestor, IngestorStatus, MethodSelector, OasDid, RegisterIngestorData, RegisterVigilSubscriptionData, ScheduledVigilCallback, SlashIngestorData, SubscriptionStatus, TimeKind, UpdateIngestorStakeData, UpdateVigilSubscriptionData, VigilDeliveryRecord, VigilDeliveryStatus, VigilError, VigilSubscription, WithdrawVigilGasData, MIN_INGESTOR_BOND, MIN_VIGIL_BOND, }; ``` Source line: `146`. ## ::PROTOCOL\_VERSION [#protocol_version] Sigil protocol version. ```rust pub const PROTOCOL_VERSION: &str; ``` Source line: `157`. ## ::TARGET\_BLOCK\_TIME\_SECS [#target_block_time_secs] Block time target in seconds. ```rust pub const TARGET_BLOCK_TIME_SECS: u64; ``` Source line: `160`. ## ::BLOCKS\_PER\_EPOCH [#blocks_per_epoch] Blocks per epoch (\~8 hours at 4s block time). ```rust pub const BLOCKS_PER_EPOCH: u64; ``` Source line: `163`. # sigil-core · dao URL: https://docs.sigil.ml/reference/rust/sigil-core/dao Markdown: https://docs.sigil.ml/reference/rust/sigil-core/dao.md 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 [#daotreasuryref] Reference to a treasury DID controlled by a DAO. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct TreasuryRef { /// The treasury DID, e.g. `did:oas:sigil:treasury:`. pub treasury_did: String, /// Optional human-readable label for explorer surfaces. pub label: Option } ``` Source line: `17`. ## dao::HiringPolicy [#daohiringpolicy] 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`. ```rust #[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 }, /// 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 [#daogovernancepolicy] 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. ```rust #[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 [#daodaoidentity] On-chain DAO / Autonomous Organization identity record. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DaoIdentity { /// The DAO DID (`did:oas:sigil:dao:`). 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, /// Optional default token class (e.g., membership / voting / profit /// share). pub default_token_id: Option, /// 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, /// Active / paused / revoked. pub status: AuthorityStatus } ``` Source line: `61`. ## dao::DaoIdentity::actor\_may\_initiate\_hiring [#daodaoidentityactor_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. ```rust pub fn actor_may_initiate_hiring(&self, actor_did: &str) -> bool; ``` Source line: `88`. ## dao::DaoIdentity::is\_active [#daodaoidentityis_active] Returns true when the DAO is currently usable (active). ```rust pub fn is_active(&self) -> bool; ``` Source line: `110`. # sigil-core · dex URL: https://docs.sigil.ml/reference/rust/sigil-core/dex Markdown: https://docs.sigil.ml/reference/rust/sigil-core/dex.md Source declarations, signatures and documentation for dex. Source: `sigil/node/sigil-core/src/dex.rs`. SHA-256: `df8fecf898c6cb385b0b43bac72dbce3f8f428d0845a3bb599803e7d1a23b7b1`. 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. ## dex::DEX\_POOL\_ID\_PREFIX [#dexdex_pool_id_prefix] ```rust pub const DEX_POOL_ID_PREFIX: &str; ``` Source line: `7`. ## dex::DEX\_FEE\_DENOMINATOR\_BPS [#dexdex_fee_denominator_bps] ```rust pub const DEX_FEE_DENOMINATOR_BPS: u128; ``` Source line: `8`. ## dex::DEX\_MAX\_FEE\_BPS [#dexdex_max_fee_bps] ```rust pub const DEX_MAX_FEE_BPS: u16; ``` Source line: `9`. ## dex::DexPoolAsset [#dexdexpoolasset] ```rust #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] #[serde(transparent)] pub struct DexPoolAsset(String); ``` Source line: `13`. ## dex::DexPoolAsset::new [#dexdexpoolassetnew] ```rust pub fn new(value: impl Into) -> Result; ``` Source line: `16`. ## dex::DexPoolAsset::as\_str [#dexdexpoolassetas_str] ```rust pub fn as_str(&self) -> &str; ``` Source line: `25`. ## dex::DexPool [#dexdexpool] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexPool { pub pool_id: String, pub asset_a: DexPoolAsset, pub asset_b: DexPoolAsset, pub reserve_a: u64, pub reserve_b: u64, pub lp_total_shares: u64, pub fee_bps: u16 } ``` Source line: `37`. ## dex::DexPool::reserves\_for\_input [#dexdexpoolreserves_for_input] ```rust pub fn reserves_for_input( &self, asset_in: &DexPoolAsset, ) -> Result<(u64, u64, DexPoolSide), DexQuoteError>; ``` Source line: `48`. ## dex::DexPool::reserves\_for\_output [#dexdexpoolreserves_for_output] ```rust pub fn reserves_for_output( &self, asset_out: &DexPoolAsset, ) -> Result<(u64, u64, DexPoolSide), DexQuoteError>; ``` Source line: `61`. ## dex::DexPoolSide [#dexdexpoolside] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum DexPoolSide { A, B, } ``` Source line: `76`. ## dex::DexPosition [#dexdexposition] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexPosition { pub pool_id: String, pub owner_did: String, pub lp_shares: u64 } ``` Source line: `82`. ## dex::DexEvent [#dexdexevent] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexEvent { pub sequence: u64, pub block_height: u64, pub tx_hash: SigilHash, pub pool_id: String, pub kind: String, pub actor_did: String, pub payload: serde_json::Value } ``` Source line: `89`. ## dex::CreatePoolQuote [#dexcreatepoolquote] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CreatePoolQuote { pub lp_shares: u64 } ``` Source line: `100`. ## dex::AddLiquidityQuote [#dexaddliquidityquote] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AddLiquidityQuote { pub amount_a: u64, pub amount_b: u64, pub lp_shares: u64 } ``` Source line: `105`. ## dex::RemoveLiquidityQuote [#dexremoveliquidityquote] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RemoveLiquidityQuote { pub amount_a: u64, pub amount_b: u64 } ``` Source line: `112`. ## dex::SwapExactInQuote [#dexswapexactinquote] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SwapExactInQuote { pub amount_in: u64, pub amount_out: u64, pub fee_amount: u64, pub post_reserve_in: u64, pub post_reserve_out: u64, pub input_side: DexPoolSide } ``` Source line: `118`. ## dex::SwapExactOutQuote [#dexswapexactoutquote] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SwapExactOutQuote { pub amount_in: u64, pub amount_out: u64, pub fee_amount: u64, pub post_reserve_in: u64, pub post_reserve_out: u64, pub output_side: DexPoolSide } ``` Source line: `128`. ## dex::DexQuoteError [#dexdexquoteerror] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum DexQuoteError { InvalidAsset, SameAsset, InvalidFee, ZeroAmount, InsufficientLiquidity, InsufficientLpShares, AssetNotInPool, SlippageExceeded, Overflow, } ``` Source line: `138`. ## dex::canonical\_pool\_assets [#dexcanonical_pool_assets] ```rust pub fn canonical_pool_assets( asset_a: DexPoolAsset, asset_b: DexPoolAsset, ) -> Result<(DexPoolAsset, DexPoolAsset), DexQuoteError>; ``` Source line: `169`. ## dex::canonical\_pool\_id [#dexcanonical_pool_id] ```rust pub fn canonical_pool_id( asset_a: &DexPoolAsset, asset_b: &DexPoolAsset, fee_bps: u16, ) -> Result; ``` Source line: `183`. ## dex::create\_pool\_quote [#dexcreate_pool_quote] ```rust pub fn create_pool_quote( amount_a: u64, amount_b: u64, fee_bps: u16, min_lp_shares: u64, ) -> Result; ``` Source line: `207`. ## dex::add\_liquidity\_quote [#dexadd_liquidity_quote] ```rust pub fn add_liquidity_quote( pool: &DexPool, amount_a_desired: u64, amount_b_desired: u64, amount_a_min: u64, amount_b_min: u64, min_lp_shares: u64, ) -> Result; ``` Source line: `228`. ## dex::remove\_liquidity\_quote [#dexremove_liquidity_quote] ```rust pub fn remove_liquidity_quote( pool: &DexPool, lp_shares: u64, amount_a_min: u64, amount_b_min: u64, ) -> Result; ``` Source line: `283`. ## dex::swap\_exact\_in\_quote [#dexswap_exact_in_quote] ```rust pub fn swap_exact_in_quote( pool: &DexPool, asset_in: &str, amount_in: u64, min_amount_out: u64, ) -> Result; ``` Source line: `312`. ## dex::swap\_exact\_out\_quote [#dexswap_exact_out_quote] ```rust pub fn swap_exact_out_quote( pool: &DexPool, asset_out: &str, amount_out: u64, max_amount_in: u64, ) -> Result; ``` Source line: `369`. # sigil-core · error URL: https://docs.sigil.ml/reference/rust/sigil-core/error Markdown: https://docs.sigil.ml/reference/rust/sigil-core/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-core/src/error.rs`. SHA-256: `994ac6e074aeeb8c597cfbe9d44a3a3aedcb03dc6dc46ec8dc6402753830b18f`. 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. ## error::CoreError [#errorcoreerror] Error types for the Sigil core crate. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum CoreError { #[error("invalid hash: {0}")] InvalidHash(String), #[error("invalid transaction: {0}")] InvalidTransaction(String), #[error("invalid block: {0}")] InvalidBlock(String), #[error("invalid signature: {0}")] InvalidSignature(String), #[error("unknown transaction type: {0}")] UnknownTransactionType(String), #[error("missing field: {0}")] MissingField(String), #[error("serialization error: {0}")] SerializationError(String), #[error("chain error: {0}")] ChainError(String), #[error("genesis error: {0}")] GenesisError(String), #[error("validation error: {0}")] ValidationError(String), } ``` Source line: `4`. # sigil-core · evidence URL: https://docs.sigil.ml/reference/rust/sigil-core/evidence Markdown: https://docs.sigil.ml/reference/rust/sigil-core/evidence.md Source declarations, signatures and documentation for evidence. Source: `sigil/node/sigil-core/src/evidence.rs`. SHA-256: `16f65f8b5a50f6e3d5fb5c1b03a79b06ea4260444a325b2a3b59e5614073200b`. 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. ## evidence::MAX\_EVIDENCE\_LABEL\_LEN [#evidencemax_evidence_label_len] Maximum byte length of the anchor label. ```rust pub const MAX_EVIDENCE_LABEL_LEN: usize; ``` Source line: `31`. ## evidence::MAX\_EVIDENCE\_METADATA\_BYTES [#evidencemax_evidence_metadata_bytes] Maximum serialized byte size of the anchor metadata JSON. ```rust pub const MAX_EVIDENCE_METADATA_BYTES: usize; ``` Source line: `33`. ## evidence::MAX\_EVIDENCE\_URI\_LEN [#evidencemax_evidence_uri_len] Maximum byte length of the optional content URI. ```rust pub const MAX_EVIDENCE_URI_LEN: usize; ``` Source line: `35`. ## evidence::MAX\_EVIDENCE\_CLIENT\_NONCE\_LEN [#evidencemax_evidence_client_nonce_len] Maximum byte length of the client nonce. ```rust pub const MAX_EVIDENCE_CLIENT_NONCE_LEN: usize; ``` Source line: `37`. ## evidence::EvidenceAnchorData [#evidenceevidenceanchordata] Payload for an \[`crate::transaction::TransactionType::EvidenceAnchor`] transaction. The `digest` is the lowercase hex-encoded BLAKE3-256 digest of the anchored artifact. All fields are bounded so the payload stays small enough for deterministic block propagation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EvidenceAnchorData { /// Lowercase hex-encoded BLAKE3 digest (64 hex chars) of the artifact. pub digest: String, /// Bounded classification label, e.g. `"one.harness-archive.v1"`. pub label: String, /// Optional content-addressed URI for retrieval (Weft CID, IPFS, HTTPS). pub uri: Option, /// Small JSON metadata object (bounded by [`MAX_EVIDENCE_METADATA_BYTES`]). pub metadata: serde_json::Value, /// Client-chosen nonce; participates in the deterministic anchor ID so /// re-anchoring the same digest is possible while accidental duplicate /// submission is rejected. pub client_nonce: String } ``` Source line: `46`. ## evidence::EvidenceAnchorData::validate [#evidenceevidenceanchordatavalidate] Validate the payload. Called by the executor; SDK callers should validate before signing to fail fast. ```rust pub fn validate(&self) -> Result<(), CoreError>; ``` Source line: `64`. ## evidence::EvidenceAnchorData::digest\_hash [#evidenceevidenceanchordatadigest_hash] The digest as a typed \[`SigilHash`]. ```rust pub fn digest_hash(&self) -> Result; ``` Source line: `95`. ## evidence::EvidenceAnchorRecord [#evidenceevidenceanchorrecord] On-chain record produced by a successful `EvidenceAnchor` execution. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EvidenceAnchorRecord { /// Deterministic anchor ID (`evidence:anchor:`). pub anchor_id: String, /// Lowercase hex BLAKE3 digest of the anchored artifact. pub digest: String, /// Classification label from the anchor payload. pub label: String, /// Optional content URI from the anchor payload. pub uri: Option, /// Metadata JSON from the anchor payload. pub metadata: serde_json::Value, /// DID of the account that anchored (the transaction sender). pub anchor_did: String, /// Block height at which the anchor transaction executed. pub anchored_at_height: u64, /// Hex hash of the anchor transaction. pub tx_hash: String } ``` Source line: `102`. ## evidence::evidence\_anchor\_id [#evidenceevidence_anchor_id] Derive the deterministic anchor ID for an evidence anchor. The ID is `evidence:anchor:` where the hex is a domain-separated BLAKE3 hash over `(chain_id, anchor_did, digest, client_nonce)`. It is stable across nodes and replays, so duplicate submissions of the same logical anchor are rejected deterministically at execution time. ```rust pub fn evidence_anchor_id( chain_id: &str, anchor_did: &str, digest: &str, client_nonce: &str, ) -> Result; ``` Source line: `127`. ## evidence::validate\_digest\_hex [#evidencevalidate_digest_hex] Validate that `digest` is exactly 64 lowercase hex characters. Uppercase input is rejected rather than normalized: anchor payloads are consensus data, and canonical form must be unambiguous across clients. ```rust pub fn validate_digest_hex(digest: &str) -> Result<(), CoreError>; ``` Source line: `153`. # sigil-core · gal URL: https://docs.sigil.ml/reference/rust/sigil-core/gal Markdown: https://docs.sigil.ml/reference/rust/sigil-core/gal.md Source declarations, signatures and documentation for gal. Source: `sigil/node/sigil-core/src/gal.rs`. SHA-256: `b6adee272791a48c7fd1a18126c5620936bdf457ff76ca61277c3cce7dfd11dd`. 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. ## gal::RootStatus [#galrootstatus] Lifecycle of a root anchor on the GAL. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RootStatus { /// The root is currently authoritative and may be used to verify lineage. Active, /// A key rotation is in progress; new signatures must use the new key, but /// the previous key is still recognized for a grace window. Rotating, /// The root has been revoked; resolution MUST reject any DID rooted here. Revoked, } ``` Source line: `35`. ## gal::AffinityKind [#galaffinitykind] How a subject was assigned to its shard. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AffinityKind { /// Co-located with the rest of the issuing organization. Organization, /// Co-located by DID namespace prefix. Namespace, /// Random / load-balanced. Random, } ``` Source line: `48`. ## gal::RevocationKind [#galrevocationkind] Shape of a revocation: targets a single DID, cascades from a root, or cascades through an org tree. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RevocationKind { /// Revokes a single DID only. Single, /// Revokes an HMR / MHR / ENR root and cascades to every descendant. CascadeRoot, /// Revokes through an org-tree subset (e.g., a single department). CascadeOrg, } ``` Source line: `61`. ## gal::ShardOp [#galshardop] Topology change kind. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ShardOp { Add, Remove, Split, Merge, Migrate, } ``` Source line: `73`. ## gal::HmrAnchor [#galhmranchor] Human Root (HMR) anchor. A single human's controlling root identity. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct HmrAnchor { /// `did:oas:sigil:hmr:`. pub hmr_did: String, /// Multibase-encoded ed25519 controller public key. pub controller_pubkey: String, /// Multibase-encoded ed25519 recovery public keys. pub recovery_pubkeys: Vec, /// BLAKE3 commitment to the off-chain DID document / bio / charter. pub metadata_commitment: String, /// Shard the anchor lives on. pub shard_id: String, /// Lifecycle status. pub status: RootStatus, /// Monotonic per-subject sequence number across updates. pub sequence: u64, /// Block height at which this version was anchored. pub anchored_at_block: u64 } ``` Source line: `89`. ## gal::MhrAnchor [#galmhranchor] Machine / Multi-Human Root (MHR) anchor. A multi-party root controlled by a threshold of HMRs (or other roots). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MhrAnchor { /// `did:oas:sigil:mhr:`. pub mhr_did: String, /// Threshold policy over member HMR DIDs. pub controller_policy: ThresholdPolicy, /// Member HMR DIDs explicitly enumerated for explorer / cascade purposes. pub member_hmrs: Vec, /// Profit share assignments (sum to 10_000 basis points; enforced /// downstream by the `DistributionPolicy::is_complete` invariant). pub profit_shares: Vec, /// Recovery policy for compromise / rotation events. pub recovery_policy: ControlPolicy, /// BLAKE3 commitment to off-chain metadata. pub metadata_commitment: String, pub shard_id: String, pub status: RootStatus, pub sequence: u64, pub anchored_at_block: u64 } ``` Source line: `112`. ## gal::EnrAnchor [#galenranchor] Enterprise / Entity Root (ENR) anchor. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EnrAnchor { /// `did:oas:sigil:enr:`. pub enr_did: String, /// Authority policy over enterprise actions. pub controller_policy: ControlPolicy, /// Anchoring commitment to off-chain governance documents. pub governance_root: String, /// Authorized signers (officers / employees) that can sign ENR-issued /// child anchors. pub authorized_signers: Vec, pub metadata_commitment: String, pub shard_id: String, pub status: RootStatus, pub sequence: u64, pub anchored_at_block: u64 } ``` Source line: `134`. ## gal::OrgLineageRoot [#galorglineageroot] Org-tree Merkle root. Updated atomically when child membership changes. Resolvers verify a Merkle inclusion proof against this root before trusting any sub-org or agent claim of org membership. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct OrgLineageRoot { /// Controlling org DID — typically an MHR or ENR. pub org_did: String, /// BLAKE3 Merkle root over canonical leaf hashes. pub merkle_root: String, /// Number of leaves the root covers. pub leaf_count: u64, pub sequence: u64, pub anchored_at_block: u64, pub status: RootStatus } ``` Source line: `157`. ## gal::ShardAssignment [#galshardassignment] Shard assignment for a single DID. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ShardAssignment { pub subject_did: String, pub shard_id: String, pub affinity_kind: AffinityKind, pub assigned_at_block: u64, pub sequence: u64 } ``` Source line: `171`. ## gal::RevocationRecord [#galrevocationrecord] Revocation record. The chain serves these via `gal_check_revocation`, which MUST be called first by every resolver. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevocationRecord { pub subject_did: String, pub revocation_kind: RevocationKind, /// BLAKE3 commitment to the off-chain reason document. pub reason_commitment: String, pub revoked_at_block: u64, pub revoked_by_did: String, /// Set when `revocation_kind != Single` so cascade chains are /// deterministically reconstructible from on-chain state. pub parent_root_did: Option } ``` Source line: `182`. ## gal::ShardTopologyEntry [#galshardtopologyentry] Shard topology change entry. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ShardTopologyEntry { pub shard_id: String, pub operation: ShardOp, pub affected_dids: Vec, pub parent_shard_id: Option, pub new_shard_id: Option, pub applied_at_block: u64, pub sequence: u64 } ``` Source line: `196`. ## gal::RevocationStatus [#galrevocationstatus] Status returned by `gal_check_revocation`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevocationStatus { /// True if the subject is revoked. pub revoked: bool, /// The matching record when `revoked == true`. None otherwise. pub record: Option } ``` Source line: `212`. ## gal::GalValidationError [#galgalvalidationerror] Errors produced when validating GAL records. ```rust #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum GalValidationError { #[error("did mismatch: expected {expected}, found {found}")] DidMismatch { expected: String, found: String }, #[error("status is not active")] StatusNotActive, #[error("anchor block is in the future")] AnchorInFuture, #[error("sequence is not monotonic (have {have}, got {got})")] NonMonotonicSequence { have: u64, got: u64 }, #[error("metadata commitment mismatch")] MetadataCommitmentMismatch, #[error("subject is revoked")] Revoked, } ``` Source line: `221`. ## gal::RootAnchor [#galrootanchor] Common interface for typed root anchors. Implemented by \[`HmrAnchor`], \[`MhrAnchor`], \[`EnrAnchor`]. ```rust pub trait RootAnchor { /// The subject DID this anchor binds. fn subject_did(&self) -> &str; /// Current lifecycle status. fn status(&self) -> RootStatus; /// Block height the anchor was first / last published at. fn anchored_at_block(&self) -> u64; /// Monotonic sequence for the subject. fn sequence(&self) -> u64; /// BLAKE3 commitment to the off-chain DID document. fn metadata_commitment(&self) -> &str; } ``` Source line: `239`. ## gal::validate\_root\_anchor [#galvalidate_root_anchor] Validate a candidate root anchor against the chain state. `current_block` is the latest finalized block height; `prior_sequence` is the most recent on-chain sequence for this subject (or zero if none). `expected_did` is the subject DID the caller already resolved. ```rust pub fn validate_root_anchor( anchor: &A, expected_did: &str, current_block: u64, prior_sequence: u64, ) -> Result<(), GalValidationError>; ``` Source line: `311`. ## gal::verify\_metadata\_commitment [#galverify_metadata_commitment] Verify the off-chain DID document matches an anchor's commitment. `document_blake3` is the BLAKE3 hex digest of the canonical JSON form of the resolved DID document; equality is the one-and-only check. ```rust pub fn verify_metadata_commitment( anchor: &A, document_blake3: &str, ) -> Result<(), GalValidationError>; ``` Source line: `342`. ## gal::is\_revoked [#galis_revoked] Returns true when the supplied \[`RevocationStatus`] indicates the subject is currently revoked. Sugar so callers can lead with this check. ```rust pub fn is_revoked(status: &RevocationStatus) -> bool; ``` Source line: `355`. # sigil-core · genesis URL: https://docs.sigil.ml/reference/rust/sigil-core/genesis Markdown: https://docs.sigil.ml/reference/rust/sigil-core/genesis.md Source declarations, signatures and documentation for genesis. Source: `sigil/node/sigil-core/src/genesis.rs`. SHA-256: `9235fb95d731524071e18b46676772bd9693c7ffd163e7afbb07d9e021fae49b`. 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. ## genesis::GenesisConfig [#genesisgenesisconfig] Complete genesis configuration for a Sigil network. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GenesisConfig { /// Chain identifier. pub chain_id: ChainId, /// Unix timestamp for genesis block. pub genesis_time: u64, /// Protocol version at genesis. pub protocol_version: String, /// Initial validator set with their stakes. pub validators: Vec, /// Initial account balances (DID -> balance in micro-MINT). #[serde(default)] pub balances: HashMap, /// Initial identity documents for launch/custody DIDs. /// /// A DID with a genesis balance but no identity document is spend-locked /// until a key-derived self-registration is possible. Mainnet launch /// custody accounts should seed explicit identity documents here. #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub identities: HashMap, /// Protocol parameters. pub params: ProtocolParams, /// Economic parameters. pub economics: EconomicParams, /// Tower consensus parameters (slot duration, epoch length, committee sizes). /// Absent in old genesis files — defaults applied automatically. #[serde(default, skip_serializing_if = "Option::is_none")] pub tower_params: Option, /// On-chain governance parameters (deposits, voting period, quorum, timelock). /// Absent in old genesis files — defaults applied automatically. #[serde(default, skip_serializing_if = "Option::is_none")] pub governance_params: Option, /// Smart-contract platform parameters. /// Absent in old genesis files — defaults applied automatically. #[serde(default, skip_serializing_if = "Option::is_none")] pub contract_params: Option, /// CZAC protocol parameters. /// Absent in old genesis files — defaults applied automatically. #[serde(default, skip_serializing_if = "Option::is_none")] pub czac_params: Option, /// Vigils event-driven autonomous contract parameters. /// Absent in old genesis files — defaults applied automatically. #[serde(default, skip_serializing_if = "Option::is_none")] pub vigils_params: Option, /// Nova metaverse launch configuration. /// Absent in old genesis files — defaults to disabled/no genesis worlds. #[serde(default, skip_serializing_if = "Option::is_none")] pub nova_params: Option, /// Reference contracts deployed as part of genesis. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub reference_contracts: Vec, /// Compute marketplace parameters. #[cfg(feature = "compute")] #[serde(default, skip_serializing_if = "Option::is_none")] pub compute_params: Option, /// On-chain `@username` registry parameters (length-tier prices, multiplier, /// reserved list, dispute multisig DIDs). Absent in old genesis files — /// defaults applied via `effective_username_params`. #[serde(default, skip_serializing_if = "Option::is_none")] pub username_params: Option } ``` Source line: `22`. ## genesis::GenesisConfig::compute\_state\_root [#genesisgenesisconfigcompute_state_root] Compute the genesis state root from the initial configuration. Returns an error if the configuration cannot be serialized. ```rust pub fn compute_state_root(&self) -> Result; ``` Source line: `87`. ## genesis::GenesisConfig::validate [#genesisgenesisconfigvalidate] Validate the genesis configuration. ```rust pub fn validate(&self) -> Result<(), GenesisValidationError>; ``` Source line: `103`. ## genesis::GenesisConfig::testnet\_default [#genesisgenesisconfigtestnet_default] Create a minimal testnet genesis config. ```rust pub fn testnet_default() -> Self; ``` Source line: `325`. ## genesis::GenesisConfig::effective\_tower\_params [#genesisgenesisconfigeffective_tower_params] Return the effective `TowerParams`, falling back to the default if the genesis file pre-dates this field. ```rust pub fn effective_tower_params(&self) -> TowerParams; ``` Source line: `350`. ## genesis::GenesisConfig::effective\_governance\_params [#genesisgenesisconfigeffective_governance_params] Return the effective `GovernanceParams`, falling back to the default if the genesis file pre-dates this field. ```rust pub fn effective_governance_params(&self) -> GovernanceParams; ``` Source line: `356`. ## genesis::GenesisConfig::effective\_contract\_params [#genesisgenesisconfigeffective_contract_params] Return the effective `ContractParams`, falling back to the default if the genesis file pre-dates this field. ```rust pub fn effective_contract_params(&self) -> ContractParams; ``` Source line: `362`. ## genesis::GenesisConfig::effective\_czac\_params [#genesisgenesisconfigeffective_czac_params] Return the effective `CzacParams`, falling back to the default if the genesis file pre-dates this field. ```rust pub fn effective_czac_params(&self) -> CzacParams; ``` Source line: `368`. ## genesis::GenesisConfig::effective\_vigils\_params [#genesisgenesisconfigeffective_vigils_params] Return the effective `VigilsParams`, falling back to the default if the genesis file pre-dates this field. ```rust pub fn effective_vigils_params(&self) -> VigilsParams; ``` Source line: `374`. ## genesis::GenesisConfig::effective\_nova\_params [#genesisgenesisconfigeffective_nova_params] Return the effective `NovaParams`, falling back to disabled/no worlds if the genesis file pre-dates this field. ```rust pub fn effective_nova_params(&self) -> crate::nova::NovaParams; ``` Source line: `380`. ## genesis::GenesisReferenceContract [#genesisgenesisreferencecontract] A WASM reference contract deployed into genesis state. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GenesisReferenceContract { pub name: String, pub version: String, pub contract_did: String, pub controller_did: String, pub runtime: ContractRuntime, pub code_hash: String, /// Hex-encoded WASM bytecode. Embedded in genesis so validators deploy /// identical content-addressed code without filesystem dependencies. pub code_hex: String, #[serde(default)] pub init_args: serde_json::Value, pub upgrade_policy: ControlPolicy, pub call_policy: ControlPolicy, #[serde(default)] pub allowed_host_functions: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub zone_id: Option, pub contract_kind: ContractKind, #[serde(default)] pub accepts_vigil_callbacks: bool, pub license_metadata: ContractLicenseMetadata } ``` Source line: `387`. ## genesis::GenesisReferenceContract::code\_bytes [#genesisgenesisreferencecontractcode_bytes] ```rust pub fn code_bytes(&self) -> Result, String>; ``` Source line: `412`. ## genesis::GenesisReferenceContract::parsed\_code\_hash [#genesisgenesisreferencecontractparsed_code_hash] ```rust pub fn parsed_code_hash(&self) -> Result; ``` Source line: `416`. ## genesis::GenesisValidator [#genesisgenesisvalidator] A validator entry in the genesis config. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GenesisValidator { /// OAS DID of the validator entity. pub did: String, /// Human root DID in the lineage chain. pub human_root_did: String, /// Generation distance from human root. pub generation: u32, /// Initial stake in micro-MINT. pub stake: u64, /// Validator mode. pub mode: ValidatorGenesisMode, /// Ed25519 consensus public key (hex-encoded). pub consensus_pubkey: String, /// P2P networking public key (hex-encoded). pub network_pubkey: String } ``` Source line: `460`. ## genesis::validate\_validator\_did [#genesisvalidate_validator_did] ```rust pub fn validate_validator_did(did: &str) -> Result<(), GenesisValidationError>; ``` Source line: `484`. ## genesis::ValidatorGenesisMode [#genesisvalidatorgenesismode] Validator mode for genesis. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ValidatorGenesisMode { /// Block Producer: executes transactions and generates ZK proofs. BlockProducer, /// Block Validator: verifies ZK proofs without re-executing. BlockValidator, } ``` Source line: `662`. ## genesis::ProtocolParams [#genesisprotocolparams] Protocol parameters that can be changed via governance. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProtocolParams { /// Backward-compatible target block time in whole seconds. pub target_block_time_secs: u64, /// Precise target block time in milliseconds. When present, this is the /// canonical value; `target_block_time_secs` is retained for older config /// files and coarse operator displays. #[serde(default, skip_serializing_if = "Option::is_none")] pub target_block_time_ms: Option, /// Blocks per epoch. pub blocks_per_epoch: u64, /// Maximum transactions per block. pub max_txs_per_block: u32, /// Maximum block gas limit. pub max_block_gas: u64, /// Ed25519 transaction signature batch size for validator admission. /// /// This is a node-performance knob, not consensus entropy: different /// values still verify the same ordered transaction list deterministically. #[serde(default, skip_serializing_if = "Option::is_none")] pub signature_batch_size: Option, /// Minimum stake for Block Producers (micro-MINT). pub min_bp_stake: u64, /// Minimum stake for Block Validators (micro-MINT). pub min_bv_stake: u64, /// Unbonding period in epochs. pub unbonding_epochs: u32, /// Maximum validators in the active set. pub max_validators: u32 } ``` Source line: `671`. ## genesis::ProtocolParams::target\_block\_time\_millis [#genesisprotocolparamstarget_block_time_millis] Canonical target block time in milliseconds. ```rust pub fn target_block_time_millis(&self) -> u64; ``` Source line: `720`. ## genesis::ProtocolParams::target\_block\_time\_seconds [#genesisprotocolparamstarget_block_time_seconds] Canonical target block time in seconds, preserving sub-second precision. ```rust pub fn target_block_time_seconds(&self) -> f64; ``` Source line: `727`. ## genesis::ProtocolParams::signature\_batch\_size [#genesisprotocolparamssignature_batch_size] Configured signature batch size, falling back to the production default. ```rust pub fn signature_batch_size(&self) -> usize; ``` Source line: `732`. ## genesis::EconomicParams [#genesiseconomicparams] Economic parameters. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct EconomicParams { /// Base block reward in micro-MINT. pub base_block_reward: u64, /// Lineage generation decay factor (beta). pub generation_decay_beta: f64, /// Minimum human root share of rewards (as fraction, e.g., 0.51). pub min_human_share: f64, /// Treasury allocation fraction (e.g., 0.15). pub treasury_fraction: f64, /// Slashing lineage propagation factor (delta). pub slashing_delta: f64, /// Publisher bond slash distribution: reporter share. pub bond_slash_reporter: f64, /// Publisher bond slash distribution: harmed party share. pub bond_slash_harmed: f64, /// Publisher bond slash distribution: treasury share. pub bond_slash_treasury: f64 } ``` Source line: `741`. ## genesis::ComputeParams [#genesiscomputeparams] Compute marketplace parameters (feature-gated). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeParams { /// Minimum stake for compute providers by tier (micro-MINT). pub provider_stake_tiers: ProviderStakeTiers, /// Challenge window in epochs. pub challenge_window_epochs: u32, /// Number of arbitrators for challenge resolution. pub arbitration_committee_size: u32, /// Challenge success split: challenger share. pub challenge_success_challenger: f64, /// Challenge success split: arbitrators share. pub challenge_success_arbitrators: f64, /// Challenge success split: treasury share. pub challenge_success_treasury: f64, /// Sentinel probe interval in seconds. pub sentinel_probe_interval_secs: u64, /// Allowlist of DIDs authorised to resolve compute challenges. The /// executor MUST fail closed when the sender is not in this list. An /// empty list disables challenge resolution entirely (intentional — /// safer default than implicit prefix-matching authority). #[serde(default)] pub challenge_resolver_dids: Vec, /// When `true`, T3 (TEE) receipts may settle. When `false`, the /// executor refuses T3 settlement (vendor-specific TEE crypto is not /// yet wired). Default is `false`. #[serde(default)] pub tee_verifier_enabled: bool, /// Provider exit cooldown in epochs. #[serde(default = "default_unbonding_epochs")] pub unbonding_epochs: u64, /// Default challenger deposit (micro-MINT) when the tx omits one. #[serde(default = "default_challenge_deposit")] pub default_challenge_deposit: u64, /// Phase 12 — DIDs authorised to submit `MacaProposeEpoch` / /// `MacaFinalizeEpoch`. Empty disables MACA epoch proposal. #[serde(default)] pub proposer_dids: Vec, /// Phase 12 — DIDs authorised to submit `MacaPublishBeacon`. #[serde(default)] pub beacon_dids: Vec, /// Phase 12 — minimum agreeing validators for `MacaQuorumProof` /// to be `Confirmed`. #[serde(default = "default_validator_quorum_threshold")] pub validator_quorum_threshold: u32, /// Permit settlement of receipts with no stored compute job. This is a /// named compatibility mode only; mainnet and canary default it off. #[serde(default)] pub allow_ad_hoc_receipts: bool, /// Phase 14a — AMD SEV-SNP trust anchors. SEC1-uncompressed VCEK /// pubkeys + SHA-384 measurement allowlist. `None` keeps the /// SEV-SNP verifier in Phase 13 fail-closed mode. #[serde(default, skip_serializing_if = "Option::is_none")] pub sev_snp_trust_anchors: Option, /// Phase 14b — Intel SGX DCAP trust anchors. Pinned Intel SGX Root /// CA fingerprint + MRENCLAVE / MRSIGNER allowlists + freshness + /// minimum SVN. `None` keeps the SGX verifier in fail-closed mode. #[serde(default, skip_serializing_if = "Option::is_none")] pub sgx_dcap_trust_anchors: Option, /// Phase 14c — Intel TDX trust anchors. Pinned Intel SGX Root CA /// fingerprint + MRTD / MRSIGNER_SEAM / RTMR allowlists + /// collateral. `None` keeps the TDX verifier in fail-closed mode. #[serde(default, skip_serializing_if = "Option::is_none")] pub tdx_trust_anchors: Option, /// Phase 14d — Arm CCA trust anchors. Pinned IAK pubkey(s) + RIM /// allowlist + receipt-binding/freshness toggles. `None` keeps /// the Arm CCA verifier in fail-closed mode. #[serde(default, skip_serializing_if = "Option::is_none")] pub arm_cca_trust_anchors: Option } ``` Source line: `778`. ## genesis::SevSnpTrustAnchorsGenesis [#genesissevsnptrustanchorsgenesis] Genesis-side mirror of `compute_state::SevSnpTrustAnchors` (sigil-core can't depend on sigil-node, so we duplicate the shape; the engine crate translates one to the other at startup). Phase 14a-2 added optional production-hardening fields. All are `None`/`false` by default so existing genesis files remain valid; operators that want to tighten T3 SEV-SNP acceptance set them explicitly. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SevSnpTrustAnchorsGenesis { #[serde(default)] pub acceptable_vcek_pubkeys: Vec>, #[serde( default, serialize_with = "bytes_hex_vec_serde::serialize", deserialize_with = "bytes_hex_vec_serde::deserialize" )] pub measurement_allowlist: Vec>, /// SHA-256 of the AMD ARK certificate (DER form). When set, the /// verifier validates the cert chain VCEK→ASK→ARK and extracts the /// VCEK pubkey from it. #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_ark_fingerprint_sha256: Option<[u8; 32]>, /// SHA-256 of the AMD ASK / product signing certificate (DER form). /// When set, the chain accepts only SEV-SNP attestations carrying the /// product ASK pinned here. #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_ask_fingerprint_sha256: Option<[u8; 32]>, /// Optional exact VCEK allowlist by chip ID and reported TCB. #[serde(default)] pub vcek_allowlist: Vec, /// Maximum attestation age in chain epochs. #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, /// Minimum SEV-SNP TCB version components. #[serde(default, skip_serializing_if = "Option::is_none")] pub min_tcb: Option, /// Require REPORT_DATA receipt-binding on every report. #[serde(default)] pub require_receipt_binding: bool } ``` Source line: `857`. ## genesis::bytes\_hex\_vec\_serde::serialize [#genesisbytes_hex_vec_serdeserialize] ```rust #[cfg(feature = "compute")] pub fn serialize(values: &[Vec], serializer: S) -> Result where S: Serializer,; ``` Source line: `894`. ## genesis::bytes\_hex\_vec\_serde::deserialize [#genesisbytes_hex_vec_serdedeserialize] ```rust #[cfg(feature = "compute")] pub fn deserialize<'de, D>(deserializer: D) -> Result>, D::Error> where D: Deserializer<'de>,; ``` Source line: `902`. ## genesis::SevSnpVcekAllowlistEntryGenesis [#genesissevsnpvcekallowlistentrygenesis] Genesis mirror of `compute_state::SevSnpVcekAllowlistEntry`. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SevSnpVcekAllowlistEntryGenesis { pub product: String, pub chip_id: Vec, pub tcb: SevSnpTcbGenesis, #[serde(default, skip_serializing_if = "Option::is_none")] pub vcek_fingerprint_sha256: Option<[u8; 32]> } ``` Source line: `948`. ## genesis::SevSnpTcbGenesis [#genesissevsnptcbgenesis] Genesis mirror of `compute_state::SevSnpTcb`. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct SevSnpTcbGenesis { pub bootloader: u8, pub tee: u8, pub snp: u8, pub microcode: u8 } ``` Source line: `959`. ## genesis::SgxDcapTrustAnchorsGenesis [#genesissgxdcaptrustanchorsgenesis] Genesis-side mirror of `compute_state::SgxDcapTrustAnchors` (Phases 14b + 14b-2). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct SgxDcapTrustAnchorsGenesis { /// SHA-256 of Intel SGX Root CA DER. #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>, /// 32-byte MRENCLAVE values the chain accepts. #[serde(default)] pub mrenclave_allowlist: Vec>, /// 32-byte MRSIGNER values the chain accepts. #[serde(default)] pub mrsigner_allowlist: Vec>, /// Freshness window in chain epochs. #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, /// Minimum ISV enclave SVN. #[serde(default, skip_serializing_if = "Option::is_none")] pub min_isv_svn: Option, /// Minimum PCE SVN. #[serde(default, skip_serializing_if = "Option::is_none")] pub min_pce_svn: Option, /// Require REPORT_DATA receipt-binding on every quote. #[serde(default)] pub require_receipt_binding: bool, // ----- Phase 14b-2 collateral hardening ----- #[serde(default, skip_serializing_if = "Option::is_none")] pub intel_tcb_signing_cert_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub tcb_info_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub qe_identity_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub pck_crl_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub root_ca_crl_der: Option>, #[serde(default)] pub allowed_tcb_statuses: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub collateral_max_age_epochs: Option } ``` Source line: `970`. ## genesis::ArmCcaTrustAnchorsGenesis [#genesisarmccatrustanchorsgenesis] Genesis-side mirror of `compute_state::ArmCcaTrustAnchors` (Phase 14d). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct ArmCcaTrustAnchorsGenesis { #[serde(default)] pub pinned_iak_pubkeys_sec1: Vec>, #[serde(default)] pub rim_allowlist: Vec>, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, #[serde(default)] pub require_receipt_binding: bool } ``` Source line: `1055`. ## genesis::TdxTrustAnchorsGenesis [#genesistdxtrustanchorsgenesis] Genesis-side mirror of `compute_state::TdxTrustAnchors` (Phase 14c). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct TdxTrustAnchorsGenesis { #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>, #[serde(default)] pub mrtd_allowlist: Vec>, #[serde(default)] pub mrsigner_seam_allowlist: Vec>, #[serde(default)] pub rtmr0_allowlist: Vec>, #[serde(default)] pub rtmr1_allowlist: Vec>, #[serde(default)] pub rtmr2_allowlist: Vec>, #[serde(default)] pub rtmr3_allowlist: Vec>, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub min_pce_svn: Option, #[serde(default)] pub require_receipt_binding: bool, #[serde(default, skip_serializing_if = "Option::is_none")] pub intel_tcb_signing_cert_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub tcb_info_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub qe_identity_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub pck_crl_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub root_ca_crl_der: Option>, #[serde(default)] pub allowed_tcb_statuses: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub collateral_max_age_epochs: Option } ``` Source line: `1069`. ## genesis::ProviderStakeTiers [#genesisproviderstaketiers] Provider stake tiers for compute marketplace. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProviderStakeTiers { /// Consumer tier (micro-MINT). pub consumer: u64, /// Professional tier (micro-MINT). pub professional: u64, /// Enterprise tier (micro-MINT). pub enterprise: u64, /// Cluster tier (micro-MINT). pub cluster: u64 } ``` Source line: `1109`. ## genesis::TowerParams [#genesistowerparams] Tower consensus parameters for the genesis config. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TowerParams { /// Slot duration in seconds. pub slot_duration_secs: u64, /// Number of slots per epoch. pub slots_per_epoch: u64, /// Minimum stake to become a Tower validator (micro-MINT). pub min_tower_stake: u64, /// Tower committee size (Block Producers per slot). pub bp_committee_size: u32, /// Tower committee size (Block Validators per slot). pub bv_committee_size: u32 } ``` Source line: `1134`. ## genesis::GovernanceParams [#genesisgovernanceparams] Governance parameters for the genesis config. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GovernanceParams { /// Minimum deposit for a parameter change proposal (micro-MINT). pub proposal_deposit_parameter: u64, /// Minimum deposit for a WASI module upgrade proposal (micro-MINT). pub proposal_deposit_wasi: u64, /// Minimum deposit for a treasury spend proposal (micro-MINT). pub proposal_deposit_treasury: u64, /// Minimum deposit for a validator slashing proposal (micro-MINT). pub proposal_deposit_slashing: u64, /// Minimum deposit for an emergency action proposal (micro-MINT). pub proposal_deposit_emergency: u64, /// Voting period in epochs (standard proposals). pub voting_period_epochs: u64, /// Voting period in epochs (emergency proposals). pub emergency_voting_period_epochs: u64, /// Timelock period in epochs (standard proposals). pub timelock_epochs: u64, /// Minimum quorum fraction (e.g. 0.40 = 40% of staked SIGIL must vote). pub quorum_fraction: f64 } ``` Source line: `1161`. ## genesis::ContractParams [#genesiscontractparams] Smart-contract platform parameters. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ContractParams { /// Maximum bytecode size for `RegisterContractCode`, in bytes. pub max_code_size: u64, /// Required base fee for code registration, in micro-MINT. pub register_code_base_fee: u64, /// Additional fee per started KiB of bytecode, in micro-MINT. pub register_code_fee_per_kib: u64, /// Height where privileged system contracts become the policy gate for /// core chain features. Before this height, legacy native execution stays /// active so a hard fork can be scheduled without changing old genesis /// files. `u64::MAX` means not scheduled. #[serde(default = "default_system_contracts_activation_height")] pub system_contracts_activation_height: u64 } ``` Source line: `1200`. ## genesis::CzacParams [#genesisczacparams] CZAC protocol launch controls. ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacParams { /// Enables CZAC payment-channel transactions that take custody of user /// funds. Must remain false on `sigil-mainnet-1` for v1. pub payment_channels_enabled: bool } ``` Source line: `1232`. ## genesis::CzacParams::canary\_enabled [#genesisczacparamscanary_enabled] Canary posture after operators intentionally opt into payment-channel soak testing under real load. ```rust pub fn canary_enabled() -> Self; ``` Source line: `1241`. ## genesis::VigilsParams [#genesisvigilsparams] Vigils launch and source-gating parameters. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VigilsParams { /// Master switch for all Vigils transactions. pub active: bool, /// Height before which Vigils transactions fail validation. pub activation_height: u64, /// Event source kinds currently accepted by semantic validation. pub enabled_sources: Vec, /// Maximum accepted EventDelivery transactions per block. pub max_event_deliveries_per_block: u32, /// Separate callback gas budget for the Vigils execution pass. pub max_callback_gas_per_block: u64, /// Maximum gas for one callback. pub max_single_callback_gas: u64, /// Maximum canonical event payload size. pub max_event_payload_bytes: u64, /// Maximum canonical proof size. pub max_event_proof_bytes: u64 } ``` Source line: `1250`. ## genesis::GenesisConfig::to\_json [#genesisgenesisconfigto_json] Serialize this genesis configuration to a JSON string. ```rust pub fn to_json(&self) -> Result; ``` Source line: `1286`. ## genesis::GenesisConfig::from\_json [#genesisgenesisconfigfrom_json] Deserialize a genesis configuration from a JSON string. ```rust pub fn from_json(json: &str) -> Result; ``` Source line: `1292`. ## genesis::GenesisConfig::write\_to\_file [#genesisgenesisconfigwrite_to_file] Write this genesis configuration to a file. ```rust pub fn write_to_file(&self, path: &std::path::Path) -> Result<(), crate::error::CoreError>; ``` Source line: `1298`. ## genesis::GenesisConfig::read\_from\_file [#genesisgenesisconfigread_from_file] Read a genesis configuration from a file (does NOT validate). ```rust pub fn read_from_file(path: &std::path::Path) -> Result; ``` Source line: `1306`. ## genesis::GenesisBuilder [#genesisgenesisbuilder] Builder for constructing a `GenesisConfig` with fluent API. ```rust #[derive(Debug)] pub struct GenesisBuilder { } ``` Source line: `1316`. ## genesis::GenesisBuilder::new\_testnet [#genesisgenesisbuildernew_testnet] Start a new genesis builder with testnet defaults. ```rust pub fn new_testnet() -> Self; ``` Source line: `1339`. ## genesis::GenesisBuilder::username\_params [#genesisgenesisbuilderusername_params] Set username registry parameters (length-tier prices, multiplier, reserved list, dispute multisig DIDs). ```rust pub fn username_params(mut self, params: crate::username::UsernameParams) -> Self; ``` Source line: `1364`. ## genesis::GenesisBuilder::chain\_id [#genesisgenesisbuilderchain_id] Set the chain ID. ```rust pub fn chain_id(mut self, id: ChainId) -> Self; ``` Source line: `1370`. ## genesis::GenesisBuilder::genesis\_time [#genesisgenesisbuildergenesis_time] Set the genesis time as a Unix timestamp. ```rust pub fn genesis_time(mut self, time: u64) -> Self; ``` Source line: `1376`. ## genesis::GenesisBuilder::add\_validator [#genesisgenesisbuilderadd_validator] Add a validator to the genesis set. ```rust pub fn add_validator(mut self, validator: GenesisValidator) -> Self; ``` Source line: `1382`. ## genesis::GenesisBuilder::add\_balance [#genesisgenesisbuilderadd_balance] Add an initial account balance. ```rust pub fn add_balance(mut self, did: String, balance: u64) -> Self; ``` Source line: `1388`. ## genesis::GenesisBuilder::add\_identity [#genesisgenesisbuilderadd_identity] Add an initial identity document for a launch/custody DID. ```rust pub fn add_identity(mut self, did: String, document: serde_json::Value) -> Self; ``` Source line: `1394`. ## genesis::GenesisBuilder::protocol\_params [#genesisgenesisbuilderprotocol_params] Set protocol parameters. ```rust pub fn protocol_params(mut self, params: ProtocolParams) -> Self; ``` Source line: `1400`. ## genesis::GenesisBuilder::economics [#genesisgenesisbuildereconomics] Set economic parameters. ```rust pub fn economics(mut self, economics: EconomicParams) -> Self; ``` Source line: `1406`. ## genesis::GenesisBuilder::tower\_params [#genesisgenesisbuildertower_params] Set Tower consensus parameters. ```rust pub fn tower_params(mut self, tower: TowerParams) -> Self; ``` Source line: `1412`. ## genesis::GenesisBuilder::governance\_params [#genesisgenesisbuildergovernance_params] Set governance parameters. ```rust pub fn governance_params(mut self, governance: GovernanceParams) -> Self; ``` Source line: `1418`. ## genesis::GenesisBuilder::contract\_params [#genesisgenesisbuildercontract_params] Set smart-contract platform parameters. ```rust pub fn contract_params(mut self, contracts: ContractParams) -> Self; ``` Source line: `1424`. ## genesis::GenesisBuilder::czac\_params [#genesisgenesisbuilderczac_params] Set CZAC protocol parameters. ```rust pub fn czac_params(mut self, czac: CzacParams) -> Self; ``` Source line: `1430`. ## genesis::GenesisBuilder::vigils\_params [#genesisgenesisbuildervigils_params] Set Vigils launch and source-gating parameters. ```rust pub fn vigils_params(mut self, vigils: VigilsParams) -> Self; ``` Source line: `1436`. ## genesis::GenesisBuilder::nova\_params [#genesisgenesisbuildernova_params] Set Nova metaverse launch parameters and genesis worlds. ```rust pub fn nova_params(mut self, nova: crate::nova::NovaParams) -> Self; ``` Source line: `1442`. ## genesis::GenesisBuilder::reference\_contract [#genesisgenesisbuilderreference_contract] Add a reference contract to be deployed at genesis. ```rust pub fn reference_contract(mut self, contract: GenesisReferenceContract) -> Self; ``` Source line: `1448`. ## genesis::GenesisBuilder::build [#genesisgenesisbuilderbuild] Build the genesis config and validate it. ```rust pub fn build(self) -> Result; ``` Source line: `1454`. ## genesis::ProtocolParams::testnet\_default [#genesisprotocolparamstestnet_default] Reduced-stake testnet defaults for easier testing. ```rust pub fn testnet_default() -> Self; ``` Source line: `1482`. ## genesis::EconomicParams::testnet\_default [#genesiseconomicparamstestnet_default] Testnet economic defaults with higher block rewards for faucet sustainability. ```rust pub fn testnet_default() -> Self; ``` Source line: `1500`. ## genesis::generate\_testnet\_genesis [#genesisgenerate_testnet_genesis] Generate a complete testnet genesis configuration with the specified number of validators. Each validator gets deterministic keys derived from its index. Returns a fully validated `GenesisConfig` ready to write to disk. ```rust pub fn generate_testnet_genesis( num_validators: usize, genesis_time: u64, ) -> Result; ``` Source line: `1518`. ## genesis::GenesisValidationError [#genesisgenesisvalidationerror] Errors during genesis validation. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum GenesisValidationError { #[error("genesis must have at least one validator")] NoValidators, #[error("invalid OAS DID for {did}: {reason}")] InvalidDid { did: String, reason: String }, #[error("invalid {field} for {did}: {reason}")] InvalidPublicKey { did: String, field: &'static str, reason: String, }, #[error("invalid genesis identity document for {did}: {reason}")] InvalidIdentityDocument { did: String, reason: String }, #[error("validator {did} has insufficient stake: {stake} < {minimum}")] InsufficientStake { did: String, stake: u64, minimum: u64, }, #[error("duplicate validator DID: {0}")] DuplicateValidator(String), #[error("duplicate validator {field}: {value}")] DuplicateValidatorPublicKey { field: &'static str, value: String }, #[error("validator {0} missing human root DID")] MissingHumanRoot(String), #[error("invalid compute genesis params: {reason}")] InvalidComputeParams { reason: String }, #[error("invalid CZAC genesis params: {reason}")] InvalidCzacParams { reason: String }, #[error("invalid Nova genesis params: {reason}")] InvalidNovaParams { reason: String }, #[error("invalid reference contract {contract_did}: {reason}")] InvalidReferenceContract { contract_did: String, reason: String, }, } ``` Source line: `1622`. # sigil-core · hash URL: https://docs.sigil.ml/reference/rust/sigil-core/hash Markdown: https://docs.sigil.ml/reference/rust/sigil-core/hash.md Source declarations, signatures and documentation for hash. Source: `sigil/node/sigil-core/src/hash.rs`. SHA-256: `65e418481f6d103c23adcf3665061468a65e84619a00c9e0acdaf173f31648c4`. 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. ## hash::SigilHash [#hashsigilhash] A 32-byte BLAKE3 hash used throughout the Sigil blockchain. ```rust #[derive(Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SigilHash([u8; 32]); ``` Source line: `8`. ## hash::SigilHash::ZERO [#hashsigilhashzero] The zero hash (used as parent hash for genesis block). ```rust pub const ZERO: Self; ``` Source line: `12`. ## hash::SigilHash::from\_bytes [#hashsigilhashfrom_bytes] Create from raw bytes. ```rust pub fn from_bytes(bytes: [u8; 32]) -> Self; ``` Source line: `15`. ## hash::SigilHash::digest [#hashsigilhashdigest] Hash arbitrary data. ```rust pub fn digest(data: &[u8]) -> Self; ``` Source line: `20`. ## hash::SigilHash::digest\_many [#hashsigilhashdigest_many] Hash multiple byte slices (concatenated). ```rust pub fn digest_many(parts: &[&[u8]]) -> Self; ``` Source line: `25`. ## hash::SigilHash::as\_bytes [#hashsigilhashas_bytes] Returns the raw 32 bytes. ```rust pub fn as_bytes(&self) -> &[u8; 32]; ``` Source line: `34`. ## hash::SigilHash::to\_hex [#hashsigilhashto_hex] Returns hex-encoded string. ```rust pub fn to_hex(&self) -> String; ``` Source line: `39`. ## hash::SigilHash::from\_hex [#hashsigilhashfrom_hex] Parse from hex string. ```rust pub fn from_hex(hex: &str) -> Result; ``` Source line: `48`. # sigil-core URL: https://docs.sigil.ml/reference/rust/sigil-core Markdown: https://docs.sigil.ml/reference/rust/sigil-core.md Sigil blockchain core types — blocks, transactions, receipts, genesis Sigil blockchain core types — blocks, transactions, receipts, genesis | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-core` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-core/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_core` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-core = { path = "../sigil-core" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | ------------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | No additional feature dependencies | | `governance` | No additional feature dependencies | | `marketplace` | No additional feature dependencies | | `tower` | No additional feature dependencies | | `czac` | No additional feature dependencies | | `nova` | `czac` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-core/crate) — 54 declarations * [address](/reference/rust/sigil-core/address) — 9 declarations * [artifact](/reference/rust/sigil-core/artifact) — 8 declarations * [authority](/reference/rust/sigil-core/authority) — 15 declarations * [block](/reference/rust/sigil-core/block) — 17 declarations * [chain](/reference/rust/sigil-core/chain) — 6 declarations * [dao](/reference/rust/sigil-core/dao) — 6 declarations * [dex](/reference/rust/sigil-core/dex) — 25 declarations * [error](/reference/rust/sigil-core/error) — 1 declarations * [evidence](/reference/rust/sigil-core/evidence) — 10 declarations * [gal](/reference/rust/sigil-core/gal) — 17 declarations * [genesis](/reference/rust/sigil-core/genesis) — 63 declarations * [hash](/reference/rust/sigil-core/hash) — 8 declarations * [labor](/reference/rust/sigil-core/labor) — 54 declarations * [mail](/reference/rust/sigil-core/mail) — 76 declarations * [mandate](/reference/rust/sigil-core/mandate) — 22 declarations * [nft](/reference/rust/sigil-core/nft) — 17 declarations * [nova](/reference/rust/sigil-core/nova) — 28 declarations * [receipt](/reference/rust/sigil-core/receipt) — 7 declarations * [recovery](/reference/rust/sigil-core/recovery) — 26 declarations * [serde\_helpers](/reference/rust/sigil-core/serde_helpers) — 6 declarations * [sns](/reference/rust/sigil-core/sns) — 36 declarations * [storage\_market](/reference/rust/sigil-core/storage_market) — 35 declarations * [system\_contracts](/reference/rust/sigil-core/system_contracts) — 8 declarations * [transaction](/reference/rust/sigil-core/transaction) — 247 declarations * [username](/reference/rust/sigil-core/username) — 36 declarations * [velocity](/reference/rust/sigil-core/velocity) — 42 declarations * [vigil](/reference/rust/sigil-core/vigil) — 72 declarations # sigil-core · labor URL: https://docs.sigil.ml/reference/rust/sigil-core/labor Markdown: https://docs.sigil.ml/reference/rust/sigil-core/labor.md Source declarations, signatures and documentation for labor. Source: `sigil/node/sigil-core/src/labor.rs`. SHA-256: `be2ad662ad493142d2e72886662f3184a2ea3b9559b44d3ab2bf3eeab06f2241`. 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. ## labor::CounterpartyFilter [#laborcounterpartyfilter] Counterparty filter for a labor job posting. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum CounterpartyFilter { HumansOnly, AgentsOnly, DaosOnly, AriseProvidersOnly, Any, } ``` Source line: `22`. ## labor::JobStatus [#laborjobstatus] Lifecycle of a labor job. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum JobStatus { Open, Reviewing, Awarded, Cancelled, Closed, } ``` Source line: `33`. ## labor::SkillTag [#laborskilltag] Skill / category tag attached to a job posting or bid. ```rust pub type SkillTag = String; ``` Source line: `42`. ## labor::LaborJob [#laborlaborjob] Posted labor job (advertisement on-chain). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborJob { /// `did:oas:sigil:job:`. pub job_id: String, /// DID that posted the job (DAO / agent / human). pub poster_did: String, /// Mandate id used to post this job. Required when poster is an agent. pub posting_mandate_id: Option, /// BLAKE3 commitment of off-chain title text. pub title_commitment: String, /// BLAKE3 commitment of off-chain job description. pub description_commitment: String, /// Job category. pub category: String, /// Required skills. pub required_skills: Vec, /// Required attestations (e.g., kyc, expertise). pub required_attestations: Vec, /// Token paid for completion. pub budget_token_id: TokenId, /// Total budget amount. pub budget_amount: u128, /// Milestone plan template. pub milestone_plan: MilestonePlan, /// Escrow policy template. pub escrow_policy: EscrowPolicy, /// Counterparty filter. pub counterparty_filter: CounterpartyFilter, /// Optional epoch deadline. pub deadline_epoch: Option, /// Status. pub status: JobStatus, /// Epoch the job was created at. pub created_at_epoch: u64 } ``` Source line: `46`. ## labor::BidderKind [#laborbidderkind] Class of entity submitting a bid. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BidderKind { Human, Agent, Dao, Committee, AriseProvider, } ``` Source line: `88`. ## labor::BidStatus [#laborbidstatus] Bid lifecycle status. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BidStatus { Submitted, Withdrawn, Accepted, Rejected, } ``` Source line: `99`. ## labor::ReputationSnapshot [#laborreputationsnapshot] Reputation snapshot at bid time. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReputationSnapshot { pub aggregate_score: i64, pub completed_contracts: u32, pub disputes_lost: u32, pub captured_at_epoch: u64 } ``` Source line: `108`. ## labor::AttestationRef [#laborattestationref] Reference to an off-chain attestation document. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct AttestationRef { pub attestation_id: String, pub attester_did: String, pub commitment: String } ``` Source line: `117`. ## labor::LaborBid [#laborlaborbid] Submitted bid for a labor job. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborBid { pub bid_id: String, pub job_id: String, pub bidder_did: String, pub bidder_kind: BidderKind, pub proposed_price: u128, pub proposed_token_id: TokenId, pub estimated_duration_seconds: u64, pub capabilities_proof: Vec, pub reputation_snapshot: Option, pub mandate_id_for_work: Option, pub status: BidStatus, pub submitted_at_epoch: u64 } ``` Source line: `125`. ## labor::ContractState [#laborcontractstate] Lifecycle of a labor contract. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ContractState { Proposed, Funded, InProgress, Delivered, Disputed, Completed, Cancelled, } ``` Source line: `147`. ## labor::MilestoneState [#labormilestonestate] Lifecycle of a single milestone. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MilestoneState { Pending, Submitted, Attested, Paid, Disputed, Cancelled, } ``` Source line: `160`. ## labor::DeliverableRef [#labordeliverableref] Reference to an on-chain deliverable. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct DeliverableRef { pub deliverable_id: String, pub payload_hash: String } ``` Source line: `171`. ## labor::Milestone [#labormilestone] Single milestone within a labor contract. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Milestone { pub milestone_index: u32, pub description_hash: String, pub amount: u128, pub due_epoch: Option, pub state: MilestoneState, pub deliverable_ref: Option } ``` Source line: `178`. ## labor::MilestonePlan [#labormilestoneplan] Plan describing milestone breakdown attached to a job and inherited by the resulting contract. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MilestonePlan { pub milestones: Vec } ``` Source line: `190`. ## labor::MilestonePlan::total\_amount [#labormilestoneplantotal_amount] Sum of milestone amounts. ```rust pub fn total_amount(&self) -> u128; ``` Source line: `196`. ## labor::MilestoneTemplate [#labormilestonetemplate] Template milestone (without runtime state) used in postings/plans. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MilestoneTemplate { pub milestone_index: u32, pub description_hash: String, pub amount: u128, pub due_epoch: Option } ``` Source line: `203`. ## labor::EscrowPolicy [#laborescrowpolicy] Escrow funding policy for a labor contract. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum EscrowPolicy { /// Full amount must be escrowed before work begins. FundFullUpFront, /// Each milestone is funded independently before its work begins. FundPerMilestone, } ``` Source line: `213`. ## labor::LaborEscrow [#laborlaborescrow] Durable escrow accounting for one labor contract. Amounts are protocol units of `token_id`. Settlement is exact: funds move from `reserved_amount` to exactly one of released, refunded, or slashed. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborEscrow { pub contract_id: String, pub funder_did: String, pub escrow_account_did: String, pub token_id: TokenId, pub total_required: u128, pub reserved_amount: u128, pub released_amount: u128, pub refunded_amount: u128, pub slashed_amount: u128, pub last_updated_epoch: u64 } ``` Source line: `225`. ## labor::LaborEscrow::remaining\_unsettled [#laborlaborescrowremaining_unsettled] ```rust pub fn remaining_unsettled(&self) -> u128; ``` Source line: `239`. ## labor::LaborEscrow::accounted\_total [#laborlaborescrowaccounted_total] ```rust pub fn accounted_total(&self) -> u128; ``` Source line: `243`. ## labor::AttestationPolicy [#laborattestationpolicy] Attestation policy applied to a contract milestone (refines the mandate-level approval policy). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum AttestationPolicy { /// Inherit the mandate's approval policy. InheritFromMandate, /// Override with an employer-only attestation. Employer, /// Override with a committee threshold. Committee { members: Vec, threshold: u32, }, } ``` Source line: `255`. ## labor::RoyaltyRecipient [#laborroyaltyrecipient] Royalty recipient — a long-tail human/agent credited for their contribution to the work product. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RoyaltyRecipient { pub recipient_did: String, pub basis_points: u16, pub rationale_commitment: Option } ``` Source line: `270`. ## labor::LaborContract [#laborlaborcontract] Labor contract — the binding agreement between employer and worker. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborContract { /// `did:oas:sigil:contract:labor:`. pub contract_id: String, pub job_id: String, pub employer_did: String, pub worker_did: String, pub employer_mandate_id: Option, pub worker_mandate_id: Option, pub token_id: TokenId, pub total_amount: u128, /// Dedicated escrow account DID /// (`did:oas:sigil:treasury:escrow:`). pub escrow_account_did: String, pub milestones: Vec, pub milestone_policy: MilestonePolicy, pub attestation_policy: AttestationPolicy, pub dispute_policy: DisputePolicy, pub reputation_impact: ReputationImpactPolicy, /// Optional revenue share applied to this contract's payout (beyond the /// worker). pub revenue_share: Option, /// Royalty recipients credited on each payout. pub royalty_recipients: Vec, pub state: ContractState, pub created_at_epoch: u64 } ``` Source line: `278`. ## labor::LaborContract::milestone\_sum\_matches\_total [#laborlaborcontractmilestone_sum_matches_total] Returns true when the sum of all milestone amounts equals `total_amount`. ```rust pub fn milestone_sum_matches_total(&self) -> bool; ``` Source line: `308`. ## labor::LaborContract::validate\_revenue\_invariants [#laborlaborcontractvalidate_revenue_invariants] Validate that royalty basis points sum to `<= 10_000` and revenue share, if present, sums to exactly 10\_000. ```rust pub fn validate_revenue_invariants(&self) -> Result<(), RevenueShareError>; ``` Source line: `315`. ## labor::CapabilitySpec [#laborcapabilityspec] Capability boundary for an open bounty claim. These fields are commitments and tags only. The executor does not infer a claimant's ability from self-asserted metadata; verification still has to pass through the offer's \[`VerificationMode`]. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CapabilitySpec { pub required_skills: Vec, pub required_attestations: Vec, pub artifact_policy_commitment: Option } ``` Source line: `344`. ## labor::VerificationMode [#laborverificationmode] Verification primitive required before an open bounty can pay. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum VerificationMode { /// Deterministic allowlist of human approvers. Launch-live when /// `threshold` signatures from unique listed DIDs are present. HumanApproved { approver_dids: Vec, threshold: u32, }, /// Deterministic quorum allowlist. Launch-live when `threshold` unique /// members agree. QuorumAgreed { member_dids: Vec, threshold: u32, }, /// Lumen verifier mode. Launch-live when the claimant submits a valid /// Lumen attestation during `LaborAttestClaim`; `registry_id` is matched /// as the expected Lumen model/registry id. LumenAttested { registry_id: String }, /// Reserved verifier mode. Fails closed until the exact TEE verifier /// registry and vendor roots are wired into consensus execution. TeeAttested { registry_id: String }, } ``` Source line: `353`. ## labor::BountyState [#laborbountystate] Lifecycle of an open bounty offer. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BountyState { Open, Exhausted, Closed, Cancelled, } ``` Source line: `378`. ## labor::BountyClaimState [#laborbountyclaimstate] Lifecycle of a submitted bounty claim. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BountyClaimState { Submitted, Verified, Rejected, Paid, Expired, } ``` Source line: `388`. ## labor::BountyOffer [#laborbountyoffer] Open offer funded up front by a sponsor. Claim payouts are reserved at submission time and released only after the verification mode reaches its deterministic threshold. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BountyOffer { pub offer_id: String, pub sponsor_did: String, pub posting_mandate_id: Option, pub title_commitment: String, pub description_commitment: String, pub category: String, pub capability_spec: CapabilitySpec, pub token_id: TokenId, pub total_funding: u128, pub reserved_claim_amount: u128, pub paid_amount: u128, pub refunded_amount: u128, pub slashed_bond_amount: u128, pub spam_fee_collected: u128, pub claim_bond: u128, pub spam_fee: u128, pub max_claims: u32, pub per_claim_payout_cap: u128, pub claim_window_start_block: u64, pub claim_window_end_block: u64, pub claim_timeout_blocks: u64, pub verification_mode: VerificationMode, pub escrow_account_did: String, pub state: BountyState, pub submitted_claim_count: u32, pub created_at_block: u64, pub last_updated_block: u64 } ``` Source line: `400`. ## labor::BountyOffer::available\_amount [#laborbountyofferavailable_amount] ```rust pub fn available_amount(&self) -> u128; ``` Source line: `431`. ## labor::BountyOffer::accounted\_funding [#laborbountyofferaccounted_funding] ```rust pub fn accounted_funding(&self) -> u128; ``` Source line: `438`. ## labor::BountyClaim [#laborbountyclaim] Claim against an open bounty offer. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BountyClaim { pub claim_id: String, pub offer_id: String, pub claimant_did: String, pub claim_sequence: u32, pub deliverable_hash: String, pub evidence_hashes: Vec, pub requested_payout: u128, pub bond_amount: u128, pub spam_fee_paid: u128, pub submitted_at_block: u64, pub timeout_block: u64, pub state: BountyClaimState, pub attestation_ids: Vec, pub paid_at_block: Option, pub settled_at_block: Option } ``` Source line: `448`. ## labor::ClaimAttestation [#laborclaimattestation] Deterministic attestation recorded for a bounty claim. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ClaimAttestation { pub attestation_id: String, pub offer_id: String, pub claim_id: String, pub attester_did: String, pub verdict: AttestationVerdict, pub reason_commitment: Option, pub signed_at_block: u64 } ``` Source line: `468`. ## labor::LaborOffer [#laborlaboroffer] Compatibility wrapper for code that wants to reason over both named contracts and open offers without changing the existing named labor model. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum LaborOffer { Named(LaborContract), Open(BountyOffer), } ``` Source line: `482`. ## labor::Deliverable [#labordeliverable] Submitted deliverable for a milestone. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Deliverable { pub deliverable_id: String, pub contract_id: String, pub milestone_index: u32, pub payload_hash: String, pub submitted_by_did: String, pub submitted_at_epoch: u64 } ``` Source line: `493`. ## labor::AttesterKind [#laborattesterkind] Class of attester signing a milestone completion. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AttesterKind { Employer, Committee, Oracle, Automated, } ``` Source line: `505`. ## labor::AttestationVerdict [#laborattestationverdict] Outcome of an attestation. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AttestationVerdict { Accept, Reject, Partial, } ``` Source line: `515`. ## labor::CompletionAttestation [#laborcompletionattestation] Milestone completion attestation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CompletionAttestation { pub attestation_id: String, pub contract_id: String, pub milestone_index: u32, pub attester_did: String, pub attester_kind: AttesterKind, pub verdict: AttestationVerdict, pub reason_commitment: Option, pub signed_at_epoch: u64 } ``` Source line: `523`. ## labor::Review [#laborreview] Post-completion review. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Review { pub review_id: String, pub contract_id: String, pub reviewer_did: String, pub subject_did: String, /// Score in 0..=100. pub score: u8, pub commentary_hash: String, /// Reviewer weight derived from reputation snapshot. pub weight: u32, pub recorded_at_epoch: u64 } ``` Source line: `536`. ## labor::SignalSource [#laborsignalsource] Source category of a reputation signal. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SignalSource { ContractCompletion, Attestation, Review, DisputeOutcome, StakeLoss, AriseChallenge, } ``` Source line: `556`. ## labor::DecayPolicy [#labordecaypolicy] Decay policy applied to a reputation signal at read time. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum DecayPolicy { /// No decay — permanent signal. None, /// Half-life expressed in epochs. HalfLife { epochs: u64 }, /// Linear decay over a fixed window (signal is zero after `epochs`). LinearOver { epochs: u64 }, } ``` Source line: `568`. ## labor::ReputationSignal [#laborreputationsignal] Append-only reputation signal stored on-chain. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReputationSignal { pub signal_id: String, pub subject_did: String, pub source: SignalSource, pub delta_score: i32, pub decay_policy: DecayPolicy, pub epoch: u64 } ``` Source line: `579`. ## labor::DisputeCause [#labordisputecause] Cause classification for a dispute. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum DisputeCause { NonDelivery, QualityIssue, PaymentWithheld, Misuse, Other, } ``` Source line: `595`. ## labor::DisputeState [#labordisputestate] Lifecycle of a dispute. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum DisputeState { Raised, UnderReview, Resolved, Appealed, } ``` Source line: `606`. ## labor::DisputeResolution [#labordisputeresolution] Resolution outcome for a dispute. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum DisputeResolution { /// Pay worker the supplied amount; refund remainder to employer. Split { worker_amount: u128, employer_amount: u128, }, /// Cancel contract; refund full escrow to employer. RefundEmployer, /// Pay full escrow to worker. PayWorker, } ``` Source line: `616`. ## labor::Dispute [#labordispute] On-chain dispute record. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Dispute { pub dispute_id: String, pub contract_id: String, pub raiser_did: String, pub cause: DisputeCause, pub evidence_hashes: Vec, pub arbitration: DisputePolicy, pub state: DisputeState, pub resolution: Option, pub raised_at_epoch: u64 } ``` Source line: `630`. ## labor::Dispute::allows\_transition [#labordisputeallows_transition] Validate a state transition. Allowed transitions: `Raised -> UnderReview -> Resolved`, `Resolved -> Appealed`, `Appealed -> UnderReview`. ```rust pub fn allows_transition(&self, next: DisputeState) -> bool; ``` Source line: `646`. ## labor::ShareRevocability [#laborsharerevocability] Revocability of a revenue share. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ShareRevocability { Immutable, RevocableByIssuer, DaoGovernance, } ``` Source line: `664`. ## labor::RevenueShare [#laborrevenueshare] Revenue share record. The chain enforces the basis-point invariant on every distribute operation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevenueShare { pub share_id: String, /// Source DID generating the revenue (contract / agent / skill / model / /// workflow). pub source_did: String, pub distribution: DistributionPolicy, pub expiry_epoch: Option, pub revocability: ShareRevocability } ``` Source line: `673`. ## labor::RevenueShare::validate\_totals [#laborrevenuesharevalidate_totals] Returns Ok if and only if `Σ basis_points == 10_000` exactly. ```rust pub fn validate_totals(&self) -> Result<(), RevenueShareError>; ``` Source line: `685`. ## labor::RevenueShare::split [#laborrevenuesharesplit] Compute payout amounts per recipient for a given gross amount. Any residual (rounding) goes to the source. ```rust pub fn split(&self, gross: u128) -> Vec<(String, u128)>; ``` Source line: `701`. ## labor::RevenueShareError [#laborrevenueshareerror] Errors related to revenue share / royalty arithmetic. ```rust #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum RevenueShareError { #[error("revenue shares must total 10000 basis points")] ShareTotalsInvalid, #[error("royalty basis points exceed 10000")] RoyaltyTotalExceedsLimit, } ``` Source line: `724`. ## labor::single\_recipient\_distribution [#laborsingle_recipient_distribution] Convenience constructor for a single-recipient distribution policy. ```rust pub fn single_recipient_distribution(recipient_did: impl Into) -> DistributionPolicy; ``` Source line: `732`. # sigil-core · mail URL: https://docs.sigil.ml/reference/rust/sigil-core/mail Markdown: https://docs.sigil.ml/reference/rust/sigil-core/mail.md Source declarations, signatures and documentation for mail. Source: `sigil/node/sigil-core/src/mail.rs`. SHA-256: `22b8ff2d591b28fb405bb0bc2e1fc379b5390792fb9fcaaa5d406d7f2879ab95`. 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. ## mail::MAILBOX\_ID\_DOMAIN [#mailmailbox_id_domain] ```rust pub const MAILBOX_ID_DOMAIN: &str; ``` Source line: `12`. ## mail::ALIAS\_ID\_DOMAIN [#mailalias_id_domain] ```rust pub const ALIAS_ID_DOMAIN: &str; ``` Source line: `13`. ## mail::KEY\_ID\_DOMAIN [#mailkey_id_domain] ```rust pub const KEY_ID_DOMAIN: &str; ``` Source line: `14`. ## mail::POLICY\_ID\_DOMAIN [#mailpolicy_id_domain] ```rust pub const POLICY_ID_DOMAIN: &str; ``` Source line: `15`. ## mail::DELIVERY\_ID\_DOMAIN [#maildelivery_id_domain] ```rust pub const DELIVERY_ID_DOMAIN: &str; ``` Source line: `16`. ## mail::DELIVERY\_SIGNATURE\_DOMAIN [#maildelivery_signature_domain] ```rust pub const DELIVERY_SIGNATURE_DOMAIN: &str; ``` Source line: `17`. ## mail::DELEGATION\_ID\_DOMAIN [#maildelegation_id_domain] ```rust pub const DELEGATION_ID_DOMAIN: &str; ``` Source line: `18`. ## mail::ABUSE\_ID\_DOMAIN [#mailabuse_id_domain] ```rust pub const ABUSE_ID_DOMAIN: &str; ``` Source line: `19`. ## mail::TX\_DOMAIN [#mailtx_domain] ```rust pub const TX_DOMAIN: &str; ``` Source line: `20`. ## mail::EVENT\_DOMAIN [#mailevent_domain] ```rust pub const EVENT_DOMAIN: &str; ``` Source line: `21`. ## mail::MAIL\_TREASURY\_DID [#mailmail_treasury_did] ```rust pub const MAIL_TREASURY_DID: &str; ``` Source line: `23`. ## mail::validate\_hex32 [#mailvalidate_hex32] ```rust pub fn validate_hex32(label: &str, value: &str) -> Result<(), CoreError>; ``` Source line: `37`. ## mail::mailbox\_id [#mailmailbox_id] ```rust pub fn mailbox_id( chain_id: &str, subject_did: &str, mailbox_salt_commitment: &str, ) -> Result; ``` Source line: `61`. ## mail::alias\_id [#mailalias_id] ```rust pub fn alias_id( chain_id: &str, alias_kind: MailAliasKind, canonical_alias_or_commitment: &str, ) -> Result; ``` Source line: `75`. ## mail::key\_id [#mailkey_id] ```rust pub fn key_id( chain_id: &str, mailbox_id: &str, purpose: MailKeyPurpose, algorithm: &str, public_key_bytes: &[u8], key_version: u64, ) -> Result; ``` Source line: `91`. ## mail::policy\_id [#mailpolicy_id] ```rust pub fn policy_id( chain_id: &str, mailbox_id: &str, policy_version: u64, policy_hash: &str, ) -> Result; ``` Source line: `118`. ## mail::delivery\_commitment\_id [#maildelivery_commitment_id] ```rust pub fn delivery_commitment_id( chain_id: &str, sender_route_id: &str, recipient_mailbox_id: &str, encrypted_weave_ref_commitment: &str, ciphertext_content_hash: &str, client_nonce: &str, recipient_key_version: u64, ) -> Result; ``` Source line: `133`. ## mail::delegation\_id [#maildelegation_id] ```rust pub fn delegation_id( chain_id: &str, mailbox_id: &str, grantee_did: &str, nonce: &str, ) -> Result; ``` Source line: `164`. ## mail::abuse\_id [#mailabuse_id] ```rust pub fn abuse_id( chain_id: &str, mailbox_id: &str, delivery_commitment_id: &str, reporter_did: &str, evidence_commitment: &str, ) -> Result; ``` Source line: `180`. ## mail::validate\_no\_plaintext\_mail\_value [#mailvalidate_no_plaintext_mail_value] ```rust pub fn validate_no_plaintext_mail_value(label: &str, value: &str) -> Result<(), CoreError>; ``` Source line: `203`. ## mail::MailboxStatus [#mailmailboxstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MailboxStatus { Active, Locked, Recovering, Deactivated, } ``` Source line: `234`. ## mail::MailboxCapabilityRecord [#mailmailboxcapabilityrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailboxCapabilityRecord { pub mailbox_id: String, pub subject_did: String, pub controller_policy: ControlPolicy, pub recovery_policy_ref: Option, pub wallet_address: Option, pub primary_alias_id: Option, pub alias_ids: Vec, pub status: MailboxStatus, pub current_policy_version: u64, pub current_encryption_key_version: u64, pub current_signing_key_version: u64, pub mailbox_storage_commitment: Option, pub created_at_height: u64, pub updated_at_height: u64, pub sequence: u64 } ``` Source line: `242`. ## mail::MailboxCapabilityRecord::validate\_public\_shape [#mailmailboxcapabilityrecordvalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `261`. ## mail::MailAliasKind [#mailmailaliaskind] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MailAliasKind { SigilUsername, Did, Wallet, FutureAddress, Blinded, } ``` Source line: `279`. ## mail::MailAliasKind::as\_str [#mailmailaliaskindas_str] ```rust pub fn as_str(self) -> &'static str; ``` Source line: `288`. ## mail::AliasStatus [#mailaliasstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AliasStatus { Active, Revoked, Superseded, } ``` Source line: `301`. ## mail::MailAliasRecord [#mailmailaliasrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailAliasRecord { pub alias_id: String, pub mailbox_id: String, pub alias_kind: MailAliasKind, pub public_value: Option, pub blinded_commitment: Option, pub verified_source_ref: Option, pub status: AliasStatus, pub created_at_height: u64, pub revoked_at_height: Option, pub sequence: u64 } ``` Source line: `308`. ## mail::MailAliasRecord::validate\_public\_shape [#mailmailaliasrecordvalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `322`. ## mail::PolicyStatus [#mailpolicystatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum PolicyStatus { Active, Superseded, Revoked, } ``` Source line: `343`. ## mail::PolicyAction [#mailpolicyaction] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum PolicyAction { Allow, Deny, ContactsOnly, RequireStake, RequireFee, RequireVerifiedSender, RequireProof, } ``` Source line: `351`. ## mail::SenderSelector [#mailsenderselector] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case", tag = "kind", content = "value")] pub enum SenderSelector { Any, Did(String), Mailbox(String), Alias(String), Wallet(String), VerifiedOrganization(String), Blinded(String), } ``` Source line: `363`. ## mail::SenderSelector::matches [#mailsenderselectormatches] ```rust pub fn matches(&self, route: &SenderRoute) -> bool; ``` Source line: `374`. ## mail::ReceivePolicyRule [#mailreceivepolicyrule] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReceivePolicyRule { pub selector: SenderSelector, pub action: PolicyAction, pub priority: u16, pub stake_required: u128, pub fee_required: u128, pub max_per_epoch: Option } ``` Source line: `391`. ## mail::MailboxPolicyRecord [#mailmailboxpolicyrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailboxPolicyRecord { pub policy_id: String, pub mailbox_id: String, pub version: u64, pub status: PolicyStatus, pub rules: Vec, pub emergency_lock_bypass: bool, pub created_at_height: u64, pub revoked_at_height: Option, pub sequence: u64 } ``` Source line: `401`. ## mail::MailboxPolicyRecord::validate\_public\_shape [#mailmailboxpolicyrecordvalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `414`. ## mail::evaluate\_policy [#mailevaluate_policy] ```rust pub fn evaluate_policy( rules: &[ReceivePolicyRule], route: &SenderRoute, ) -> Result; ``` Source line: `426`. ## mail::MailKeyPurpose [#mailmailkeypurpose] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MailKeyPurpose { Encryption, Signing, Recovery, Device, } ``` Source line: `446`. ## mail::MailKeyPurpose::as\_str [#mailmailkeypurposeas_str] ```rust pub fn as_str(self) -> &'static str; ``` Source line: `454`. ## mail::KeyStatus [#mailkeystatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum KeyStatus { Active, Rotated, Revoked, Expired, } ``` Source line: `466`. ## mail::MailPublicKeyRecord [#mailmailpublickeyrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailPublicKeyRecord { pub key_id: String, pub mailbox_id: String, pub purpose: MailKeyPurpose, pub algorithm: String, pub public_key_hex: String, pub device_commitment: String, pub version: u64, pub status: KeyStatus, pub published_at_height: u64, pub expires_at_height: Option, pub revoked_at_height: Option, pub sequence: u64 } ``` Source line: `474`. ## mail::MailPublicKeyRecord::validate\_public\_shape [#mailmailpublickeyrecordvalidate_public_shape] ```rust pub fn validate_public_shape(&self, height: u64) -> Result<(), CoreError>; ``` Source line: `490`. ## mail::DeliveryStatus [#maildeliverystatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum DeliveryStatus { Committed, Refunded, Slashed, Burned, } ``` Source line: `518`. ## mail::SenderRoute [#mailsenderroute] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case", tag = "kind", content = "value")] pub enum SenderRoute { Did { did: String }, Mailbox { mailbox_id: String }, Alias { alias_id: String }, Wallet { wallet_address: String }, VerifiedOrganization { org_did: String }, Blinded { commitment: String }, SelectiveDisclosure { commitment: String }, } ``` Source line: `527`. ## mail::SenderRoute::route\_id [#mailsenderrouteroute_id] ```rust pub fn route_id(&self) -> String; ``` Source line: `538`. ## mail::SenderRoute::validate\_public\_shape [#mailsenderroutevalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `551`. ## mail::DeliveryCommitmentRecord [#maildeliverycommitmentrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeliveryCommitmentRecord { pub delivery_commitment_id: String, pub sender_route: SenderRoute, pub sender_route_id: String, pub recipient_mailbox_id: String, pub encrypted_weave_ref_commitment: String, pub ciphertext_content_hash: String, pub recipient_key_id: String, pub recipient_key_version: u64, pub policy_version: u64, pub client_nonce: String, pub block_height: u64, pub status: DeliveryStatus, pub reply_to_commitment: Option, pub required_fee: u128, pub locked_stake: u128 } ``` Source line: `567`. ## mail::DeliveryCommitmentRecord::validate\_privacy\_shape [#maildeliverycommitmentrecordvalidate_privacy_shape] ```rust pub fn validate_privacy_shape(&self) -> Result<(), CoreError>; ``` Source line: `586`. ## mail::delivery\_signature\_payload [#maildelivery_signature_payload] ```rust pub fn delivery_signature_payload( chain_id: &str, commitment: &DeliveryCommitmentRecord, ) -> Result, CoreError>; ``` Source line: `607`. ## mail::EconomicsStatus [#maileconomicsstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum EconomicsStatus { Active, Refunded, Slashed, Burned, } ``` Source line: `639`. ## mail::SenderEconomicsRecord [#mailsendereconomicsrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SenderEconomicsRecord { pub sender_route_id: String, pub recipient_mailbox_id: String, pub locked_stake: u128, pub collected_fee: u128, pub status: EconomicsStatus, pub updated_at_height: u64 } ``` Source line: `647`. ## mail::MailPermissionScope [#mailmailpermissionscope] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MailPermissionScope { DeliverMail, ReadMailboxReferences, WriteMailboxReferences, ManageReceivePolicy, ManageAliases, ManageKeys, } ``` Source line: `658`. ## mail::MailDelegationGrant [#mailmaildelegationgrant] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailDelegationGrant { pub grant_id: String, pub mailbox_id: String, pub grantor_did: String, pub grantee_did: String, pub scopes: Vec, pub expires_at_height: Option, pub revoked_at_height: Option, pub rate_limit_per_epoch: Option, pub nonce: String, pub created_at_height: u64 } ``` Source line: `668`. ## mail::AbuseStatus [#mailabusestatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AbuseStatus { Open, Resolved, Rejected, } ``` Source line: `683`. ## mail::AbuseResolution [#mailabuseresolution] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AbuseResolution { Refund, Slash, Burn, Reject, } ``` Source line: `691`. ## mail::AbuseReport [#mailabusereport] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AbuseReport { pub abuse_report_id: String, pub mailbox_id: String, pub delivery_commitment_id: String, pub reporter_did: String, pub evidence_commitment: String, pub status: AbuseStatus, pub resolution: Option, pub created_at_height: u64, pub resolved_at_height: Option } ``` Source line: `699`. ## mail::AbuseReport::validate\_public\_shape [#mailabusereportvalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `712`. ## mail::MailCreateMailboxData [#mailmailcreatemailboxdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailCreateMailboxData { pub mailbox_id: String, pub subject_did: String, pub controller_policy: ControlPolicy, pub wallet_address: Option, pub mailbox_salt_commitment: String, pub mailbox_storage_commitment: Option, pub client_nonce: String } ``` Source line: `723`. ## mail::MailAddAliasData [#mailmailaddaliasdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailAddAliasData { pub mailbox_id: String, pub alias: MailAliasRecord, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `734`. ## mail::MailRemoveAliasData [#mailmailremovealiasdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRemoveAliasData { pub mailbox_id: String, pub alias_id: String, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `742`. ## mail::MailSetPrimaryAliasData [#mailmailsetprimaryaliasdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailSetPrimaryAliasData { pub mailbox_id: String, pub alias_id: String, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `750`. ## mail::MailMailboxStatusData [#mailmailmailboxstatusdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailMailboxStatusData { pub mailbox_id: String, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `758`. ## mail::MailLockMailboxData [#mailmaillockmailboxdata] ```rust pub type MailLockMailboxData = MailMailboxStatusData; ``` Source line: `764`. ## mail::MailUnlockMailboxData [#mailmailunlockmailboxdata] ```rust pub type MailUnlockMailboxData = MailMailboxStatusData; ``` Source line: `765`. ## mail::MailDeactivateMailboxData [#mailmaildeactivatemailboxdata] ```rust pub type MailDeactivateMailboxData = MailMailboxStatusData; ``` Source line: `766`. ## mail::MailRecoverMailboxData [#mailmailrecovermailboxdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRecoverMailboxData { pub mailbox_id: String, pub recovery_policy_ref: String, pub new_controller_policy: ControlPolicy, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `769`. ## mail::MailUpdateReceivePolicyData [#mailmailupdatereceivepolicydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailUpdateReceivePolicyData { pub mailbox_id: String, pub policy: MailboxPolicyRecord, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `778`. ## mail::MailRevokeReceivePolicyData [#mailmailrevokereceivepolicydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRevokeReceivePolicyData { pub mailbox_id: String, pub policy_version: u64, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `786`. ## mail::MailPublishKeyData [#mailmailpublishkeydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailPublishKeyData { pub mailbox_id: String, pub key: MailPublicKeyRecord, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `794`. ## mail::MailRotateKeyData [#mailmailrotatekeydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRotateKeyData { pub mailbox_id: String, pub old_key_id: String, pub new_key: MailPublicKeyRecord, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `802`. ## mail::MailRevokeKeyData [#mailmailrevokekeydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRevokeKeyData { pub mailbox_id: String, pub key_id: String, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `811`. ## mail::MailExpireKeysData [#mailmailexpirekeysdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailExpireKeysData { pub mailbox_id: String, pub before_height: u64, pub client_nonce: String } ``` Source line: `819`. ## mail::MailPublishDeliveryCommitmentData [#mailmailpublishdeliverycommitmentdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailPublishDeliveryCommitmentData { pub commitment: DeliveryCommitmentRecord, pub sender_signature_hex: Option, pub sender_signing_key_id: Option, pub sender_signing_key_version: Option, pub client_nonce: String } ``` Source line: `826`. ## mail::MailReportAbuseData [#mailmailreportabusedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailReportAbuseData { pub report: AbuseReport, pub client_nonce: String } ``` Source line: `835`. ## mail::MailResolveAbuseData [#mailmailresolveabusedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailResolveAbuseData { pub abuse_report_id: String, pub resolution: AbuseResolution, pub resolver_did: String, pub client_nonce: String } ``` Source line: `841`. ## mail::MailGrantPermissionData [#mailmailgrantpermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailGrantPermissionData { pub grant: MailDelegationGrant, pub client_nonce: String } ``` Source line: `849`. ## mail::MailRevokePermissionData [#mailmailrevokepermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MailRevokePermissionData { pub grant_id: String, pub mailbox_id: String, pub expected_sequence: u64, pub client_nonce: String } ``` Source line: `855`. # sigil-core · mandate URL: https://docs.sigil.ml/reference/rust/sigil-core/mandate Markdown: https://docs.sigil.ml/reference/rust/sigil-core/mandate.md Source declarations, signatures and documentation for mandate. Source: `sigil/node/sigil-core/src/mandate.rs`. SHA-256: `69429341049624e22dd6fb997f19bdd7ee712e2a0455760cf233fbb7f416b149`. 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. ## mandate::MandateId [#mandatemandateid] Stable identifier for an issued mandate. Conceptually `did:oas:sigil:mandate:` — kept as an opaque string for flexibility across encodings. ```rust pub type MandateId = String; ``` Source line: `30`. ## mandate::JobCategory [#mandatejobcategory] Job category tag. Free-form lowercase string kept stable in indices. ```rust pub type JobCategory = String; ``` Source line: `33`. ## mandate::TokenId [#mandatetokenid] Token identifier (native `SIGIL` or a custom token DID). ```rust pub type TokenId = String; ``` Source line: `36`. ## mandate::MandateStatus [#mandatemandatestatus] Status of a mandate. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MandateStatus { Active, Paused, Expired, Revoked, } ``` Source line: `41`. ## mandate::AllowedCounterparties [#mandateallowedcounterparties] Allowed counterparties for actions taken under a mandate. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum AllowedCounterparties { /// Any DID allowed. Any, /// Restricted to an explicit allowlist of DIDs. Allowlist { dids: Vec }, /// Restricted to specific entity classes. Classes { classes: Vec }, } ``` Source line: `51`. ## mandate::CounterpartyClass [#mandatecounterpartyclass] Class of counterparty an actor is allowed to engage with. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum CounterpartyClass { Human, Agent, Dao, Committee, AriseProvider, Contract, } ``` Source line: `63`. ## mandate::SpendLimits [#mandatespendlimits] Spend limits enforced at every spend. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SpendLimits { /// Maximum amount permitted in a single transaction. pub per_transaction_max: u128, /// Maximum aggregate spend per epoch (or `None` for no per-period cap). pub per_epoch_max: Option } ``` Source line: `74`. ## mandate::MandateBudget [#mandatemandatebudget] Total budget available under a mandate, independent of period caps. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MandateBudget { /// Total amount granted. pub total_amount: u128, /// Amount already spent (recorded on-chain via `RecordMandateSpend`). pub spent_amount: u128 } ``` Source line: `83`. ## mandate::MandateBudget::remaining [#mandatemandatebudgetremaining] Remaining spendable amount. ```rust pub fn remaining(&self) -> u128; ``` Source line: `92`. ## mandate::MandateScope [#mandatemandatescope] Scope of work a mandate authorizes. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MandateScope { /// Job categories the mandate may engage with (e.g., "audit", /// "explorer-frontend", "infra-ops"). Empty means "any". pub job_categories: Vec, /// Free-form tag commitments for explorer/UI. pub tag_commitments: Vec, /// If `Some(true)` the mandate may *post* jobs; otherwise post-only flows /// are denied. Used to distinguish hiring-only vs paying-only mandates. pub may_post_jobs: bool, /// If `Some(true)` the mandate may *accept* jobs as a worker. pub may_accept_jobs: bool } ``` Source line: `99`. ## mandate::MilestonePolicy [#mandatemilestonepolicy] Milestone payment policy under a mandate. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MilestonePolicy { /// Pay each milestone independently as it is attested. PerMilestone, /// Final lump-sum payment after all milestones are attested. LumpSumOnCompletion, } ``` Source line: `115`. ## mandate::ApprovalPolicy [#mandateapprovalpolicy] Approval policy for milestone attestations. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum ApprovalPolicy { /// Single signer (employer DID). Employer, /// Threshold of named DIDs. Committee { members: Vec, threshold: u32, }, /// Single trusted oracle DID. Oracle { oracle_did: String }, /// Automated rule executed by a deterministic verifier (e.g., a CI hash /// match). The string is a verifier identifier. Automated { verifier_id: String }, } ``` Source line: `125`. ## mandate::DisputePolicy [#mandatedisputepolicy] Dispute policy associated with a mandate or contract. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum DisputePolicy { /// DAO governance resolves disputes. DaoGovernance, /// Threshold of a named arbitration committee. Committee { members: Vec, threshold: u32, }, /// Single oracle resolves disputes. Oracle { oracle_did: String }, /// Random selection from staked jurors. Selection rule is consensus-defined. StakedJury { minimum_stake: u128 }, } ``` Source line: `143`. ## mandate::RevocationPolicy [#mandaterevocationpolicy] Revocation policy for a mandate. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data", rename_all = "snake_case")] pub enum RevocationPolicy { /// Issuer may revoke at any time. IssuerAtWill, /// Issuer may revoke only after a notice period in blocks. IssuerWithNotice { notice_blocks: u64 }, /// Revocation requires DAO governance. DaoGovernance, } ``` Source line: `160`. ## mandate::ReputationImpactPolicy [#mandatereputationimpactpolicy] Reputation impact rules that downstream contracts inherit. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ReputationImpactPolicy { /// Successful completion grants reputation; failure deducts. Standard, /// Successful completion grants reputation; failure has no impact. UpsideOnly, /// No reputation effect. None, } ``` Source line: `172`. ## mandate::DelegationPolicy [#mandatedelegationpolicy] Sub-delegation policy. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegationPolicy { /// May the authorized actor issue sub-mandates? pub allow_subdelegation: bool, /// Max remaining-budget percentage that may be sub-delegated, in basis /// points (0..=10_000). pub max_subdelegated_basis_points: u16 } ``` Source line: `183`. ## mandate::Mandate [#mandatemandate] On-chain mandate record. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Mandate { pub mandate_id: MandateId, pub issuer_did: String, pub authorized_actor_did: String, pub scope: MandateScope, pub budget: MandateBudget, pub token_id: TokenId, pub spend_limits: SpendLimits, pub allowed_counterparties: AllowedCounterparties, pub milestone_policy: MilestonePolicy, pub approval_policy: ApprovalPolicy, pub dispute_policy: DisputePolicy, pub revocation_policy: RevocationPolicy, pub reputation_impact: ReputationImpactPolicy, pub revenue_share: Option, pub delegation_policy: DelegationPolicy, /// Optional inclusive expiration epoch. None means "no expiration" /// (still subject to revocation). pub expires_at_epoch: Option, /// Per-mandate spend nonce, monotonically increasing. pub nonce: u64, pub status: MandateStatus } ``` Source line: `193`. ## mandate::SpendRequest [#mandatespendrequest] Detail describing a proposed spend, validated against a mandate. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct SpendRequest<'a> { /// DID of the actor attempting the spend. pub actor_did: &'a str, /// DID of the counterparty receiving funds. pub counterparty_did: &'a str, /// Counterparty class (used when allowed_counterparties is `Classes`). pub counterparty_class: CounterpartyClass, /// Token requested. pub token_id: &'a str, /// Amount requested. pub amount: u128, /// Job category for this spend. pub job_category: &'a str, /// Current chain epoch. pub current_epoch: u64 } ``` Source line: `219`. ## mandate::MandateClearance [#mandatemandateclearance] Successful authorization output. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct MandateClearance { pub mandate_id: MandateId, pub authorized_amount: u128, pub remaining_after: u128 } ``` Source line: `238`. ## mandate::MandateError [#mandatemandateerror] Errors returned by mandate authorization. ```rust #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum MandateError { #[error("mandate is not active")] NotActive, #[error("mandate has expired")] Expired, #[error("actor does not match authorized actor")] UnauthorizedActor, #[error("token does not match mandate token")] TokenMismatch, #[error("amount exceeds per-transaction limit")] PerTxLimitExceeded, #[error("amount exceeds remaining budget")] BudgetExhausted, #[error("counterparty not allowed by mandate")] CounterpartyNotAllowed, #[error("job category not in mandate scope")] CategoryOutOfScope, #[error("mandate scope forbids this action")] ActionOutOfScope, #[error("subdelegation not permitted")] SubdelegationNotPermitted, #[error("subdelegation exceeds permitted fraction")] SubdelegationExceedsCap, #[error("revenue shares must total 10000 basis points")] RevenueShareInvalid, } ``` Source line: `246`. ## mandate::Mandate::authorize\_spend [#mandatemandateauthorize_spend] Validate a proposed spend against this mandate. Does **not** mutate the mandate; on success the caller must record the spend with `RecordMandateSpend`. ```rust pub fn authorize_spend( &self, req: &SpendRequest<'_>, ) -> Result; ``` Source line: `277`. ## mandate::Mandate::authorize\_subdelegation [#mandatemandateauthorize_subdelegation] Validate a proposed sub-mandate against this parent mandate. Sub-mandates must (a) be permitted by `delegation_policy`, (b) not exceed the parent's remaining budget, scope, expiration, or token, and (c) not exceed the configured fraction cap. ```rust pub fn authorize_subdelegation(&self, child: &Mandate) -> Result<(), MandateError>; ``` Source line: `335`. # sigil-core · nft URL: https://docs.sigil.ml/reference/rust/sigil-core/nft Markdown: https://docs.sigil.ml/reference/rust/sigil-core/nft.md Source declarations, signatures and documentation for nft. Source: `sigil/node/sigil-core/src/nft.rs`. SHA-256: `17518c87483b5d66243b1434a30c2a1111385c4cd037df9e3924c8981c3328d9`. 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. ## nft::CollectionId [#nftcollectionid] A unique identifier for an NFT collection. Must be a non-empty string. Use \[`CollectionId::try_new`] for validated construction; \[`CollectionId::new`] is a direct (unchecked) constructor intended for trusted callers (e.g., deserialization or tests). ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct CollectionId(pub String); ``` Source line: `24`. ## nft::CollectionId::new [#nftcollectionidnew] Construct directly without validation. Prefer \[`try_new`] in application code. ```rust pub fn new(s: impl Into) -> Self; ``` Source line: `29`. ## nft::CollectionId::try\_new [#nftcollectionidtry_new] Construct with validation — returns an error when `s` is empty. ```rust pub fn try_new(s: impl Into) -> Result; ``` Source line: `34`. ## nft::CollectionId::as\_str [#nftcollectionidas_str] Borrow the underlying string slice. ```rust pub fn as_str(&self) -> &str; ``` Source line: `45`. ## nft::TokenId [#nfttokenid] A token identifier within a collection (sequential or arbitrary u128). ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct TokenId(pub u128); ``` Source line: `52`. ## nft::NftKind [#nftnftkind] Whether a collection holds standard transferable NFTs or identity-bound (soulbound) tokens. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NftKind { /// Standard ERC-721-style NFT — transferable unless locked by policy. Standard, /// Identity-bound NFT — non-transferable token representing a DID /// credential or on-chain identity claim. Identity, } ``` Source line: `62`. ## nft::IdentityNftKind [#nftidentitynftkind] Sub-kind of an identity NFT, indicating which OAS entity kind is bound. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum IdentityNftKind { /// Human root identity (HMR). Human, /// Machine / model root identity (MHR). Mhr, /// Enterprise / entity root identity (ENR). Enr, /// Autonomous agent identity. Agent, /// Autonomous organization identity. Ao, /// Application identity. App, } ``` Source line: `73`. ## nft::BurnAuth [#nftburnauth] Who is authorised to burn this token (ERC-5484). ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum BurnAuth { /// Only the original issuer may burn the token. IssuerOnly, /// Only the current owner may burn the token. OwnerOnly, /// Either the issuer or the current owner may burn the token. Both, /// The token is non-burnable. Neither, } ``` Source line: `91`. ## nft::LockState [#nftlockstate] Whether a token is locked (non-transferable) per ERC-5192. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum LockState { /// Token is locked and may not be transferred. Locked, /// Token is unlocked and may be transferred (subject to collection /// transfer policy). Unlocked, } ``` Source line: `105`. ## nft::CollectionPolicy [#nftcollectionpolicy] Per-collection mint, transfer, and metadata governance settings. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CollectionPolicy { /// When `true`, newly minted tokens start in the `Locked` state (ERC-5192). pub default_locked: bool, /// Default burn authorization applied to each newly minted token. pub default_burn_auth: BurnAuth, /// When `true`, the controller may update per-token metadata URIs and /// hashes after mint (ERC-4906 inspired). pub allow_metadata_updates: bool, /// Optional policy governing who may mint tokens in this collection. /// `None` means only the issuer DID can mint. #[serde(default, skip_serializing_if = "Option::is_none")] pub mint_policy: Option, /// Optional policy governing who may initiate transfers. /// `None` means the owner controls transfers (subject to `default_locked`). #[serde(default, skip_serializing_if = "Option::is_none")] pub transfer_policy: Option, /// Maximum number of tokens that may ever be minted in this collection. /// `None` means unlimited supply. /// /// Serialized as a quoted decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde( with = "serde_helpers::string_u128_option", default, skip_serializing_if = "Option::is_none" )] pub max_supply: Option } ``` Source line: `119`. ## nft::NftCollection [#nftnftcollection] On-chain record for an NFT collection. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NftCollection { /// Unique collection identifier. pub collection_id: CollectionId, /// Human-readable collection name. pub name: String, /// Short ticker symbol (e.g. "BADGE"). pub symbol: String, /// Whether this collection is for transferable NFTs or identity tokens. pub kind: NftKind, /// DID of the party that created and issued the collection. pub issuer_did: String, /// DID of the party that can update the collection policy. pub controller_did: String, /// Governance rules for this collection. pub policy: CollectionPolicy, /// Optional collection-level metadata URI (analogous to ERC-721 /// `contractURI`). #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// Block height at which this collection was created. pub created_height: u64, /// Cumulative count of tokens minted (never decremented on burn). pub total_minted: u128, /// Cumulative count of tokens burned. pub total_burned: u128 } ``` Source line: `154`. ## nft::IdentityBinding [#nftidentitybinding] Binds an NFT token to an on-chain OAS identity. Populated on identity-collection tokens; `None` for standard NFTs. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IdentityBinding { /// DID of the identity subject this token is bound to. pub subject_did: String, /// DID of the root anchor (HMR / MHR / ENR) that vouches for this /// subject. pub root_did: String, /// Kind of the root anchor. pub root_kind: RootKind, /// Specific identity sub-type for this token. pub identity_kind: IdentityNftKind, /// Numeric verification level (0 = unverified, 255 = fully verified). pub verification_level: u8, /// Optional pointer to an external reputation or attestation anchor. #[serde(default, skip_serializing_if = "Option::is_none")] pub reputation_anchor: Option } ``` Source line: `189`. ## nft::NftToken [#nftnfttoken] On-chain record for a single NFT token. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NftToken { /// Collection this token belongs to. pub collection_id: CollectionId, /// Token identifier (unique within the collection). pub token_id: TokenId, /// DID of the current owner. pub owner_did: String, /// Optional per-token metadata URI. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// Optional BLAKE3 hash of the canonical metadata document, for /// on-chain integrity verification. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option, /// Whether this token is currently locked (ERC-5192). pub locked: bool, /// Burn authorisation for this token (ERC-5484). pub burn_auth: BurnAuth, /// Identity binding for tokens in identity collections. #[serde(default, skip_serializing_if = "Option::is_none")] pub identity: Option, /// Block height at which this token was minted. pub minted_height: u64, /// Block height of the most recent metadata update (equals /// `minted_height` if metadata has never been updated). pub last_metadata_update_height: u64 } ``` Source line: `212`. ## nft::OwnerIndexEntry [#nftownerindexentry] Secondary index mapping a (collection, owner) pair to all token IDs owned by that DID in that collection. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct OwnerIndexEntry { /// The collection being indexed. pub collection_id: CollectionId, /// The owner DID. pub owner_did: String, /// All token IDs currently held by this owner in this collection. pub token_ids: Vec } ``` Source line: `247`. ## nft::DidIdentityIndex [#nftdididentityindex] Secondary index mapping a subject DID to all identity tokens bound to it. Used for fast "which identity NFTs does this DID hold?" lookups. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DidIdentityIndex { /// The subject DID being indexed. pub subject_did: String, /// All `(collection_id, token_id)` pairs of identity tokens bound to /// this DID. pub identity_tokens: Vec<(CollectionId, TokenId)> } ``` Source line: `260`. ## nft::NftEventKind [#nftnfteventkind] Kind of NFT lifecycle event emitted in the transaction receipt. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NftEventKind { /// A new token was minted. Mint, /// Token ownership was transferred. Transfer, /// Token was burned. Burn, /// Token metadata URI or hash was updated (ERC-4906). MetadataUpdate, /// Token was locked (ERC-5192). Locked, /// Token was unlocked (ERC-5192). Unlocked, /// Identity binding verification level was raised. IdentityVerified, } ``` Source line: `275`. ## nft::NftEvent [#nftnftevent] An NFT lifecycle event recorded in the transaction receipt. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NftEvent { /// The kind of state change that occurred. pub kind: NftEventKind, /// The collection in which the event occurred. pub collection_id: CollectionId, /// The token involved, or `None` for collection-level events. #[serde(default, skip_serializing_if = "Option::is_none")] pub token_id: Option, /// Previous owner or minting authority (present on Transfer and Burn). #[serde(default, skip_serializing_if = "Option::is_none")] pub from_did: Option, /// New owner or recipient (present on Mint and Transfer). #[serde(default, skip_serializing_if = "Option::is_none")] pub to_did: Option, /// Updated metadata URI (present on MetadataUpdate and Mint when /// metadata_uri is supplied). #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// Updated metadata hash (present on MetadataUpdate and Mint when /// metadata_hash is supplied). #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option, /// Block height at which this event was emitted. pub block_height: u64, /// Hash of the transaction that produced this event. pub tx_hash: SigilHash } ``` Source line: `294`. # sigil-core · nova URL: https://docs.sigil.ml/reference/rust/sigil-core/nova Markdown: https://docs.sigil.ml/reference/rust/sigil-core/nova.md Source declarations, signatures and documentation for nova. Source: `sigil/node/sigil-core/src/nova.rs`. SHA-256: `20cd0162dec9a2617713ca7b792bb54f68e506fa5ea7e12998e850c0a6861e6e`. 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. ## nova::NOVA\_WORLD\_PREFIX [#novanova_world_prefix] ```rust pub const NOVA_WORLD_PREFIX: &str; ``` Source line: `8`. ## nova::NOVA\_PARCEL\_PREFIX [#novanova_parcel_prefix] ```rust pub const NOVA_PARCEL_PREFIX: &str; ``` Source line: `9`. ## nova::NOVA\_BUILDING\_PREFIX [#novanova_building_prefix] ```rust pub const NOVA_BUILDING_PREFIX: &str; ``` Source line: `10`. ## nova::NOVA\_AVATAR\_PREFIX [#novanova_avatar_prefix] ```rust pub const NOVA_AVATAR_PREFIX: &str; ``` Source line: `11`. ## nova::NOVA\_AUCTION\_PREFIX [#novanova_auction_prefix] ```rust pub const NOVA_AUCTION_PREFIX: &str; ``` Source line: `12`. ## nova::deterministic\_component\_id [#novadeterministic_component_id] ```rust pub fn deterministic_component_id(prefix: &str, domain: &str, parts: &[String]) -> String; ``` Source line: `66`. ## nova::canonical\_json\_string [#novacanonical_json_string] ```rust pub fn canonical_json_string(value: &serde_json::Value) -> String; ``` Source line: `70`. ## nova::deterministic\_world\_id [#novadeterministic_world_id] ```rust pub fn deterministic_world_id(creator_did: &str, name: &str, config: &serde_json::Value) -> String; ``` Source line: `76`. ## nova::deterministic\_parcel\_id [#novadeterministic_parcel_id] ```rust pub fn deterministic_parcel_id( world_id: &str, region_x: i32, region_z: i32, local_x: u16, local_z: u16, ) -> String; ``` Source line: `88`. ## nova::deterministic\_building\_id [#novadeterministic_building_id] ```rust pub fn deterministic_building_id( world_id: &str, parcel_id: &str, owner_did: &str, asset_did: &str, ) -> String; ``` Source line: `108`. ## nova::deterministic\_avatar\_id [#novadeterministic_avatar_id] ```rust pub fn deterministic_avatar_id(world_id: &str, owner_did: &str) -> String; ``` Source line: `126`. ## nova::deterministic\_auction\_id [#novadeterministic_auction_id] ```rust pub fn deterministic_auction_id( world_id: &str, parcel_id: &str, seller_did: &str, opened_at_height: u64, ) -> String; ``` Source line: `134`. ## nova::NovaWorldConfig [#novanovaworldconfig] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NovaWorldConfig { pub world_id: String, pub name: String, pub gravity: f64, pub time_scale: f64, pub max_height: u32, pub region_size: u16, pub chunk_size: u16, #[serde(default, skip_serializing_if = "Option::is_none")] pub terrain_seed_commitment: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub generation_profile: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option } ``` Source line: `153`. ## nova::NovaParams [#novanovaparams] ```rust #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] pub struct NovaParams { pub enabled: bool, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub worlds: Vec } ``` Source line: `187`. ## nova::NovaParcelType [#novanovaparceltype] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NovaParcelType { Residential, Commercial, Public, Wilderness, Reserved, } ``` Source line: `195`. ## nova::NovaParcelType::parse [#novanovaparceltypeparse] ```rust pub fn parse(value: &str) -> Option; ``` Source line: `204`. ## nova::NovaParcelCoord [#novanovaparcelcoord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaParcelCoord { pub world_id: String, pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16 } ``` Source line: `217`. ## nova::NovaParcelCoord::parcel\_id [#novanovaparcelcoordparcel_id] ```rust pub fn parcel_id(&self) -> String; ``` Source line: `226`. ## nova::NovaParcelRecord [#novanovaparcelrecord] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NovaParcelRecord { pub parcel_id: String, pub world_id: String, pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16, pub owner_did: String, pub parcel_type: NovaParcelType, #[serde(default)] pub metadata: serde_json::Value, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub buildings: Vec, pub acquired_at_height: u64 } ``` Source line: `238`. ## nova::NovaBuildingRecord [#novanovabuildingrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaBuildingRecord { pub building_id: String, pub world_id: String, pub parcel_id: String, pub owner_did: String, pub asset_did: String, pub polycount: u32, pub placed_at_height: u64 } ``` Source line: `255`. ## nova::NovaAvatarRecord [#novanovaavatarrecord] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NovaAvatarRecord { pub avatar_id: String, pub world_id: String, pub owner_did: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub avatar_asset_did: Option, pub position: [f64; 3], pub rotation: [f32; 3], pub animation_state: String, pub presence: String, pub last_updated_height: u64 } ``` Source line: `266`. ## nova::NovaAuctionStatus [#novanovaauctionstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NovaAuctionStatus { Open, Settled, Cancelled, } ``` Source line: `281`. ## nova::NovaBidRecord [#novanovabidrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaBidRecord { pub bidder_did: String, pub amount: u64, pub height: u64 } ``` Source line: `288`. ## nova::NovaAuctionRecord [#novanovaauctionrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaAuctionRecord { pub auction_id: String, pub world_id: String, pub parcel_id: String, pub seller_did: String, pub reserve_amount: u64, pub highest_bid: Option, pub opened_at_height: u64, pub closes_at_height: u64, pub status: NovaAuctionStatus } ``` Source line: `295`. ## nova::validate\_world\_config [#novavalidate_world_config] ```rust pub fn validate_world_config(world: &NovaWorldConfig) -> Result<(), String>; ``` Source line: `307`. ## nova::validate\_nova\_params [#novavalidate_nova_params] ```rust pub fn validate_nova_params(params: &NovaParams) -> Result<(), String>; ``` Source line: `329`. ## nova::position\_is\_finite [#novaposition_is_finite] ```rust pub fn position_is_finite(position: &[f64; 3]) -> bool; ``` Source line: `340`. ## nova::rotation\_is\_finite [#novarotation_is_finite] ```rust pub fn rotation_is_finite(rotation: &[f32; 3]) -> bool; ``` Source line: `344`. # sigil-core · receipt URL: https://docs.sigil.ml/reference/rust/sigil-core/receipt Markdown: https://docs.sigil.ml/reference/rust/sigil-core/receipt.md Source declarations, signatures and documentation for receipt. Source: `sigil/node/sigil-core/src/receipt.rs`. SHA-256: `ae8c23981b44294abbb3a19b8e57d786e2a42547d7b74382b028013b8809ab84`. 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. ## receipt::Receipt [#receiptreceipt] A transaction receipt recording execution outcome. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Receipt { /// Hash of the transaction that produced this receipt. pub tx_hash: SigilHash, /// Execution status. pub status: ReceiptStatus, /// Gas consumed during execution. pub gas_used: u64, /// Block height at which this transaction was included. pub block_height: u64, /// Index of this transaction within the block. pub tx_index: u32, /// Events emitted during execution. pub events: Vec, /// State changes applied by this transaction. pub state_changes: Vec, /// Cumulative gas used in the block up to and including this transaction. pub cumulative_gas_used: u64 } ``` Source line: `12`. ## receipt::ReceiptStatus [#receiptreceiptstatus] Execution status of a transaction. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ReceiptStatus { /// Transaction executed successfully. Success, /// Transaction failed (state changes reverted, gas still consumed). Failed, /// Transaction reverted explicitly (e.g., from WASM trap or assertion). Reverted, } ``` Source line: `34`. ## receipt::ReceiptStatus::is\_success [#receiptreceiptstatusis_success] Returns true if the transaction succeeded. ```rust pub fn is_success(&self) -> bool; ``` Source line: `45`. ## receipt::Event [#receiptevent] An event emitted during transaction execution. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Event { /// The source of the event (e.g., module DID or system component). pub source: String, /// Event topic/type (e.g., "identity.registered", "stake.deposited"). pub topic: String, /// Indexed fields for efficient filtering. pub indexed: Vec, /// Non-indexed data payload. pub data: Vec } ``` Source line: `52`. ## receipt::EventField [#receipteventfield] An indexed event field for log filtering. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct EventField { /// Field name. pub name: String, /// Field value as bytes (application-defined encoding). pub value: Vec } ``` Source line: `65`. ## receipt::StateChange [#receiptstatechange] A state change applied by a transaction. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct StateChange { /// Which state partition was affected. pub partition: StatePartition, /// The key that was modified. pub key: Vec, /// Previous value (None if the key was created). #[serde(skip_serializing_if = "Option::is_none")] pub old_value: Option>, /// New value (None if the key was deleted). #[serde(skip_serializing_if = "Option::is_none")] pub new_value: Option> } ``` Source line: `74`. ## receipt::StatePartition [#receiptstatepartition] State partitions in the Sigil blockchain. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum StatePartition { /// Global consensus state (validator set, epoch data). Consensus, /// Staking and delegation records. Stakes, /// OAS identity documents and lineage data. Identity, /// MARS registry entries and anchors. Mars, /// Governance proposals and votes. Governance, /// Organization zone state. Organization, /// Compute provider registry and escrow. Compute, /// Agent Contract Zones — contract records, per-contract keyed /// state, code-blob index, and contract events. Contracts, /// Native NFT state — collections, tokens, owner index, DID identity /// index, and NFT event log. Nft, /// On-chain labor marketplace state — jobs, bids, contracts, open offers, /// claims, per-milestone state, worker assignment index, and audit event log. Labor, /// Sigil Mail and Sigil Name System state — mailbox capability records, /// aliases, receive policies, public keys, delivery commitments, scoped /// delegations, abuse reports, `.sigil` resolver records, and mail-safe /// name indexes. Mail, /// L1-coordinated training runs, rollout commitments, reward attestations, /// slashing evidence, and model weight roots. Crucible, /// Vigils subscriptions, ingestors, deliveries, and callback queue. Vigils, /// Storage pinning marketplace provider records, pin requests, contracts, /// receipts, challenges, and slashing/reward outcomes. Storage, /// Native DEX pools, LP positions, asset balances, and swap events. Dex, /// Nova metaverse worlds, parcels, buildings, avatars, and auctions. Nova, /// Evidence anchor records (content-addressed digest commitments). Evidence, } ``` Source line: `90`. # sigil-core · recovery URL: https://docs.sigil.ml/reference/rust/sigil-core/recovery Markdown: https://docs.sigil.ml/reference/rust/sigil-core/recovery.md Source declarations, signatures and documentation for recovery. Source: `sigil/node/sigil-core/src/recovery.rs`. SHA-256: `59158fff11c66cbc0e1c0e9cb897a9ef017cf7037d8ebcb61a0eec09e681a980`. 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. ## recovery::BLOCKS\_PER\_DAY [#recoveryblocks_per_day] Approximate blocks per day at 4-second block time. ```rust pub const BLOCKS_PER_DAY: u64; ``` Source line: `37`. ## recovery::MIN\_RECOVERY\_TIMELOCK\_BLOCKS [#recoverymin_recovery_timelock_blocks] Minimum recovery timelock (7 days). User-tunable down to this floor. ```rust pub const MIN_RECOVERY_TIMELOCK_BLOCKS: u64; ``` Source line: `40`. ## recovery::MAX\_RECOVERY\_TIMELOCK\_BLOCKS [#recoverymax_recovery_timelock_blocks] Maximum recovery timelock (90 days). ```rust pub const MAX_RECOVERY_TIMELOCK_BLOCKS: u64; ``` Source line: `43`. ## recovery::DEFAULT\_RECOVERY\_TIMELOCK\_BLOCKS [#recoverydefault_recovery_timelock_blocks] Default recovery timelock (30 days). Recommended baseline; deviates from the agent-06 brief (7 days) per pushback C7. ```rust pub const DEFAULT_RECOVERY_TIMELOCK_BLOCKS: u64; ``` Source line: `47`. ## recovery::MAX\_RECOVERY\_GUARDIANS [#recoverymax_recovery_guardians] Hard cap on guardian count per recovery group. ```rust pub const MAX_RECOVERY_GUARDIANS: usize; ``` Source line: `50`. ## recovery::MIN\_RECOVERY\_GUARDIANS [#recoverymin_recovery_guardians] Minimum guardian count. ```rust pub const MIN_RECOVERY_GUARDIANS: usize; ``` Source line: `52`. ## recovery::RECOVERY\_DOMAIN\_TAG [#recoveryrecovery_domain_tag] Domain separator for canonical recovery-authorization signatures. ```rust pub const RECOVERY_DOMAIN_TAG: &[u8]; ``` Source line: `55`. ## recovery::RecoveryGuardian [#recoveryrecoveryguardian] One member of a recovery group. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RecoveryGuardian { pub guardian_did: String, /// 32-byte Ed25519 public key, hex-encoded (no `0x` prefix). pub guardian_pubkey_hex: String, /// Vote weight. Default 1; weighted thresholds support tiered guardians /// (e.g. 1 spouse weight 2 + 3 friends weight 1, threshold 3). pub weight: u32 } ``` Source line: `63`. ## recovery::RecoveryConfig [#recoveryrecoveryconfig] Per-DID recovery configuration. Single registration per subject DID; re-registration replaces the prior config. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RecoveryConfig { pub subject_did: String, pub guardians: Vec, /// Total weight required to authorize a recovery. Must be ≥ 1 and /// ≤ sum(guardians.weight). Recommended floor: ⌈sum × 0.6⌉. pub threshold: u32, /// Number of blocks the timelock holds open after `InitiateRecovery`. pub timelock_blocks: u64, /// 32-byte Ed25519 public key (hex) of the panic-abort key. The user /// holds the corresponding private key offline. pub panic_pubkey_hex: String, pub registered_at_height: u64 } ``` Source line: `75`. ## recovery::RecoveryStatus [#recoveryrecoverystatus] Status of a `RecoveryCeremony`. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum RecoveryStatus { /// Initiated; collecting guardian authorizations and waiting for timelock. Pending, /// Threshold met AND timelock elapsed; ready to finalize. Ready, /// Pubkey has been rotated; ceremony archived. Finalized, /// Aborted by the panic key, the original owner, or by guardian /// revocation. No further state changes. Aborted { reason: AbortReason }, } ``` Source line: `91`. ## recovery::AbortReason [#recoveryabortreason] Why a ceremony was aborted. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum AbortReason { PanicKey, OriginalOwner, GuardianRevocation, } ``` Source line: `105`. ## recovery::GuardianAuthorization [#recoveryguardianauthorization] One signed authorization from a guardian. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GuardianAuthorization { pub guardian_did: String, pub guardian_pubkey_hex: String, /// 64-byte Ed25519 signature over the canonical payload (hex). pub signature_hex: String, pub recorded_at_height: u64 } ``` Source line: `113`. ## recovery::RecoveryCeremony [#recoveryrecoveryceremony] An open recovery ceremony. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RecoveryCeremony { pub ceremony_id: String, pub subject_did: String, pub initiated_at_height: u64, /// Earliest block at which `FinalizeRecovery` may succeed. pub finalize_after_height: u64, /// 32-byte Ed25519 public key (hex) that will replace the subject's /// current pubkey on finalize. pub new_pubkey_hex: String, pub authorizations: Vec, pub status: RecoveryStatus } ``` Source line: `123`. ## recovery::RecoveryCeremony::accumulated\_weight [#recoveryrecoveryceremonyaccumulated_weight] Total accumulated guardian weight from `authorizations`, looking up each guardian in `config.guardians`. Authorizations whose `guardian_did` is not in the config contribute 0. ```rust pub fn accumulated_weight(&self, config: &RecoveryConfig) -> u32; ``` Source line: `140`. ## recovery::RecoveryCeremony::threshold\_met [#recoveryrecoveryceremonythreshold_met] True if the threshold weight has been accumulated. ```rust pub fn threshold_met(&self, config: &RecoveryConfig) -> bool; ``` Source line: `154`. ## recovery::RecoveryCeremony::timelock\_expired\_at [#recoveryrecoveryceremonytimelock_expired_at] True if the timelock has elapsed at the given block height. ```rust pub fn timelock_expired_at(&self, current_height: u64) -> bool; ``` Source line: `159`. ## recovery::RecoveryCeremony::finalizable\_at [#recoveryrecoveryceremonyfinalizable_at] True if the ceremony is finalizable at `current_height`: status is still `Pending`, threshold met, and timelock elapsed. ```rust pub fn finalizable_at(&self, current_height: u64, config: &RecoveryConfig) -> bool; ``` Source line: `165`. ## recovery::RegisterRecoveryData [#recoveryregisterrecoverydata] Register or replace a recovery group for `subject_did` (the sender). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RegisterRecoveryData { pub subject_did: String, pub guardians: Vec, pub threshold: u32, pub timelock_blocks: u64, pub panic_pubkey_hex: String } ``` Source line: `178`. ## recovery::InitiateRecoveryData [#recoveryinitiaterecoverydata] Initiate a new recovery ceremony for `subject_did`. The sender (gas payer) need NOT be the subject — typically the subject has lost their key and uses a fresh device. The new public key must be generated client-side and supplied here. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct InitiateRecoveryData { pub subject_did: String, pub new_pubkey_hex: String } ``` Source line: `192`. ## recovery::AddRecoveryAuthorizationData [#recoveryaddrecoveryauthorizationdata] Add one guardian's authorization to an open ceremony. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AddRecoveryAuthorizationData { pub ceremony_id: String, pub guardian_did: String, pub guardian_pubkey_hex: String, /// 64-byte Ed25519 signature over `recovery_signing_bytes(ceremony_id, /// subject_did, new_pubkey_hex)`. Hex-encoded. pub signature_hex: String } ``` Source line: `199`. ## recovery::AbortRecoveryData [#recoveryabortrecoverydata] Abort an open ceremony. The signature must come from EITHER the panic key or the subject's current (pre-rotation) pubkey. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AbortRecoveryData { pub ceremony_id: String, /// The Ed25519 public key that signed the abort. The executor checks /// this matches either the registered panic key or the subject's /// current pubkey. pub aborter_pubkey_hex: String, pub signature_hex: String } ``` Source line: `211`. ## recovery::FinalizeRecoveryData [#recoveryfinalizerecoverydata] Finalize a Ready ceremony — rotates the subject's on-chain pubkey. Permissionless: any DID can pay gas to finalize. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct FinalizeRecoveryData { pub ceremony_id: String } ``` Source line: `224`. ## recovery::recovery\_signing\_bytes [#recoveryrecovery_signing_bytes] Build the canonical payload that guardians sign for an authorization. Format: `RECOVERY_DOMAIN_TAG || ceremony_id || '|' || subject_did || '|' || new_pubkey_hex` The 32-byte BLAKE3 of this payload is what the Ed25519 key actually signs. Including the new\_pubkey\_hex prevents an authorized signature from being replayed against a different new\_pubkey. ```rust pub fn recovery_signing_bytes( ceremony_id: &str, subject_did: &str, new_pubkey_hex: &str, ) -> Vec; ``` Source line: `240`. ## recovery::abort\_signing\_bytes [#recoveryabort_signing_bytes] Build the abort signing payload. Aborters sign over a different canonical message than guardians so an authorization can never be replayed as an abort or vice-versa. ```rust pub fn abort_signing_bytes(ceremony_id: &str) -> Vec; ``` Source line: `265`. ## recovery::compute\_ceremony\_id [#recoverycompute_ceremony_id] Compute the deterministic ceremony\_id for `(subject_did, initiated_at_height)`. Returns a 32-character hex string (16 bytes of BLAKE3 output). Two ceremonies for the same subject MUST land at different block heights; the per-block tx ordering enforces this in practice. ```rust pub fn compute_ceremony_id(subject_did: &str, initiated_at_height: u64) -> String; ``` Source line: `280`. ## recovery::validate\_recovery\_config [#recoveryvalidate_recovery_config] Validate a `RecoveryConfig`'s structural invariants before commit. Used both at `RegisterRecovery` time and as a defensive check before any state mutation. Returns `Ok(())` if valid; otherwise `Err`. ```rust pub fn validate_recovery_config(config: &RecoveryConfig) -> Result<(), CoreError>; ``` Source line: `296`. # sigil-core · serde_helpers URL: https://docs.sigil.ml/reference/rust/sigil-core/serde_helpers Markdown: https://docs.sigil.ml/reference/rust/sigil-core/serde_helpers.md Source declarations, signatures and documentation for serde_helpers. Source: `sigil/node/sigil-core/src/serde_helpers.rs`. SHA-256: `fc6ba0f5c3d82c53c6bcfac185b52fafe9285532e30b7bb7da9165e57f4f237e`. 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. ## serde\_helpers::string\_u128 [#serde_helpersstring_u128] Serde helpers for types that require special JSON wire encoding. ## `string_u128` [#string_u128] JavaScript's `Number` type is an IEEE-754 double, which can only represent integers exactly up to 2^53 − 1. A `u128` field serialized as a bare JSON number therefore loses precision for any value ≥ 2^53. Furthermore, `serde_json` (without the `arbitrary_precision` feature) does not support bare `u128` values at all — callers receive a hard error. The `string_u128` module solves both problems by encoding `u128` as a decimal string on the wire (e.g. `"340282366920938463463374607431768211455"`). Deserialization accepts the canonical string form **or** a bare JSON number (for backward compatibility with Rust callers that serialize natively). ## `string_u128_option` [#string_u128_option] The same encoding for `Option` fields. `Some(n)` serializes as a quoted decimal string; `None` serializes as JSON `null`. Deserialization accepts the canonical string form, a bare JSON number, or `null` / missing field (treated as `None`). ### Usage [#usage] ```rust use serde::{Deserialize, Serialize}; use sigil_core::serde_helpers; #[derive(Serialize, Deserialize)] struct Foo { #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, #[serde( with = "serde_helpers::string_u128_option", default, skip_serializing_if = "Option::is_none" )] pub max_supply: Option, } ``` Serialize a `u128` as a decimal string; deserialize from a decimal string **or** a bare JSON number (u64 / u128 fallback for Rust callers). ```rust pub mod string_u128; ``` Source line: `45`. ## serde\_helpers::string\_u128::serialize [#serde_helpersstring_u128serialize] Serialize `value` as a quoted decimal string. ```rust pub fn serialize(value: &u128, s: S) -> Result; ``` Source line: `49`. ## serde\_helpers::string\_u128::deserialize [#serde_helpersstring_u128deserialize] Deserialize a `u128` from a quoted decimal string or a bare JSON number. ```rust pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result; ``` Source line: `54`. ## serde\_helpers::string\_u128\_option [#serde_helpersstring_u128_option] Serialize an `Option` as a quoted decimal string (`Some`) or JSON `null` (`None`); deserialize from a quoted decimal string, a bare JSON number, or `null` / missing field. Use together with `#[serde(default, skip_serializing_if = "Option::is_none")]` so that absent fields round-trip correctly. ```rust pub mod string_u128_option; ``` Source line: `94`. ## serde\_helpers::string\_u128\_option::serialize [#serde_helpersstring_u128_optionserialize] Serialize `Some(n)` as a quoted decimal string; `None` as JSON `null`. ```rust pub fn serialize(value: &Option, s: S) -> Result; ``` Source line: `98`. ## serde\_helpers::string\_u128\_option::deserialize [#serde_helpersstring_u128_optiondeserialize] Deserialize an `Option` from a quoted decimal string, a bare JSON number, or JSON `null` / a missing field. ```rust pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result, D::Error>; ``` Source line: `107`. # sigil-core · sns URL: https://docs.sigil.ml/reference/rust/sigil-core/sns Markdown: https://docs.sigil.ml/reference/rust/sigil-core/sns.md Source declarations, signatures and documentation for sns. Source: `sigil/node/sigil-core/src/sns.rs`. SHA-256: `27792c4c3d4f633ff4e07ce7482cab6f432fda7b657499c8bfe51a7dcf959f2f`. 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. ## sns::SNS\_NAMEHASH\_DOMAIN [#snssns_namehash_domain] ```rust pub const SNS_NAMEHASH_DOMAIN: &str; ``` Source line: `7`. ## sns::SNS\_TX\_DOMAIN [#snssns_tx_domain] ```rust pub const SNS_TX_DOMAIN: &str; ``` Source line: `8`. ## sns::SNS\_EVENT\_DOMAIN [#snssns_event_domain] ```rust pub const SNS_EVENT_DOMAIN: &str; ``` Source line: `9`. ## sns::SNS\_REGISTRATION\_COMMITMENT\_DOMAIN [#snssns_registration_commitment_domain] ```rust pub const SNS_REGISTRATION_COMMITMENT_DOMAIN: &str; ``` Source line: `10`. ## sns::SNS\_SEALED\_BID\_COMMITMENT\_DOMAIN [#snssns_sealed_bid_commitment_domain] ```rust pub const SNS_SEALED_BID_COMMITMENT_DOMAIN: &str; ``` Source line: `11`. ## sns::SNS\_AUCTION\_ID\_DOMAIN [#snssns_auction_id_domain] ```rust pub const SNS_AUCTION_ID_DOMAIN: &str; ``` Source line: `12`. ## sns::SNS\_REGISTRATION\_PRICE\_PER\_YEAR [#snssns_registration_price_per_year] ```rust pub const SNS_REGISTRATION_PRICE_PER_YEAR: u128; ``` Source line: `13`. ## sns::normalize\_sigil\_name [#snsnormalize_sigil_name] ```rust pub fn normalize_sigil_name(input: &str) -> Result; ``` Source line: `56`. ## sns::namehash [#snsnamehash] ```rust pub fn namehash(name: &str) -> Result; ``` Source line: `86`. ## sns::auction\_id [#snsauction_id] ```rust pub fn auction_id(name: &str) -> Result; ``` Source line: `91`. ## sns::name\_registration\_commitment [#snsname_registration_commitment] ```rust pub fn name_registration_commitment( chain_id: &str, name: &str, owner_did: &str, salt: &str, reveal_nonce: &str, ) -> Result; ``` Source line: `96`. ## sns::sealed\_name\_bid\_commitment [#snssealed_name_bid_commitment] ```rust pub fn sealed_name_bid_commitment( chain_id: &str, auction_id: &str, name: &str, bidder_did: &str, bid_amount: u128, salt: &str, ) -> Result; ``` Source line: `124`. ## sns::NameStatus [#snsnamestatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NameStatus { Active, ExpiredGrace, Reclaimable, Revoked, Disputed, } ``` Source line: `156`. ## sns::SnsNameRecord [#snssnsnamerecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnsNameRecord { pub name_hash: String, pub canonical_name: String, pub parent_hash: Option, pub label: String, pub owner_did: String, pub admin_did: Option, pub registered_at_height: u64, pub expires_at_height: Option, pub status: NameStatus, pub username_compat: Option, pub resolver_revision: u64, pub transfer_nonce: u64, pub is_reserved: bool, pub is_disputed: bool } ``` Source line: `165`. ## sns::NameRecordKind [#snsnamerecordkind] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NameRecordKind { WalletAddress, Did, PublicKey, Mailbox, MailService, WeaveMailboxRef, Website, WeaveDrive, ServiceEndpoint, Avatar, Text, SubdomainDelegation, } ``` Source line: `184`. ## sns::SnsResolverRecord [#snssnsresolverrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnsResolverRecord { pub name_hash: String, pub kind: NameRecordKind, pub value: String, pub ttl_hint_blocks: Option, pub revision: u64, pub controller_did: String } ``` Source line: `200`. ## sns::SnsResolverRecord::validate\_public\_shape [#snssnsresolverrecordvalidate_public_shape] ```rust pub fn validate_public_shape(&self) -> Result<(), CoreError>; ``` Source line: `210`. ## sns::NamePermissionScope [#snsnamepermissionscope] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum NamePermissionScope { ManageRecords, ManageMailRecords, ManageWebsiteRecords, DelegateSubdomains, RenewName, TransferName, } ``` Source line: `247`. ## sns::NameDelegation [#snsnamedelegation] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NameDelegation { pub grant_id: String, pub name_hash: String, pub delegate_did: String, pub scopes: Vec, pub valid_until_height: Option, pub revoked_at_height: Option, pub revision: u64 } ``` Source line: `257`. ## sns::RegisterNameData [#snsregisternamedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RegisterNameData { pub name: String, pub owner_did: String, pub years: u8, pub salt: String, pub reveal_nonce: String, pub client_nonce: String } ``` Source line: `268`. ## sns::RenewNameData [#snsrenewnamedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RenewNameData { pub name: String, pub years: u8, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `278`. ## sns::SetNameRecordsData [#snssetnamerecordsdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SetNameRecordsData { pub name: String, pub records: Vec, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `286`. ## sns::DeleteNameRecordsData [#snsdeletenamerecordsdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteNameRecordsData { pub name: String, pub kinds: Vec, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `294`. ## sns::DelegateSubdomainData [#snsdelegatesubdomaindata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegateSubdomainData { pub name: String, pub subdomain: String, pub delegate_did: String, pub scopes: Vec, pub valid_until_height: Option, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `302`. ## sns::RevokeDelegationData [#snsrevokedelegationdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokeDelegationData { pub name: String, pub grant_id: String, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `313`. ## sns::SetPrimaryNameData [#snssetprimarynamedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SetPrimaryNameData { pub subject_did: String, pub name: String, pub expected_revision: u64, pub client_nonce: String } ``` Source line: `321`. ## sns::SnsCommitmentStatus [#snssnscommitmentstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SnsCommitmentStatus { Committed, Revealed, Expired, Forfeited, } ``` Source line: `330`. ## sns::SnsNameRegistrationCommitment [#snssnsnameregistrationcommitment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnsNameRegistrationCommitment { pub commitment: String, pub bidder_did: String, pub deposit: u128, pub reveal_after_height: u64, pub expires_at_height: u64, pub committed_at_height: u64, pub status: SnsCommitmentStatus, pub revealed_name_hash: Option } ``` Source line: `338`. ## sns::SnsSealedBidStatus [#snssnssealedbidstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SnsSealedBidStatus { Committed, Revealed, Refunded, Settled, Forfeited, } ``` Source line: `351`. ## sns::SnsSealedBidCommitment [#snssnssealedbidcommitment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnsSealedBidCommitment { pub auction_id: String, pub commitment: String, pub bidder_did: String, pub deposit: u128, pub committed_at_height: u64, pub status: SnsSealedBidStatus, pub revealed_name_hash: Option, pub revealed_bid_amount: Option } ``` Source line: `360`. ## sns::SnsAuctionStatus [#snssnsauctionstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SnsAuctionStatus { Open, Finalized, } ``` Source line: `373`. ## sns::SnsAuctionRecord [#snssnsauctionrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnsAuctionRecord { pub auction_id: String, pub name_hash: String, pub canonical_name: String, pub highest_bid: Option, pub highest_bidder: Option, pub highest_commitment: Option, pub revealed_count: u64, pub finalized_at_height: Option, pub status: SnsAuctionStatus } ``` Source line: `379`. ## sns::CommitNameRegistrationData [#snscommitnameregistrationdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CommitNameRegistrationData { pub commitment: String, pub bidder_did: String, pub deposit: u128, pub reveal_after_height: u64, pub expires_at_height: u64, pub client_nonce: String } ``` Source line: `392`. ## sns::CommitSealedNameBidData [#snscommitsealednamebiddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CommitSealedNameBidData { pub auction_id: String, pub commitment: String, pub bidder_did: String, pub deposit: u128, pub client_nonce: String } ``` Source line: `402`. ## sns::RevealSealedNameBidData [#snsrevealsealednamebiddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevealSealedNameBidData { pub auction_id: String, pub name: String, pub bid_amount: u128, pub salt: String, pub bidder_did: String, pub client_nonce: String } ``` Source line: `411`. ## sns::FinalizeSealedNameAuctionData [#snsfinalizesealednameauctiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct FinalizeSealedNameAuctionData { pub auction_id: String, pub name: String, pub winner_did: String, pub expected_bid: u128, pub years: u8, pub client_nonce: String } ``` Source line: `421`. # sigil-core · storage_market URL: https://docs.sigil.ml/reference/rust/sigil-core/storage_market Markdown: https://docs.sigil.ml/reference/rust/sigil-core/storage_market.md Source declarations, signatures and documentation for storage_market. Source: `sigil/node/sigil-core/src/storage_market.rs`. SHA-256: `423eedc2098d3b9bda69c29223e375497766d4b7a0645e7732989979cb49d601`. 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. ## storage\_market::STORAGE\_PROVIDER\_ID\_DOMAIN [#storage_marketstorage_provider_id_domain] ```rust pub const STORAGE_PROVIDER_ID_DOMAIN: &[u8]; ``` Source line: `10`. ## storage\_market::STORAGE\_PIN\_REQUEST\_ID\_DOMAIN [#storage_marketstorage_pin_request_id_domain] ```rust pub const STORAGE_PIN_REQUEST_ID_DOMAIN: &[u8]; ``` Source line: `11`. ## storage\_market::STORAGE\_CONTRACT\_ID\_DOMAIN [#storage_marketstorage_contract_id_domain] ```rust pub const STORAGE_CONTRACT_ID_DOMAIN: &[u8]; ``` Source line: `12`. ## storage\_market::STORAGE\_RECEIPT\_HASH\_DOMAIN [#storage_marketstorage_receipt_hash_domain] ```rust pub const STORAGE_RECEIPT_HASH_DOMAIN: &[u8]; ``` Source line: `13`. ## storage\_market::STORAGE\_CHALLENGE\_ID\_DOMAIN [#storage_marketstorage_challenge_id_domain] ```rust pub const STORAGE_CHALLENGE_ID_DOMAIN: &[u8]; ``` Source line: `14`. ## storage\_market::STORAGE\_EVENT\_DOMAIN [#storage_marketstorage_event_domain] ```rust pub const STORAGE_EVENT_DOMAIN: &[u8]; ``` Source line: `15`. ## storage\_market::storage\_pin\_request\_id [#storage_marketstorage_pin_request_id] ```rust pub fn storage_pin_request_id( chain_id: &str, owner_did: &str, artifact: &ArtifactCommitment, duration_epochs: u64, replication_factor: u16, client_nonce: &str, ) -> Result; ``` Source line: `34`. ## storage\_market::storage\_contract\_id [#storage_marketstorage_contract_id] ```rust pub fn storage_contract_id( chain_id: &str, request_id: &str, provider_did: &str, ) -> Result; ``` Source line: `79`. ## storage\_market::storage\_challenge\_id [#storage_marketstorage_challenge_id] ```rust pub fn storage_challenge_id( chain_id: &str, contract_id: &str, opened_at_height: u64, client_nonce: &str, ) -> Result; ``` Source line: `101`. ## storage\_market::StorageProviderStatus [#storage_marketstorageproviderstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum StorageProviderStatus { Active, Suspended, Exiting, } ``` Source line: `127`. ## storage\_market::StoragePinStatus [#storage_marketstoragepinstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum StoragePinStatus { Open, Accepted, Pinned, Settled, Cancelled, Expired, Challenged, Slashed, } ``` Source line: `135`. ## storage\_market::StorageChallengeStatus [#storage_marketstoragechallengestatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum StorageChallengeStatus { Open, Proved, Failed, Dismissed, } ``` Source line: `148`. ## storage\_market::StorageProviderRecord [#storage_marketstorageproviderrecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageProviderRecord { pub provider_did: String, pub capacity_gib: u64, pub regions: Vec, pub price_per_gib_epoch: u64, pub retrieval_price_per_gib: u64, pub replication_guarantee: u16, pub stake: u64, pub provider_pubkey: Vec, pub status: StorageProviderStatus, pub registered_at_height: u64, pub updated_at_height: u64 } ``` Source line: `156`. ## storage\_market::StorageProviderRecord::validate [#storage_marketstorageproviderrecordvalidate] ```rust pub fn validate(&self) -> Result<(), CoreError>; ``` Source line: `171`. ## storage\_market::StoragePinRequest [#storage_marketstoragepinrequest] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StoragePinRequest { pub request_id: String, pub owner_did: String, pub artifact: ArtifactCommitment, pub duration_epochs: u64, pub replication_factor: u16, pub max_price_per_gib_epoch: u64, pub escrowed_amount: u64, pub accepted_contracts: Vec, pub status: StoragePinStatus, pub created_at_height: u64, pub expires_at_height: Option } ``` Source line: `198`. ## storage\_market::StoragePinRequest::validate [#storage_marketstoragepinrequestvalidate] ```rust pub fn validate(&self) -> Result<(), CoreError>; ``` Source line: `213`. ## storage\_market::StoragePinContract [#storage_marketstoragepincontract] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StoragePinContract { pub contract_id: String, pub request_id: String, pub provider_did: String, pub owner_did: String, pub artifact: ArtifactCommitment, pub duration_epochs: u64, pub replication_factor: u16, pub accepted_price_per_gib_epoch: u64, pub escrowed_amount: u64, pub paid_amount: u64, pub status: StoragePinStatus, pub accepted_at_height: u64, pub settled_at_epoch: Option, pub challenge_window_until_height: Option } ``` Source line: `236`. ## storage\_market::StorageProofPosition [#storage_marketstorageproofposition] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum StorageProofPosition { Left, Right, } ``` Source line: `255`. ## storage\_market::StorageProofSibling [#storage_marketstorageproofsibling] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageProofSibling { pub position: StorageProofPosition, pub hash: SigilHash } ``` Source line: `261`. ## storage\_market::StorageChunkProof [#storage_marketstoragechunkproof] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageChunkProof { pub sample_index: u64, pub leaf_hash: SigilHash, pub siblings: Vec } ``` Source line: `267`. ## storage\_market::StorageChallengeProof [#storage_marketstoragechallengeproof] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageChallengeProof { pub challenge_nonce: SigilHash, pub chunk_proofs: Vec } ``` Source line: `274`. ## storage\_market::StorageChallengeProof::verify\_against\_weft [#storage_marketstoragechallengeproofverify_against_weft] ```rust pub fn verify_against_weft(&self, artifact: &ArtifactCommitment) -> Result; ``` Source line: `280`. ## storage\_market::verify\_weft\_chunk\_proof [#storage_marketverify_weft_chunk_proof] ```rust pub fn verify_weft_chunk_proof( root: SigilHash, leaf: SigilHash, leaf_index: u64, leaf_count: u64, siblings: &[StorageProofSibling], ) -> bool; ``` Source line: `317`. ## storage\_market::StoragePinReceipt [#storage_marketstoragepinreceipt] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StoragePinReceipt { pub receipt_id: String, pub contract_id: String, pub provider_did: String, pub artifact: ArtifactCommitment, pub pinned_root_cid: String, pub settled_epoch: u64, pub price_paid: u64, pub proof: StorageChallengeProof, pub receipt_hash: SigilHash, pub provider_signature: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub signer_pubkey: Option> } ``` Source line: `360`. ## storage\_market::StoragePinReceipt::compute\_receipt\_hash [#storage_marketstoragepinreceiptcompute_receipt_hash] ```rust pub fn compute_receipt_hash(&self) -> SigilHash; ``` Source line: `376`. ## storage\_market::StoragePinReceipt::verify\_hash [#storage_marketstoragepinreceiptverify_hash] ```rust pub fn verify_hash(&self) -> bool; ``` Source line: `395`. ## storage\_market::StorageChallengeRecord [#storage_marketstoragechallengerecord] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageChallengeRecord { pub challenge_id: String, pub contract_id: String, pub challenger_did: String, pub provider_did: String, pub challenge_nonce: SigilHash, pub sample_indices: Vec, pub status: StorageChallengeStatus, pub opened_at_height: u64, pub response_due_height: u64, pub resolved_at_height: Option } ``` Source line: `401`. ## storage\_market::StorageProviderRegisterData [#storage_marketstorageproviderregisterdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageProviderRegisterData { pub provider_did: String, pub capacity_gib: u64, pub regions: Vec, pub price_per_gib_epoch: u64, pub retrieval_price_per_gib: u64, pub replication_guarantee: u16, pub stake: u64, pub provider_pubkey: Vec, pub client_nonce: String } ``` Source line: `415`. ## storage\_market::StorageProviderUpdateData [#storage_marketstorageproviderupdatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageProviderUpdateData { pub provider_did: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub capacity_gib: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub regions: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub price_per_gib_epoch: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub retrieval_price_per_gib: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub replication_guarantee: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub provider_pubkey: Option>, pub client_nonce: String } ``` Source line: `428`. ## storage\_market::StorageProviderExitData [#storage_marketstorageproviderexitdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageProviderExitData { pub provider_did: String, pub client_nonce: String } ``` Source line: `446`. ## storage\_market::StoragePinRequestData [#storage_marketstoragepinrequestdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StoragePinRequestData { pub owner_did: String, pub artifact: ArtifactCommitment, pub duration_epochs: u64, pub replication_factor: u16, pub max_price_per_gib_epoch: u64, pub escrowed_amount: u64, pub expires_at_height: Option, pub client_nonce: String } ``` Source line: `452`. ## storage\_market::StoragePinAcceptData [#storage_marketstoragepinacceptdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StoragePinAcceptData { pub request_id: String, pub provider_did: String, pub accepted_price_per_gib_epoch: u64, pub client_nonce: String } ``` Source line: `464`. ## storage\_market::StorageReceiptSettleData [#storage_marketstoragereceiptsettledata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageReceiptSettleData { pub receipt: StoragePinReceipt } ``` Source line: `472`. ## storage\_market::StorageChallengeData [#storage_marketstoragechallengedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageChallengeData { pub contract_id: String, pub challenger_did: String, pub sample_indices: Vec, pub response_window_blocks: u64, pub client_nonce: String } ``` Source line: `477`. ## storage\_market::StorageChallengeResolveData [#storage_marketstoragechallengeresolvedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageChallengeResolveData { pub challenge_id: String, pub proof: StorageChallengeProof } ``` Source line: `486`. # sigil-core · system_contracts URL: https://docs.sigil.ml/reference/rust/sigil-core/system_contracts Markdown: https://docs.sigil.ml/reference/rust/sigil-core/system_contracts.md Source declarations, signatures and documentation for system_contracts. Source: `sigil/node/sigil-core/src/system_contracts.rs`. SHA-256: `53d3a878cc747ec7963c4546e228629644a0c73068bdfcbec8211f034222fb4c`. 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. ## system\_contracts::SYSTEM\_CONTRACT\_REGISTRY\_JSON [#system_contractssystem_contract_registry_json] ```rust pub const SYSTEM_CONTRACT_REGISTRY_JSON: &str; ``` Source line: `5`. ## system\_contracts::SystemContractRegistry [#system_contractssystemcontractregistry] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContractRegistry { pub version: u32, #[serde(rename = "defaultController")] pub default_controller: String, pub contracts: Vec } ``` Source line: `9`. ## system\_contracts::SystemContract [#system_contractssystemcontract] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContract { pub id: String, pub name: String, pub version: String, #[serde(rename = "contractDid")] pub contract_did: String, #[serde(rename = "controllerDid")] pub controller_did: String, pub runtime: String, pub deployment: String, pub wasm: SystemContractWasm, pub abi: SystemContractAbi, #[serde(rename = "nativeKernel")] pub native_kernel: Vec, #[serde(rename = "ricardianClauses")] pub ricardian_clauses: Vec } ``` Source line: `17`. ## system\_contracts::SystemContractWasm [#system_contractssystemcontractwasm] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContractWasm { pub source: String, #[serde(rename = "codeHash")] pub code_hash: String } ``` Source line: `36`. ## system\_contracts::SystemContractAbi [#system_contractssystemcontractabi] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContractAbi { pub actions: Vec } ``` Source line: `43`. ## system\_contracts::SystemContractAction [#system_contractssystemcontractaction] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContractAction { pub name: String, pub mutability: String, pub args: Vec } ``` Source line: `48`. ## system\_contracts::SystemContractRicardianClause [#system_contractssystemcontractricardianclause] ```rust #[derive(Debug, Clone, Deserialize)] pub struct SystemContractRicardianClause { pub title: String, pub text: String } ``` Source line: `55`. ## system\_contracts::system\_contract\_registry [#system_contractssystem_contract_registry] ```rust pub fn system_contract_registry() -> Result; ``` Source line: `60`. # sigil-core · transaction URL: https://docs.sigil.ml/reference/rust/sigil-core/transaction Markdown: https://docs.sigil.ml/reference/rust/sigil-core/transaction.md Source declarations, signatures and documentation for transaction. Source: `sigil/node/sigil-core/src/transaction.rs`. SHA-256: `6c978af06eae1ef7a19fecf3eba14adcb799b7c96a35d908f0bd509d676d0bba`. 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. ## transaction::TX\_DOMAIN\_TAG [#transactiontx_domain_tag] Domain separation tag for Sigil transaction signatures. Distinct from all CZAC tags (`b"sigil/czac/handshake/v1\n"` and `b"sigil/czac/envelope/v1\n"`) to prevent cross-context signature reuse. The signed transcript is: ```text TX_DOMAIN_TAG || serde_json::to_vec(&transaction) ``` and the Ed25519 signing primitive receives `BLAKE3(transcript)` as its 32-byte message. ```rust pub const TX_DOMAIN_TAG: &[u8]; ``` Source line: `78`. ## transaction::SPONSORED\_SETUP\_SUBJECT\_DOMAIN\_TAG [#transactionsponsored_setup_subject_domain_tag] Domain separation tag for subject consent inside sponsored setup envelopes. ```rust pub const SPONSORED_SETUP_SUBJECT_DOMAIN_TAG: &[u8]; ``` Source line: `80`. ## transaction::DEFAULT\_SIGNATURE\_BATCH\_SIZE [#transactiondefault_signature_batch_size] Default transaction signature batch size for validator block admission. ```rust pub const DEFAULT_SIGNATURE_BATCH_SIZE: usize; ``` Source line: `83`. ## transaction::SignedTransaction [#transactionsignedtransaction] A signed transaction ready for inclusion in a block. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SignedTransaction { /// The transaction payload. pub tx: Transaction, /// Ed25519 signature over the domain-separated transaction transcript. pub signature: Vec, /// Compressed Ed25519 public key of the signer (32 bytes). pub signer_public_key: Vec } ``` Source line: `94`. ## transaction::SignedTransaction::tx\_hash [#transactionsignedtransactiontx_hash] Compute the transaction hash (BLAKE3 of serialized tx). Returns an error if the transaction cannot be serialized. ```rust pub fn tx_hash(&self) -> Result; ``` Source line: `107`. ## transaction::SignedTransaction::canonical\_signing\_bytes [#transactionsignedtransactioncanonical_signing_bytes] Build the domain-separated signing transcript for a transaction. `transcript = TX_DOMAIN_TAG || serde_json::to_vec(tx)` The 32-byte `BLAKE3(transcript)` is what Ed25519 signs and verifies. ```rust pub fn canonical_signing_bytes(tx: &Transaction) -> Result, CoreError>; ``` Source line: `118`. ## transaction::SignedTransaction::sign [#transactionsignedtransactionsign] Sign a transaction with an Ed25519 signing key. Computes `BLAKE3(TX_DOMAIN_TAG || serde_json::to_vec(tx))` and signs the resulting 32-byte digest. Stores the 64-byte signature and the corresponding compressed verifying key (32 bytes) in the returned \[`SignedTransaction`]. # Errors [#errors] Returns \[`CoreError::SerializationError`] if the transaction cannot be serialized. ```rust pub fn sign(tx: Transaction, signing_key: &SigningKey) -> Result; ``` Source line: `138`. ## transaction::SignedTransaction::verify [#transactionsignedtransactionverify] Verify the Ed25519 signature on this transaction. Reconstructs `BLAKE3(TX_DOMAIN_TAG || serde_json::to_vec(&self.tx))` and verifies the stored 64-byte signature against it using the stored 32-byte compressed verifying key. Returns `Ok(())` on success. Any failure — empty signature, wrong size, key parse failure, or cryptographic mismatch — returns \[`CoreError::InvalidSignature`] with a generic message that does \*\*not distinguish between key and signature errors to prevent oracle attacks. # Errors [#errors-1] Returns \[`CoreError::InvalidSignature`] if verification fails for any reason. Returns \[`CoreError::SerializationError`] if the transaction payload cannot be serialized. ```rust pub fn verify(&self) -> Result<(), CoreError>; ``` Source line: `166`. ## transaction::SignedTransaction::verify\_batch [#transactionsignedtransactionverify_batch] Verify transaction signatures in deterministic fixed-size batches. Batch verification uses ed25519-dalek's deterministic batch verifier: all random scalars are derived from the batch transcript, so validator outcomes are bit-identical for the same ordered transaction list. `batch_size == 0` is treated as \[`DEFAULT_SIGNATURE_BATCH_SIZE`]. ```rust pub fn verify_batch(txs: &[SignedTransaction], batch_size: usize) -> Result<(), CoreError>; ``` Source line: `220`. ## transaction::SignedTransaction::verify\_batch\_report\_first\_failure [#transactionsignedtransactionverify_batch_report_first_failure] Verify a batch and report the first failing index on any rejection. ed25519 batch verification deliberately returns only a batch-level failure. Sigil falls back to single verification when the batch rejects so consensus and execution can emit a stable tx index without accepting partial batches. ```rust pub fn verify_batch_report_first_failure( txs: &[SignedTransaction], batch_size: usize, ) -> Result<(), (usize, CoreError)>; ``` Source line: `230`. ## transaction::SignedTransaction::batch\_signature\_hardware\_hint [#transactionsignedtransactionbatch_signature_hardware_hint] Return the strongest local SIMD capability visible to the process. The actual verifier stays deterministic; this value is for startup logs, metrics labels, and benchmark reports. ```rust pub fn batch_signature_hardware_hint() -> &'static str; ``` Source line: `278`. ## transaction::Transaction [#transactiontransaction] A Sigil blockchain transaction. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Transaction { /// Chain ID to prevent replay across networks. pub chain_id: String, /// Sender's OAS DID. pub sender_did: String, /// Monotonically increasing nonce (per sender). pub nonce: u64, /// Gas limit for this transaction. pub gas_limit: u64, /// Gas price in SIGIL (smallest unit). pub gas_price: u64, /// Transaction payload. pub tx_type: TransactionType, /// Timestamp (ISO 8601). pub timestamp: chrono::DateTime } ``` Source line: `306`. ## transaction::SponsoredSetupScope [#transactionsponsoredsetupscope] Strict setup-only scope for sponsored onboarding. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SponsoredSetupScope { HmrAnchor, EnrAnchor, MhrAnchor, LineageAnchor, RecoveryRegistration, InitialDeviceAnchor, } ``` Source line: `326`. ## transaction::SponsoredSetupScope::as\_str [#transactionsponsoredsetupscopeas_str] ```rust pub fn as_str(self) -> &'static str; ``` Source line: `336`. ## transaction::SponsoredSetupData [#transactionsponsoredsetupdata] Setup-only sponsored transaction envelope. The outer \[`Transaction`] sender is still the sponsor, so normal sponsor nonce, signature, and fee debiting rules remain intact. The subject proves control by signing a domain-separated transcript of the sponsored setup fields and inner setup action. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SponsoredSetupData { pub sponsor_did: String, pub subject_did: String, pub setup_scope: SponsoredSetupScope, pub idempotency_key: String, pub setup_tx_type: Box, pub subject_public_key: Vec, pub subject_signature: Vec } ``` Source line: `355`. ## transaction::InitialDeviceAnchorData [#transactioninitialdeviceanchordata] Initial device binding for setup-only onboarding. This records a public device key/commitment for a subject DID without granting value-transfer capability. It is intended to be used through `SponsoredSetup(InitialDeviceAnchor)` during first-run wallet onboarding. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct InitialDeviceAnchorData { pub subject_did: String, pub device_id: String, pub device_public_key: Vec, pub device_commitment: String, pub attestation_commitment: Option, pub display_name_commitment: Option, pub sequence: u64, pub anchored_at_block: u64 } ``` Source line: `371`. ## transaction::SponsoredSetupData::subject\_signing\_bytes [#transactionsponsoredsetupdatasubject_signing_bytes] ```rust pub fn subject_signing_bytes(&self, chain_id: &str) -> Result, CoreError>; ``` Source line: `393`. ## transaction::SponsoredSetupData::subject\_signing\_digest [#transactionsponsoredsetupdatasubject_signing_digest] ```rust pub fn subject_signing_digest(&self, chain_id: &str) -> Result<[u8; 32], CoreError>; ``` Source line: `414`. ## transaction::Transaction::hash [#transactiontransactionhash] Compute the hash of this transaction. Returns an error if the transaction cannot be serialized. ```rust pub fn hash(&self) -> Result; ``` Source line: `424`. ## transaction::Transaction::category [#transactiontransactioncategory] Returns the category of this transaction. ```rust pub fn category(&self) -> TransactionCategory; ``` Source line: `431`. ## transaction::Transaction::declared\_access\_set [#transactiontransactiondeclared_access_set] Deterministic read/write declaration for optimistic execution and account-local fee markets. ```rust pub fn declared_access_set(&self) -> TransactionAccessSet; ``` Source line: `437`. ## transaction::TransactionCategory [#transactiontransactioncategory-1] Transaction category for routing to semantic validators. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum TransactionCategory { Identity, Custody, Mars, Economics, Tokens, Contracts, Apps, Governance, Execution, Compute, /// Autonomous Organization / DAO transactions. Dao, /// Bidirectional Labor Market transactions (jobs, bids, contracts, /// milestones, attestations, reviews, disputes, reputation, revenue /// shares, royalties). Labor, /// Sigil Mail transactions: mailbox capability records, aliases, receive /// policy, public keys, delivery commitments, abuse, and delegations. Mail, /// Sigil Name System transactions extending the username registry into /// `.sigil` resolver records for mail, websites, wallets, and services. Sns, /// L1-coordinated distributed training commitments and reward pools. Crucible, /// Tower validator coordination chain transactions. #[cfg(feature = "tower")] Tower, /// Cross-Zone Agent Communication protocol transactions. #[cfg(feature = "czac")] Czac, /// Global Anchor Layer (MARS-S sharding) transactions. #[cfg(feature = "tower")] Gal, /// Nova metaverse world state transactions. #[cfg(feature = "nova")] Nova, /// Native non-fungible token (NFT) transactions. Nft, /// On-chain `@username` registry: register, transfer, release, metadata, /// reverse-lookup. See `docs/specs/USERNAMES.md`. Username, /// Event-driven autonomous contract subscriptions and deliveries. Vigils, /// First-class Weave/Weft storage pinning marketplace contracts, /// receipts, challenges, slashing, and rewards. Storage, /// Native constant-product DEX pools, swaps, and LP positions. Dex, /// Evidence anchoring: content-addressed digest commitments (harness /// archives, audit evidence). Hash-commitment anchoring, not ZK. Evidence, } ``` Source line: `444`. ## transaction::StateAccess [#transactionstateaccess] A deterministic state key touched by a transaction. `partition` is a stable logical namespace; `key` is the canonical string key within that namespace. String keys intentionally avoid host-endian or struct-layout dependencies in the execution scheduler. ```rust #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] pub struct StateAccess { pub partition: String, pub key: String } ``` Source line: `504`. ## transaction::StateAccess::new [#transactionstateaccessnew] ```rust pub fn new(partition: impl Into, key: impl Into) -> Self; ``` Source line: `510`. ## transaction::StateAccess::account\_balance [#transactionstateaccessaccount_balance] ```rust pub fn account_balance(did: impl Into) -> Self; ``` Source line: `517`. ## transaction::StateAccess::account\_nonce [#transactionstateaccessaccount_nonce] ```rust pub fn account_nonce(did: impl Into) -> Self; ``` Source line: `521`. ## transaction::StateAccess::fee\_market\_account [#transactionstateaccessfee_market_account] ```rust pub fn fee_market_account(did: impl Into) -> Self; ``` Source line: `525`. ## transaction::StateAccess::identity [#transactionstateaccessidentity] ```rust pub fn identity(did: impl Into) -> Self; ``` Source line: `529`. ## transaction::StateAccess::validator [#transactionstateaccessvalidator] ```rust pub fn validator(did: impl Into) -> Self; ``` Source line: `533`. ## transaction::StateAccess::delegation [#transactionstateaccessdelegation] ```rust pub fn delegation(delegator: impl AsRef, validator: impl AsRef) -> Self; ``` Source line: `537`. ## transaction::StateAccess::proposal [#transactionstateaccessproposal] ```rust pub fn proposal(id: impl ToString) -> Self; ``` Source line: `544`. ## transaction::StateAccess::vote [#transactionstateaccessvote] ```rust pub fn vote(proposal_id: impl ToString, voter: impl AsRef) -> Self; ``` Source line: `548`. ## transaction::StateAccess::contract [#transactionstateaccesscontract] ```rust pub fn contract(did: impl Into) -> Self; ``` Source line: `555`. ## transaction::StateAccess::contract\_code [#transactionstateaccesscontract_code] ```rust pub fn contract_code(hash: impl ToString) -> Self; ``` Source line: `559`. ## transaction::StateAccess::contract\_state [#transactionstateaccesscontract_state] ```rust pub fn contract_state(contract_did: impl AsRef, key: impl AsRef) -> Self; ``` Source line: `563`. ## transaction::StateAccess::contract\_state\_prefix [#transactionstateaccesscontract_state_prefix] ```rust pub fn contract_state_prefix(contract_did: impl AsRef) -> Self; ``` Source line: `570`. ## transaction::StateAccess::zone [#transactionstateaccesszone] ```rust pub fn zone(id: impl Into) -> Self; ``` Source line: `574`. ## transaction::StateAccess::zone\_queue [#transactionstateaccesszone_queue] ```rust pub fn zone_queue(id: impl Into) -> Self; ``` Source line: `578`. ## transaction::StateAccess::nft\_collection [#transactionstateaccessnft_collection] ```rust pub fn nft_collection(id: impl Into) -> Self; ``` Source line: `582`. ## transaction::StateAccess::nft\_token [#transactionstateaccessnft_token] ```rust pub fn nft_token(collection_id: impl AsRef, token_id: u128) -> Self; ``` Source line: `586`. ## transaction::StateAccess::dex\_pool [#transactionstateaccessdex_pool] ```rust pub fn dex_pool(pool_id: impl Into) -> Self; ``` Source line: `593`. ## transaction::StateAccess::dex\_position [#transactionstateaccessdex_position] ```rust pub fn dex_position(pool_id: impl AsRef, owner_did: impl AsRef) -> Self; ``` Source line: `597`. ## transaction::StateAccess::dex\_asset\_balance [#transactionstateaccessdex_asset_balance] ```rust pub fn dex_asset_balance(asset_id: impl AsRef, owner_did: impl AsRef) -> Self; ``` Source line: `604`. ## transaction::StateAccess::dex\_asset\_balance\_owner\_prefix [#transactionstateaccessdex_asset_balance_owner_prefix] ```rust pub fn dex_asset_balance_owner_prefix(owner_did: impl AsRef) -> Self; ``` Source line: `611`. ## transaction::StateAccess::dao [#transactionstateaccessdao] ```rust pub fn dao(id: impl Into) -> Self; ``` Source line: `615`. ## transaction::StateAccess::mandate [#transactionstateaccessmandate] ```rust pub fn mandate(id: impl Into) -> Self; ``` Source line: `619`. ## transaction::StateAccess::labor\_job [#transactionstateaccesslabor_job] ```rust pub fn labor_job(id: impl Into) -> Self; ``` Source line: `623`. ## transaction::StateAccess::labor\_bid [#transactionstateaccesslabor_bid] ```rust pub fn labor_bid(id: impl Into) -> Self; ``` Source line: `627`. ## transaction::StateAccess::labor\_contract [#transactionstateaccesslabor_contract] ```rust pub fn labor_contract(id: impl Into) -> Self; ``` Source line: `631`. ## transaction::StateAccess::labor\_offer [#transactionstateaccesslabor_offer] ```rust pub fn labor_offer(id: impl Into) -> Self; ``` Source line: `635`. ## transaction::StateAccess::labor\_claim [#transactionstateaccesslabor_claim] ```rust pub fn labor_claim(id: impl Into) -> Self; ``` Source line: `639`. ## transaction::StateAccess::training\_run [#transactionstateaccesstraining_run] ```rust pub fn training_run(id: impl Into) -> Self; ``` Source line: `643`. ## transaction::StateAccess::training\_reward\_pool [#transactionstateaccesstraining_reward_pool] ```rust pub fn training_reward_pool(id: impl Into) -> Self; ``` Source line: `647`. ## transaction::StateAccess::training\_rollout\_batch [#transactionstateaccesstraining_rollout_batch] ```rust pub fn training_rollout_batch(run_id: impl AsRef, batch_id: impl AsRef) -> Self; ``` Source line: `651`. ## transaction::StateAccess::training\_weights [#transactionstateaccesstraining_weights] ```rust pub fn training_weights(run_id: impl AsRef, model_root: impl ToString) -> Self; ``` Source line: `658`. ## transaction::StateAccess::training\_reward\_attestation [#transactionstateaccesstraining_reward_attestation] ```rust pub fn training_reward_attestation( run_id: impl AsRef, attestation_id: impl AsRef, ) -> Self; ``` Source line: `665`. ## transaction::StateAccess::training\_slash [#transactionstateaccesstraining_slash] ```rust pub fn training_slash(run_id: impl AsRef, slash_id: impl AsRef) -> Self; ``` Source line: `675`. ## transaction::StateAccess::compute\_provider [#transactionstateaccesscompute_provider] ```rust #[cfg(feature = "compute")] pub fn compute_provider(id: impl Into) -> Self; ``` Source line: `683`. ## transaction::StateAccess::compute\_escrow [#transactionstateaccesscompute_escrow] ```rust #[cfg(feature = "compute")] pub fn compute_escrow(id: impl Into) -> Self; ``` Source line: `688`. ## transaction::StateAccess::compute\_receipt [#transactionstateaccesscompute_receipt] ```rust #[cfg(feature = "compute")] pub fn compute_receipt(id: impl Into) -> Self; ``` Source line: `693`. ## transaction::StateAccess::compute\_challenge [#transactionstateaccesscompute_challenge] ```rust #[cfg(feature = "compute")] pub fn compute_challenge(id: impl Into) -> Self; ``` Source line: `698`. ## transaction::StateAccess::storage\_provider [#transactionstateaccessstorage_provider] ```rust pub fn storage_provider(id: impl Into) -> Self; ``` Source line: `702`. ## transaction::StateAccess::storage\_request [#transactionstateaccessstorage_request] ```rust pub fn storage_request(id: impl Into) -> Self; ``` Source line: `706`. ## transaction::StateAccess::storage\_contract [#transactionstateaccessstorage_contract] ```rust pub fn storage_contract(id: impl Into) -> Self; ``` Source line: `710`. ## transaction::StateAccess::storage\_receipt [#transactionstateaccessstorage_receipt] ```rust pub fn storage_receipt(id: impl Into) -> Self; ``` Source line: `714`. ## transaction::StateAccess::storage\_challenge [#transactionstateaccessstorage_challenge] ```rust pub fn storage_challenge(id: impl Into) -> Self; ``` Source line: `718`. ## transaction::StateAccess::global [#transactionstateaccessglobal] ```rust pub fn global(key: impl Into) -> Self; ``` Source line: `722`. ## transaction::TransactionAccessSet [#transactiontransactionaccessset] Deterministic transaction-level read/write declaration. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TransactionAccessSet { pub reads: BTreeSet, pub writes: BTreeSet } ``` Source line: `729`. ## transaction::TransactionAccessSet::new [#transactiontransactionaccesssetnew] ```rust pub fn new() -> Self; ``` Source line: `735`. ## transaction::TransactionAccessSet::for\_sender [#transactiontransactionaccesssetfor_sender] ```rust pub fn for_sender(sender_did: &str) -> Self; ``` Source line: `742`. ## transaction::TransactionAccessSet::read [#transactiontransactionaccesssetread] ```rust pub fn read(&mut self, key: StateAccess); ``` Source line: `750`. ## transaction::TransactionAccessSet::write [#transactiontransactionaccesssetwrite] ```rust pub fn write(&mut self, key: StateAccess); ``` Source line: `754`. ## transaction::TransactionAccessSet::read\_write [#transactiontransactionaccesssetread_write] ```rust pub fn read_write(&mut self, key: StateAccess); ``` Source line: `758`. ## transaction::TransactionAccessSet::conflicts\_with [#transactiontransactionaccesssetconflicts_with] ```rust pub fn conflicts_with(&self, other: &Self) -> bool; ``` Source line: `763`. ## transaction::TransactionAccessSet::local\_fee\_accounts [#transactiontransactionaccesssetlocal_fee_accounts] ```rust pub fn local_fee_accounts(&self) -> BTreeSet; ``` Source line: `819`. ## transaction::TransactionType [#transactiontransactiontype] All 34 transaction types. ```rust #[allow(clippy::large_enum_variant)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "type", content = "data")] pub enum TransactionType { // ---- Identity (5) ---- /// Register a new OAS identity on-chain. IdentityRegister(IdentityRegisterData), /// Update an existing OAS identity document. IdentityUpdate(IdentityUpdateData), /// Revoke an OAS identity (irreversible). IdentityRevoke(IdentityRevokeData), /// Delegate control of an identity to another DID. IdentityDelegate(IdentityDelegateData), /// Recover an identity via recovery key or social recovery. /// Deprecated single-step placeholder — use the `*Recovery` flow below /// for production. Retained for backward compatibility with pre-launch /// SDKs; the executor still treats it as fee-only fallthrough. IdentityRecover(IdentityRecoverData), /// Register or replace a recovery group (guardians + threshold + /// timelock + panic-abort key) for the sender DID. RegisterRecovery(RegisterRecoveryData), /// Initiate a recovery ceremony for `subject_did`. Permissionless /// (the gas payer need not be the subject). InitiateRecovery(InitiateRecoveryData), /// Add one guardian's authorization to an open recovery ceremony. AddRecoveryAuthorization(AddRecoveryAuthorizationData), /// Abort an open recovery ceremony with the panic-abort key or the /// subject's current pre-rotation key. AbortRecovery(AbortRecoveryData), /// Finalize a Ready recovery ceremony — rotates the on-chain pubkey. FinalizeRecovery(FinalizeRecoveryData), /// Setup-only sponsored onboarding envelope. The outer sender pays fees; /// the embedded action is allowlisted at executor time. SponsoredSetup(SponsoredSetupData), /// Setup-only initial device anchor for a subject DID. InitialDeviceAnchor(InitialDeviceAnchorData), // ---- Agent-native custody ---- /// Register a first-class root identity. RegisterRoot(RegisterRootData), /// Rotate active keys for a root identity. RotateRootKey(RotateRootKeyData), /// Revoke a root identity. RevokeRoot(RevokeRootData), /// Create an HMR/MHR/ENR-backed root group. CreateRootGroup(CreateRootGroupData), /// Update a root group policy. UpdateRootGroupPolicy(UpdateRootGroupPolicyData), /// Issue an agent under a root or root group. IssueAgent(IssueAgentData), /// Rotate an agent signing key. RotateAgentKey(RotateAgentKeyData), /// Revoke an agent. RevokeAgent(RevokeAgentData), /// Delegate permissions from a controller to an agent/app. DelegatePermission(DelegatePermissionData), /// Revoke delegated permissions. RevokePermission(RevokePermissionData), // ---- MARS (5) ---- /// Anchor a new MARS registry entry on-chain. MarsAnchorRegister(MarsAnchorData), /// Anchor a MARS entry update on-chain. MarsAnchorUpdate(MarsAnchorData), /// Anchor a MARS entry revocation on-chain. MarsAnchorRevoke(MarsAnchorRevokeData), /// Anchor a MARS entry transfer on-chain. MarsAnchorTransfer(MarsAnchorTransferData), /// Anchor a MARS attestation on-chain. MarsAnchorAttest(MarsAnchorAttestData), // ---- Economics (4) ---- /// Stake MINT to become a validator. Stake(StakeData), /// Unstake MINT (begins unbonding period). Unstake(UnstakeData), /// Delegate stake to another validator. DelegateStake(DelegateStakeData), /// Redeem delegation pool shares from another validator. UndelegateStake(UndelegateStakeData), /// Claim accumulated rewards. ClaimRewards(ClaimRewardsData), /// Transfer MINT to another account. Transfer(TransferData), // ---- Agent-native treasuries ---- /// Create a policy-controlled treasury. CreateTreasury(CreateTreasuryData), /// Deposit native MINT/SIGIL into a treasury. DepositTreasury(DepositTreasuryData), /// Withdraw from a policy-controlled treasury. WithdrawTreasury(WithdrawTreasuryData), /// Set treasury revenue distribution policy. SetDistributionPolicy(SetDistributionPolicyData), /// Distribute treasury revenue according to policy. DistributeRevenue(DistributeRevenueData), // ---- Agent-native tokens ---- /// Create a custom token class. CreateTokenClass(CreateTokenClassData), /// Mint a custom token. MintToken(MintTokenData), /// Burn a custom token. BurnToken(BurnTokenData), /// Transfer a custom token. TransferToken(TransferTokenData), /// Update token policy. SetTokenPolicy(SetTokenPolicyData), // ---- Agent-native contracts ---- /// Register content-addressed smart-contract bytecode for later deploy. RegisterContractCode(RegisterContractCodeData), /// Deploy a smart contract account. DeployContract(DeployContractData), /// Call a smart contract. CallContract(CallContractData), /// Upgrade contract code. UpgradeContract(UpgradeContractData), /// Update contract policy. SetContractPolicy(SetContractPolicyData), // ---- Agent-native apps ---- /// Register an app agent. RegisterAppAgent(RegisterAppAgentData), /// Grant app permissions. GrantAppPermission(GrantAppPermissionData), /// Revoke app permissions. RevokeAppPermission(RevokeAppPermissionData), /// Upgrade app metadata or policy. UpgradeAppAgent(UpgradeAppAgentData), // ---- Agent-native DAO / Autonomous Organization ---- /// Register a DAO / Autonomous Organization on-chain. RegisterDao(RegisterDaoData), /// Update controller / governance / hiring policy on a DAO. UpdateDaoPolicy(UpdateDaoPolicyData), // ---- Mandates ---- /// Issue a mandate authorizing an actor to spend or hire under bounds. IssueMandate(IssueMandateData), /// Update budget, scope, or status of a mandate. UpdateMandate(UpdateMandateData), /// Revoke a mandate. RevokeMandate(RevokeMandateData), /// Record a spend against a mandate (emitted alongside the actual /// payment transaction so spend accounting stays atomic). RecordMandateSpend(RecordMandateSpendData), // ---- Labor market ---- /// Post a labor job advertisement. PostLaborJob(PostLaborJobData), /// Cancel a labor job. CancelLaborJob(CancelLaborJobData), /// Submit a bid for a labor job. SubmitLaborBid(SubmitLaborBidData), /// Withdraw a previously submitted bid. WithdrawLaborBid(WithdrawLaborBidData), /// Accept a bid (selects the worker). AcceptLaborBid(AcceptLaborBidData), /// Create a labor contract from an accepted bid. CreateLaborContract(CreateLaborContractData), /// Fund a contract escrow. FundLaborEscrow(FundLaborEscrowData), /// Open and fund an open bounty offer. LaborOpenOffer(LaborOpenOfferData), /// Submit a claim against an open bounty offer. LaborSubmitClaim(LaborSubmitClaimData), /// Attest an open bounty claim. LaborAttestClaim(LaborAttestClaimData), /// Cancel or close an open bounty offer and refund available escrow. LaborCancelOffer(LaborCancelOfferData), /// Submit a deliverable for a contract milestone. SubmitDeliverable(SubmitDeliverableData), /// Attest milestone completion. AttestMilestone(AttestMilestoneData), /// Release escrowed payment for an attested milestone. ReleaseMilestonePayment(ReleaseMilestonePaymentData), /// Raise a dispute against a labor contract. RaiseLaborDispute(RaiseLaborDisputeData), /// Resolve an open dispute. ResolveLaborDispute(ResolveLaborDisputeData), /// Submit a post-completion review. SubmitLaborReview(SubmitLaborReviewData), // ---- Crucible training coordination ---- /// Open an L1-coordinated training run and reserve its reward pool. TrainOpen(TrainOpenData), /// Commit a batch of off-chain rollouts by artifact/root commitment. TrainRolloutBatchCommit(TrainRolloutBatchCommitData), /// Attest reward distribution for a committed rollout batch. TrainRewardBatchAttest(TrainRewardBatchAttestData), /// Publish a model checkpoint root and artifact commitment. TrainWeightsPublish(TrainWeightsPublishData), /// Slash a verifier, coordinator, or publisher with off-chain evidence. TrainSlash(TrainSlashData), /// Close or cancel a training run. TrainClose(TrainCloseData), // ---- Governance (5) ---- /// Submit a governance proposal. GovernancePropose(GovernanceProposeData), /// Vote on a governance proposal. GovernanceVote(GovernanceVoteData), /// Execute an approved proposal after timelock. GovernanceExecute(GovernanceExecuteData), /// Cancel a pending proposal (proposer only). GovernanceCancel(GovernanceCancelData), /// Emergency action (requires supermajority). #[cfg(feature = "governance")] GovernanceEmergency(GovernanceEmergencyData), // ---- Execution (7) ---- /// Deploy a new Organization Zone. DeployZone(DeployZoneData), /// Invoke a function in an Organization Zone. InvokeZone(InvokeZoneData), /// Commit state changes from zone execution. CommitState(CommitStateData), /// Send a cross-zone message. CrossZoneMessage(CrossZoneMessageData), /// Upgrade a WASI module in a zone. UpgradeModule(UpgradeModuleData), /// Register a semantic validation WASI module. RegisterWasiValidator(RegisterWasiValidatorData), /// Remove a semantic validation WASI module. RemoveWasiValidator(RemoveWasiValidatorData), // ---- Compute (8) ---- /// Register as a compute provider. #[cfg(feature = "compute")] ComputeProviderRegister(ComputeProviderRegisterData), /// Update compute provider metadata. #[cfg(feature = "compute")] ComputeProviderUpdate(ComputeProviderUpdateData), /// Authorize a relayer DID to submit compute receipts for a provider. #[cfg(feature = "compute")] ComputeProviderRelayerRegister(ComputeProviderRelayerData), /// Revoke a relayer DID from a compute provider. #[cfg(feature = "compute")] ComputeProviderRelayerRevoke(ComputeProviderRelayerData), /// Exit as a compute provider (begins cooldown). #[cfg(feature = "compute")] ComputeProviderExit(ComputeProviderExitData), /// Fund a compute escrow account. #[cfg(feature = "compute")] ComputeEscrowFund(ComputeEscrowFundData), /// Withdraw from compute escrow. #[cfg(feature = "compute")] ComputeEscrowWithdraw(ComputeEscrowWithdrawData), /// Settle a compute receipt (pay provider). #[cfg(feature = "compute")] ComputeReceiptSettle(ComputeReceiptSettleData), /// Challenge a compute receipt. #[cfg(feature = "compute")] ComputeChallenge(ComputeChallengeData), /// Resolve a compute challenge. #[cfg(feature = "compute")] ComputeChallengeResolve(ComputeChallengeResolveData), // ---- MACA epoch / quorum (5, Phase 12) ---- /// Register an agent that participates in MACA consensus /// (Validator / Auditor / Sentinel / Proposer / Beacon). #[cfg(feature = "compute")] MacaRegisterValidatorAgent(MacaRegisterValidatorAgentData), /// Beacon agent publishes randomness for an epoch. #[cfg(feature = "compute")] MacaPublishBeacon(MacaPublishBeaconData), /// Proposer rolls open work claims into a new epoch. #[cfg(feature = "compute")] MacaProposeEpoch(MacaProposeEpochData), /// Validator/auditor submits an attestation against a work claim /// included in an open MACA epoch. #[cfg(feature = "compute")] MacaSubmitAttestation(MacaSubmitAttestationData), /// Finalize an open MACA epoch: aggregate validator attestations /// into per-work `MacaQuorumProof`s. #[cfg(feature = "compute")] MacaFinalizeEpoch(MacaFinalizeEpochData), // ---- Tower (7) ---- /// Register a new validator on the Tower coordination chain. #[cfg(feature = "tower")] TowerRegisterValidator(TowerRegisterValidatorData), /// Update an existing Tower validator's metadata. #[cfg(feature = "tower")] TowerUpdateValidator(TowerUpdateValidatorData), /// Exit as a Tower validator (begins cooldown). #[cfg(feature = "tower")] TowerExitValidator(TowerExitValidatorData), /// Submit slashing evidence to the Tower Committee. #[cfg(feature = "tower")] TowerSubmitEvidence(TowerSubmitEvidenceData), /// Cast a Casper FFG finality vote. #[cfg(feature = "tower")] TowerFinalityVote(TowerFinalityVoteData), /// Delegate stake via the Tower coordination chain. #[cfg(feature = "tower")] TowerDelegateStake(TowerDelegateStakeData), /// Claim Tower validator rewards. #[cfg(feature = "tower")] TowerClaimRewards(TowerClaimRewardsData), // ---- CZAC (4) ---- /// Open a CZAC cross-zone communication channel. #[cfg(feature = "czac")] CzacChannelOpen(CzacChannelOpenData), /// Close a CZAC channel cooperatively. #[cfg(feature = "czac")] CzacChannelClose(CzacChannelCloseData), /// Settle a closed CZAC channel on-consensus. #[cfg(feature = "czac")] CzacChannelSettle(CzacChannelSettleData), /// Dispute a CZAC payment channel with a newer balance proof. #[cfg(feature = "czac")] CzacPaymentChannelDispute(CzacPaymentChannelDisputeData), // ---- GAL — Global Anchor Layer (5 generic, deprecated) ---- /// Anchor a new entry in the Global Anchor Layer (MARS-S). /// /// Deprecated in favor of the typed `GalAnchorHmr` / `GalAnchorMhr` / /// `GalAnchorEnr` variants below. Retained for backward compatibility. #[cfg(feature = "tower")] GalAnchorEntry(GalAnchorEntryData), /// Update an existing GAL entry. Deprecated: use the typed update /// variants for HMR / MHR / ENR / org lineage roots instead. #[cfg(feature = "tower")] GalUpdateEntry(GalUpdateEntryData), /// Revoke a GAL entry. Deprecated: use `GalRecordRevocation` instead. #[cfg(feature = "tower")] GalRevokeEntry(GalRevokeEntryData), /// Assign an entry to a specific shard. Deprecated: use /// `GalAssignShardTyped` instead. #[cfg(feature = "tower")] GalAssignShard(GalAssignShardData), /// Update the shard topology map. Deprecated: use `GalApplyTopology` /// instead. #[cfg(feature = "tower")] GalUpdateTopology(GalUpdateTopologyData), // ---- GAL — Global Anchor Layer (typed) ---- /// Anchor an HMR (single-human root) on the GAL. #[cfg(feature = "tower")] GalAnchorHmr(crate::gal::HmrAnchor), /// Anchor an MHR (threshold-controlled multi-party root) on the GAL. #[cfg(feature = "tower")] GalAnchorMhr(crate::gal::MhrAnchor), /// Anchor an ENR (enterprise root) on the GAL. #[cfg(feature = "tower")] GalAnchorEnr(crate::gal::EnrAnchor), /// Update an org lineage Merkle root. #[cfg(feature = "tower")] GalUpdateOrgLineageRoot(crate::gal::OrgLineageRoot), /// Assign a single subject to a shard (typed counterpart of /// `GalAssignShard`). #[cfg(feature = "tower")] GalAssignShardTyped(crate::gal::ShardAssignment), /// Record a revocation. Cascade kinds (`CascadeRoot`, `CascadeOrg`) /// require `parent_root_did` to be set so cascade chains are /// reconstructible from on-chain state. #[cfg(feature = "tower")] GalRecordRevocation(crate::gal::RevocationRecord), /// Apply a shard-topology change. #[cfg(feature = "tower")] GalApplyTopology(crate::gal::ShardTopologyEntry), // ---- Nova (10) ---- /// Claim a land parcel in the Nova metaverse. #[cfg(feature = "nova")] NovaClaimParcel(NovaClaimParcelData), /// Transfer a land parcel to another owner. #[cfg(feature = "nova")] NovaTransferParcel(NovaTransferParcelData), /// Deploy a building on a Nova parcel. #[cfg(feature = "nova")] NovaDeployBuilding(NovaDeployBuildingData), /// Remove a building from a Nova parcel. #[cfg(feature = "nova")] NovaRemoveBuilding(NovaRemoveBuildingData), /// Update avatar state (position, animation, presence). #[cfg(feature = "nova")] NovaUpdateAvatar(NovaUpdateAvatarData), /// Create a new Nova world instance. #[cfg(feature = "nova")] NovaCreateWorld(NovaCreateWorldData), /// Open a seller-owned parcel auction. #[cfg(feature = "nova")] NovaCreateAuction(NovaCreateAuctionData), /// Place a bid on a Nova land auction. #[cfg(feature = "nova")] NovaAuctionBid(NovaAuctionBidData), /// Settle a closed Nova land auction. #[cfg(feature = "nova")] NovaSettleAuction(NovaSettleAuctionData), /// Set permissions on a Nova spatial zone. #[cfg(feature = "nova")] NovaSetZonePermissions(NovaSetZonePermissionsData), // ---- Native NFT (6) ---- /// Create a new NFT collection (standard or identity). CreateNftCollection(CreateNftCollectionData), /// Mint a new NFT into an existing collection. MintNft(MintNftData), /// Transfer an NFT from one owner to another. TransferNft(TransferNftData), /// Burn (destroy) an NFT. BurnNft(BurnNftData), /// Update the metadata URI and/or hash of an NFT (ERC-4906). SetNftMetadata(SetNftMetadataData), /// Advance the verification level on an identity NFT. VerifyIdentityNft(VerifyIdentityNftData), // ---- Username (5) ---- /// Register an `@username` and bind it to a DID for `years` years. RegisterUsername(RegisterUsernameData), /// Transfer ownership of a username to a new DID. TransferUsername(TransferUsernameData), /// Release a username (current owner gives it up; or anyone after expiry). ReleaseUsername(ReleaseUsernameData), /// Set or clear the off-chain metadata content hash for a username. SetUsernameMetadata(SetUsernameMetadataData), /// Designate the primary `@username` for reverse lookups on a DID. SetReverseUsername(SetReverseUsernameData), /// Submit a bid against an open premium-name auction. SubmitUsernameAuctionBid(UsernameAuctionBidData), /// Finalize a premium-name auction whose anti-snipe window has elapsed. FinalizeUsernameAuction(UsernameAuctionFinalizeData), /// File a UDRP-equivalent dispute against a registered username. RaiseUsernameDispute(RaiseUsernameDisputeData), /// Resolve a previously-filed dispute (carries multisig signatures over /// the resolution payload). ResolveUsernameDispute(ResolveUsernameDisputeData), // ---- Sigil Mail (19) ---- MailCreateMailbox(MailCreateMailboxData), MailAddAlias(MailAddAliasData), MailRemoveAlias(MailRemoveAliasData), MailSetPrimaryAlias(MailSetPrimaryAliasData), MailLockMailbox(MailLockMailboxData), MailUnlockMailbox(MailUnlockMailboxData), MailDeactivateMailbox(MailDeactivateMailboxData), MailRecoverMailbox(MailRecoverMailboxData), MailUpdateReceivePolicy(MailUpdateReceivePolicyData), MailRevokeReceivePolicy(MailRevokeReceivePolicyData), MailPublishKey(MailPublishKeyData), MailRotateKey(MailRotateKeyData), MailRevokeKey(MailRevokeKeyData), MailExpireKeys(MailExpireKeysData), MailPublishDeliveryCommitment(MailPublishDeliveryCommitmentData), MailReportAbuse(MailReportAbuseData), MailResolveAbuse(MailResolveAbuseData), MailGrantPermission(MailGrantPermissionData), MailRevokePermission(MailRevokePermissionData), // ---- Sigil Name System (10) ---- RegisterName(RegisterNameData), RenewName(RenewNameData), SetNameRecords(SetNameRecordsData), DeleteNameRecords(DeleteNameRecordsData), DelegateSubdomain(DelegateSubdomainData), RevokeDelegation(RevokeDelegationData), SetPrimaryName(SetPrimaryNameData), CommitNameRegistration(CommitNameRegistrationData), CommitSealedNameBid(CommitSealedNameBidData), RevealSealedNameBid(RevealSealedNameBidData), FinalizeSealedNameAuction(FinalizeSealedNameAuctionData), // ---- Vigils (10) ---- /// Register a Vigil subscription for a contract callback. RegisterVigilSubscription(crate::vigil::RegisterVigilSubscriptionData), /// Update mutable controls on an existing Vigil subscription. UpdateVigilSubscription(crate::vigil::UpdateVigilSubscriptionData), /// Cancel a Vigil subscription. CancelVigilSubscription(crate::vigil::CancelVigilSubscriptionData), /// Deposit autonomous-callback gas into a subscription gas tank. DepositVigilGas(crate::vigil::DepositVigilGasData), /// Withdraw unused autonomous-callback gas from a subscription gas tank. WithdrawVigilGas(crate::vigil::WithdrawVigilGasData), /// Deliver a verified event for deterministic callback scheduling. EventDelivery(crate::vigil::EventDeliveryData), /// Slash an ingestor for proven false delivery. SlashIngestor(crate::vigil::SlashIngestorData), /// Register an OAS-rooted ingestor. RegisterIngestor(crate::vigil::RegisterIngestorData), /// Update ingestor bond or supported source set. UpdateIngestorStake(crate::vigil::UpdateIngestorStakeData), /// Deregister an ingestor. DeregisterIngestor(crate::vigil::DeregisterIngestorData), // ---- Storage Pinning Marketplace (8) ---- /// Register a Weave/Weft storage provider with capacity, pricing, and bond. StorageProviderRegister(StorageProviderRegisterData), /// Update provider capacity, regions, pricing, or signing key. StorageProviderUpdate(StorageProviderUpdateData), /// Begin provider exit from the storage marketplace. StorageProviderExit(StorageProviderExitData), /// Request replicated pinning for an artifact/Weft root commitment. StoragePinRequest(StoragePinRequestData), /// Accept a pin request as a provider. StoragePinAccept(StoragePinAcceptData), /// Settle a provider's signed pin receipt after deterministic proof checks. StorageReceiptSettle(StorageReceiptSettleData), /// Open a deterministic proof-of-possession challenge against a pin contract. StorageChallenge(StorageChallengeData), /// Resolve a storage challenge by proving or failing sampled Weft chunks. StorageChallengeResolve(StorageChallengeResolveData), // ---- DEX (5) ---- /// Create a deterministic constant-product pool with initial liquidity. DexCreatePool(DexCreatePoolData), /// Add proportional liquidity to an existing pool. DexAddLiquidity(DexAddLiquidityData), /// Remove liquidity by burning LP shares. DexRemoveLiquidity(DexRemoveLiquidityData), /// Swap an exact input amount with minimum-output protection. DexSwapExactIn(DexSwapExactInData), /// Swap for an exact output amount with maximum-input protection. DexSwapExactOut(DexSwapExactOutData), // ---- Evidence anchoring (1) ---- /// Anchor a content digest (e.g. a ONE harness archive BLAKE3 digest) /// on-chain with bounded metadata. Hash-commitment anchoring — not ZK. EvidenceAnchor(EvidenceAnchorData), } ``` Source line: `846`. ## transaction::TransactionType::category [#transactiontransactiontypecategory] Returns the category of this transaction type. ```rust pub fn category(&self) -> TransactionCategory; ``` Source line: `1369`. ## transaction::TransactionType::declared\_access\_set [#transactiontransactiontypedeclared_access_set] Deterministic read/write declaration used by optimistic execution and local fee markets. Every `TransactionType` arm is explicit; adding a variant without a precise declaration breaks compilation. ```rust pub fn declared_access_set(&self, sender_did: &str) -> TransactionAccessSet; ``` Source line: `1619`. ## transaction::TransactionType::name [#transactiontransactiontypename] Returns a human-readable name. ```rust pub fn name(&self) -> &'static str; ``` Source line: `2958`. ## transaction::IdentityRegisterData [#transactionidentityregisterdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct IdentityRegisterData { /// The OAS DID to register. pub did: String, /// The full OAS document (serialized JSON). pub document: serde_json::Value, /// Initial conformance level. pub conformance_level: String } ``` Source line: `3240`. ## transaction::IdentityUpdateData [#transactionidentityupdatedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct IdentityUpdateData { pub did: String, pub document: serde_json::Value, pub sequence: u64 } ``` Source line: `3250`. ## transaction::IdentityRevokeData [#transactionidentityrevokedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IdentityRevokeData { pub did: String, pub reason: String } ``` Source line: `3257`. ## transaction::IdentityDelegateData [#transactionidentitydelegatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IdentityDelegateData { pub did: String, pub delegate_did: String, pub scopes: Vec, pub expires_at: Option } ``` Source line: `3263`. ## transaction::IdentityRecoverData [#transactionidentityrecoverdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct IdentityRecoverData { pub did: String, pub recovery_proof: serde_json::Value, pub new_document: serde_json::Value } ``` Source line: `3271`. ## transaction::RegisterRootData [#transactionregisterrootdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RegisterRootData { pub root_did: String, pub kind: RootKind, pub public_keys: Vec, pub recovery_policy: Option, pub metadata_commitment: Option } ``` Source line: `3282`. ## transaction::RotateRootKeyData [#transactionrotaterootkeydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RotateRootKeyData { pub root_did: String, pub new_public_keys: Vec, pub effective_epoch: Option } ``` Source line: `3291`. ## transaction::RevokeRootData [#transactionrevokerootdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokeRootData { pub root_did: String, pub reason: String } ``` Source line: `3298`. ## transaction::CreateRootGroupData [#transactioncreaterootgroupdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CreateRootGroupData { pub group_did: String, pub kind: RootKind, pub policy: ThresholdPolicy, pub profit_shares: Vec, pub metadata_commitment: Option } ``` Source line: `3304`. ## transaction::UpdateRootGroupPolicyData [#transactionupdaterootgrouppolicydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpdateRootGroupPolicyData { pub group_did: String, pub new_policy: ThresholdPolicy, pub reason: Option } ``` Source line: `3313`. ## transaction::IssueAgentData [#transactionissueagentdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct IssueAgentData { pub agent_did: String, pub controller_did: String, pub agent_kind: AgentKind, pub public_keys: Vec, pub permissions: Vec, pub revenue_account: Option, pub metadata_commitment: Option } ``` Source line: `3320`. ## transaction::RotateAgentKeyData [#transactionrotateagentkeydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RotateAgentKeyData { pub agent_did: String, pub new_public_keys: Vec, pub effective_epoch: Option } ``` Source line: `3331`. ## transaction::RevokeAgentData [#transactionrevokeagentdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokeAgentData { pub agent_did: String, pub reason: String } ``` Source line: `3338`. ## transaction::DelegatePermissionData [#transactiondelegatepermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegatePermissionData { pub controller_did: String, pub delegate_did: String, pub permissions: Vec, pub expires_at_epoch: Option } ``` Source line: `3344`. ## transaction::RevokePermissionData [#transactionrevokepermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokePermissionData { pub controller_did: String, pub delegate_did: String, pub permissions: Vec } ``` Source line: `3352`. ## transaction::MarsAnchorData [#transactionmarsanchordata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MarsAnchorData { pub entry_did: String, pub item_data_hash: String, pub publisher_did: String, pub version: String, pub bond_id: Option } ``` Source line: `3363`. ## transaction::WeftRootCommitment::to\_mars\_anchor\_data [#transactionweftrootcommitmentto_mars_anchor_data] Convert this Weft root into the typed MARS anchor payload shape. MARS anchor execution is release-gated in `sigil-node` today; this helper is the deterministic transaction payload boundary consumers can use once `MarsAnchorRegister` is made live. ```rust pub fn to_mars_anchor_data( &self, entry_did: impl Into, publisher_did: impl Into, version: impl Into, bond_id: Option, ) -> MarsAnchorData; ``` Source line: `3377`. ## transaction::MarsAnchorRevokeData [#transactionmarsanchorrevokedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MarsAnchorRevokeData { pub entry_did: String, pub reason: String } ``` Source line: `3395`. ## transaction::MarsAnchorTransferData [#transactionmarsanchortransferdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MarsAnchorTransferData { pub entry_did: String, pub from_publisher_did: String, pub to_publisher_did: String } ``` Source line: `3401`. ## transaction::MarsAnchorAttestData [#transactionmarsanchorattestdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MarsAnchorAttestData { pub entry_did: String, pub attestation_hash: String, pub attester_did: String } ``` Source line: `3408`. ## transaction::StakeData [#transactionstakedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StakeData { /// Amount to stake in smallest SIGIL unit. pub amount: u64, /// Validator mode: "producer" (10K min) or "validator" (1K min). pub mode: ValidatorMode } ``` Source line: `3419`. ## transaction::ValidatorMode [#transactionvalidatormode] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ValidatorMode { /// Block Producer — executes + proves. Min 10,000 MINT. BlockProducer, /// Block Validator — verifies proofs only. Min 1,000 MINT. BlockValidator, } ``` Source line: `3427`. ## transaction::ValidatorMode::min\_stake [#transactionvalidatormodemin_stake] Minimum stake for this mode. ```rust pub fn min_stake(&self) -> u64; ``` Source line: `3436`. ## transaction::UnstakeData [#transactionunstakedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UnstakeData { /// Amount to unstake. Subject to 14-day unbonding period. pub amount: u64 } ``` Source line: `3445`. ## transaction::DelegateStakeData [#transactiondelegatestakedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegateStakeData { pub validator_did: String, pub amount: u64 } ``` Source line: `3451`. ## transaction::UndelegateStakeData [#transactionundelegatestakedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UndelegateStakeData { pub validator_did: String, pub shares: u64 } ``` Source line: `3457`. ## transaction::ClaimRewardsData [#transactionclaimrewardsdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ClaimRewardsData { /// Optional: claim from a specific epoch range. pub from_epoch: Option, pub to_epoch: Option } ``` Source line: `3463`. ## transaction::TransferData [#transactiontransferdata] Basic MINT transfer between accounts. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TransferData { /// Recipient's OAS DID. pub recipient_did: String, /// Amount in micro-MINT. pub amount: u64, /// Optional memo/reference. pub memo: Option } ``` Source line: `3471`. ## transaction::DexCreatePoolData [#transactiondexcreatepooldata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexCreatePoolData { pub asset_a: DexPoolAsset, pub asset_b: DexPoolAsset, pub amount_a_desired: u64, pub amount_b_desired: u64, pub fee_bps: u16, pub min_lp_shares: u64, pub expiration_height: Option } ``` Source line: `3485`. ## transaction::DexAddLiquidityData [#transactiondexaddliquiditydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexAddLiquidityData { pub pool_id: String, pub amount_a_desired: u64, pub amount_b_desired: u64, pub amount_a_min: u64, pub amount_b_min: u64, pub min_lp_shares: u64, pub expiration_height: Option } ``` Source line: `3496`. ## transaction::DexRemoveLiquidityData [#transactiondexremoveliquiditydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexRemoveLiquidityData { pub pool_id: String, pub lp_shares: u64, pub amount_a_min: u64, pub amount_b_min: u64, pub recipient_did: String, pub expiration_height: Option } ``` Source line: `3507`. ## transaction::DexSwapExactInData [#transactiondexswapexactindata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexSwapExactInData { pub pool_id: String, pub asset_in: DexPoolAsset, pub amount_in: u64, pub min_amount_out: u64, pub recipient_did: String, pub expiration_height: Option } ``` Source line: `3517`. ## transaction::DexSwapExactOutData [#transactiondexswapexactoutdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DexSwapExactOutData { pub pool_id: String, pub asset_out: DexPoolAsset, pub amount_out: u64, pub max_amount_in: u64, pub recipient_did: String, pub expiration_height: Option } ``` Source line: `3527`. ## transaction::CreateTreasuryData [#transactioncreatetreasurydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CreateTreasuryData { pub treasury_did: String, pub controller_did: String, pub accepted_token_ids: Vec, pub withdrawal_policy: ControlPolicy, pub distribution_policy: Option } ``` Source line: `3541`. ## transaction::DepositTreasuryData [#transactiondeposittreasurydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DepositTreasuryData { pub treasury_did: String, pub token_id: Option, pub amount: u128 } ``` Source line: `3550`. ## transaction::WithdrawTreasuryData [#transactionwithdrawtreasurydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WithdrawTreasuryData { pub treasury_did: String, pub token_id: Option, pub recipient_did: String, pub amount: u128, pub memo: Option } ``` Source line: `3557`. ## transaction::SetDistributionPolicyData [#transactionsetdistributionpolicydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SetDistributionPolicyData { pub treasury_did: String, pub distribution_policy: DistributionPolicy } ``` Source line: `3566`. ## transaction::DistributeRevenueData [#transactiondistributerevenuedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DistributeRevenueData { pub treasury_did: String, pub token_id: Option, pub amount: Option } ``` Source line: `3572`. ## transaction::CreateTokenClassData [#transactioncreatetokenclassdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CreateTokenClassData { pub token_id: String, pub ticker: String, pub decimals: u8, pub issuer_did: String, pub controller_did: String, pub supply_policy: SupplyPolicy, pub transfer_policy: Option, pub metadata_uri: Option } ``` Source line: `3579`. ## transaction::MintTokenData [#transactionminttokendata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MintTokenData { pub token_id: String, pub recipient_did: String, pub amount: u128 } ``` Source line: `3591`. ## transaction::BurnTokenData [#transactionburntokendata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BurnTokenData { pub token_id: String, pub owner_did: String, pub amount: u128 } ``` Source line: `3598`. ## transaction::TransferTokenData [#transactiontransfertokendata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TransferTokenData { pub token_id: String, pub recipient_did: String, pub amount: u128, pub memo: Option } ``` Source line: `3605`. ## transaction::SetTokenPolicyData [#transactionsettokenpolicydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SetTokenPolicyData { pub token_id: String, pub supply_policy: Option, pub transfer_policy: Option } ``` Source line: `3613`. ## transaction::CreateNftCollectionData [#transactioncreatenftcollectiondata] Data for creating a new NFT collection. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CreateNftCollectionData { /// Unique identifier for the new collection. pub collection_id: String, /// Human-readable collection name. pub name: String, /// Short symbol (ticker) for the collection (e.g. "BADGE"). pub symbol: String, /// Whether this collection holds standard or identity NFTs. pub kind: crate::nft::NftKind, /// DID of the issuing party. pub issuer_did: String, /// DID of the controlling party (may update policy). pub controller_did: String, /// Governance policy for this collection. pub policy: crate::nft::CollectionPolicy, /// Optional collection-level metadata URI. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option } ``` Source line: `3625`. ## transaction::MintNftData [#transactionmintnftdata] Data for minting a new NFT into a collection. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MintNftData { /// Target collection identifier. pub collection_id: String, /// Token ID to assign (must be unique within the collection). /// /// Serialized as a decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, /// DID of the initial token owner. pub recipient_did: String, /// Optional per-token metadata URI. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// Optional BLAKE3 hash of the canonical metadata document. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option, /// Override the collection's `default_locked` setting for this token. /// `None` inherits the collection default. #[serde(default, skip_serializing_if = "Option::is_none")] pub locked: Option, /// Override the collection's `default_burn_auth` for this token. /// `None` inherits the collection default. #[serde(default, skip_serializing_if = "Option::is_none")] pub burn_auth: Option, /// Identity binding — required when minting into an identity collection. #[serde(default, skip_serializing_if = "Option::is_none")] pub identity: Option } ``` Source line: `3647`. ## transaction::TransferNftData [#transactiontransfernftdata] Data for transferring an NFT between owners. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TransferNftData { /// Collection containing the token. pub collection_id: String, /// Token to transfer. /// /// Serialized as a decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, /// DID of the current owner (sender). pub from_did: String, /// DID of the new owner (recipient). pub to_did: String } ``` Source line: `3679`. ## transaction::BurnNftData [#transactionburnnftdata] Data for burning (destroying) an NFT. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BurnNftData { /// Collection containing the token. pub collection_id: String, /// Token to burn. /// /// Serialized as a decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, /// DID of the party authorizing the burn (must satisfy `burn_auth`). pub authorized_by: String } ``` Source line: `3696`. ## transaction::SetNftMetadataData [#transactionsetnftmetadatadata] Data for updating the metadata URI and/or hash of an NFT (ERC-4906). ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SetNftMetadataData { /// Collection containing the token. pub collection_id: String, /// Token whose metadata is being updated. /// /// Serialized as a decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, /// New metadata URI, or `None` to leave unchanged. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// New metadata hash, or `None` to leave unchanged. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option } ``` Source line: `3711`. ## transaction::VerifyIdentityNftData [#transactionverifyidentitynftdata] Data for advancing the verification level on an identity NFT. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VerifyIdentityNftData { /// Collection containing the identity token. pub collection_id: String, /// Token to verify. /// /// Serialized as a decimal string on the JSON wire for cross-language /// safety (JavaScript's Number type cannot represent u128 exactly). #[serde(with = "serde_helpers::string_u128")] pub token_id: u128, /// DID of the party performing verification (must be an authorized /// verifier). pub verifier_did: String, /// New verification level to set (must be >= current level). pub new_verification_level: u8, /// Optional human-readable note describing the verification. #[serde(default, skip_serializing_if = "Option::is_none")] pub note: Option } ``` Source line: `3730`. ## transaction::ContractKind [#transactioncontractkind] Agent contract kind. Identifies the role a deployed contract plays in an Organization Zone. ```rust #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ContractKind { /// Standalone agent contract (no parent org zone). #[default] Standalone, /// Module within an organization zone. OrgModule, /// Service contract exposed to other contracts. Service, /// Governance contract (proposal/voting policy). Governance, /// Treasury policy contract (controls org funds). TreasuryPolicy, /// Compute buyer contract (purchases compute via marketplace). ComputeBuyer, /// Model manager contract (owns/updates a model artifact). ModelManager, } ``` Source line: `3753`. ## transaction::ContractLicenseMetadata [#transactioncontractlicensemetadata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ContractLicenseMetadata { /// SPDX license expression or launch-governance approved custom label. pub license: String, /// Optional source artifact URI (IPFS, HTTPS, git tag, etc.). #[serde(default, skip_serializing_if = "Option::is_none")] pub source_uri: Option, /// Optional BLAKE3 hash of the source artifact or source bundle. #[serde(default, skip_serializing_if = "Option::is_none")] pub source_hash: Option, /// Optional audit report URI. #[serde(default, skip_serializing_if = "Option::is_none")] pub audit_uri: Option, /// Deterministic JSON metadata. Must not contain environment-derived data. #[serde(default)] pub metadata: serde_json::Value } ``` Source line: `3772`. ## transaction::RegisterContractCodeData [#transactionregistercontractcodedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RegisterContractCodeData { /// BLAKE3/Sigil hash of `code`. pub code_hash: SigilHash, /// WASM bytecode bytes. pub code: Vec, /// License/source/audit metadata persisted alongside the code hash. pub license_metadata: ContractLicenseMetadata } ``` Source line: `3790`. ## transaction::DeployContractData [#transactiondeploycontractdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DeployContractData { pub contract_did: String, pub controller_did: String, pub runtime: ContractRuntime, pub code_hash: String, pub init_args: serde_json::Value, pub upgrade_policy: ControlPolicy, pub revenue_account: Option, /// Optional Organization Zone the contract is deployed into. When /// `None`, the contract is treated as standalone (its own implicit /// zone keyed by `contract_did`). #[serde(default, skip_serializing_if = "Option::is_none")] pub zone_id: Option, /// Optional initial call-policy. When `None`, the upgrade_policy /// also gates calls until `SetContractPolicy` adjusts it. #[serde(default, skip_serializing_if = "Option::is_none")] pub call_policy: Option, /// Set of ANVIL host functions this contract is permitted to call. /// `None` means "deploy-time-default", which is the conservative set /// (state_get/set/delete + log + emit_event only). Capability-bearing /// host fns (`dispatch_compute`, `record_mandate_spend`, /// `send_zone_message`) must be explicitly listed. #[serde(default, skip_serializing_if = "Option::is_none")] pub allowed_host_functions: Option>, /// Contract kind tag (used by indexer/RPC). Defaults to `Standalone`. #[serde(default, skip_serializing_if = "Option::is_none")] pub contract_kind: Option, /// Opt-in flag required before a contract can be targeted by Vigils. #[serde(default)] pub accepts_vigil_callbacks: bool } ``` Source line: `3800`. ## transaction::CallContractData [#transactioncallcontractdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CallContractData { pub contract_did: String, pub function: String, pub args: serde_json::Value, pub app_did: Option, pub gas_budget: u64, /// Optional mandate id under which the call charges spend. Required /// for calls that invoke `dispatch_compute` or `record_mandate_spend`. #[serde(default, skip_serializing_if = "Option::is_none")] pub mandate_id: Option, /// Declared state reads for deterministic optimistic execution. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub read_set: Vec, /// Declared state writes for deterministic optimistic execution. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub write_set: Vec } ``` Source line: `3833`. ## transaction::UpgradeContractData [#transactionupgradecontractdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpgradeContractData { pub contract_did: String, pub new_code_hash: String, pub migration_args: serde_json::Value, /// Optional model-artifact upgrade — when present, must reference a /// settled `ComputeReceipt` whose model_commitment matches /// `new_model_commitment`. Enforced at executor. #[serde(default, skip_serializing_if = "Option::is_none")] pub model_receipt_id: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub new_model_commitment: Option } ``` Source line: `3852`. ## transaction::SetContractPolicyData [#transactionsetcontractpolicydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SetContractPolicyData { pub contract_did: String, pub upgrade_policy: Option, pub call_policy: Option, /// Optional update to the host-function allowlist. Only the /// controller can set this; reducing capabilities is always /// permitted, expanding requires upgrade_policy authorization. #[serde(default, skip_serializing_if = "Option::is_none")] pub allowed_host_functions: Option>, /// Optional update to the Vigils callback opt-in flag. #[serde(default, skip_serializing_if = "Option::is_none")] pub accepts_vigil_callbacks: Option } ``` Source line: `3866`. ## transaction::RegisterAppAgentData [#transactionregisterappagentdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RegisterAppAgentData { pub app_did: String, pub controller_did: String, pub public_keys: Vec, pub requested_permissions: Vec, pub allowed_contracts: Vec, pub allowed_token_ids: Vec, pub revenue_account: Option, pub metadata_uri: Option } ``` Source line: `3881`. ## transaction::GrantAppPermissionData [#transactiongrantapppermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GrantAppPermissionData { pub app_did: String, pub permissions: Vec, pub expires_at_epoch: Option } ``` Source line: `3893`. ## transaction::RevokeAppPermissionData [#transactionrevokeapppermissiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokeAppPermissionData { pub app_did: String, pub permissions: Vec } ``` Source line: `3900`. ## transaction::UpgradeAppAgentData [#transactionupgradeappagentdata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpgradeAppAgentData { pub app_did: String, pub metadata_uri: Option, pub requested_permissions: Option>, pub allowed_contracts: Option>, pub allowed_token_ids: Option> } ``` Source line: `3906`. ## transaction::ProposalType [#transactionproposaltype] Proposal types per spec. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ProposalType { ParameterChange, WasiModuleUpgrade, TreasurySpend, ValidatorSlashing, EmergencyAction, } ``` Source line: `3920`. ## transaction::ProposalType::threshold\_pct [#transactionproposaltypethreshold_pct] Approval threshold for this proposal type. ```rust pub fn threshold_pct(&self) -> u8; ``` Source line: `3930`. ## transaction::GovernanceProposeData [#transactiongovernanceproposedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GovernanceProposeData { pub proposal_type: ProposalType, pub title: String, pub description: String, pub payload: serde_json::Value, pub deposit: u64 } ``` Source line: `3942`. ## transaction::GovernanceVoteData [#transactiongovernancevotedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GovernanceVoteData { pub proposal_id: String, pub vote: VoteChoice } ``` Source line: `3951`. ## transaction::VoteChoice [#transactionvotechoice] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum VoteChoice { Yes, No, Abstain, NoWithVeto, } ``` Source line: `3957`. ## transaction::GovernanceExecuteData [#transactiongovernanceexecutedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GovernanceExecuteData { pub proposal_id: String } ``` Source line: `3965`. ## transaction::GovernanceCancelData [#transactiongovernancecanceldata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GovernanceCancelData { pub proposal_id: String } ``` Source line: `3970`. ## transaction::GovernanceEmergencyData [#transactiongovernanceemergencydata] ```rust #[cfg(feature = "governance")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GovernanceEmergencyData { pub action: String, pub justification: String, pub payload: serde_json::Value } ``` Source line: `3976`. ## transaction::DeployZoneData [#transactiondeployzonedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeployZoneData { /// Organization DID that owns the zone. pub org_did: String, /// WASM module hash to deploy. pub module_hash: String, /// Zone configuration. pub config: serde_json::Value } ``` Source line: `3987`. ## transaction::InvokeZoneData [#transactioninvokezonedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InvokeZoneData { pub zone_id: String, pub function: String, pub args: serde_json::Value, pub gas_budget: u64 } ``` Source line: `3997`. ## transaction::CommitStateData [#transactioncommitstatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CommitStateData { pub zone_id: String, pub state_root: String, pub state_changes: Vec } ``` Source line: `4005`. ## transaction::StateChange [#transactionstatechange] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StateChange { pub key: Vec, pub value: Option> } ``` Source line: `4012`. ## transaction::CrossZoneMessageData [#transactioncrosszonemessagedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CrossZoneMessageData { pub source_zone: String, pub target_zone: String, pub message: serde_json::Value } ``` Source line: `4018`. ## transaction::UpgradeModuleData [#transactionupgrademoduledata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UpgradeModuleData { pub zone_id: String, pub new_module_hash: String } ``` Source line: `4025`. ## transaction::RegisterWasiValidatorData [#transactionregisterwasivalidatordata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RegisterWasiValidatorData { /// Validator name (e.g. "oas-verify", "attestation-verify"). pub name: String, /// WASM module hash. pub module_hash: String, /// Which transaction categories this validator handles. pub categories: Vec } ``` Source line: `4031`. ## transaction::RemoveWasiValidatorData [#transactionremovewasivalidatordata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RemoveWasiValidatorData { pub name: String } ``` Source line: `4041`. ## transaction::ComputeProviderRegisterData [#transactioncomputeproviderregisterdata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeProviderRegisterData { /// Provider's OAS DID. pub provider_did: String, /// Stake amount. Tiers: Consumer 500, Professional 2K, Enterprise 5K, Cluster 10K. pub stake_amount: u64, /// Hardware attestation VC. pub hardware_attestation: serde_json::Value, /// Supported model types. pub supported_models: Vec, /// Pricing (tokens_in, tokens_out per token). pub pricing: ComputePricing, /// Optional human-root DID (HMR) anchoring this provider's lineage. /// Used for T2 redundant verification's distinct-root requirement. #[serde(default, skip_serializing_if = "Option::is_none")] pub human_root_did: Option, /// Optional ARISE / dispatch endpoint URL (gRPC or HTTPS). #[serde(default, skip_serializing_if = "Option::is_none")] pub endpoint_url: Option, /// Verification tiers this provider declares support for (T1/T2/T3). #[serde(default, skip_serializing_if = "Vec::is_empty")] pub verification_tiers: Vec, /// Free-form capability flags / hardware metadata (model families, GPU type, …). #[serde(default, skip_serializing_if = "Option::is_none")] pub capabilities: Option, /// Optional Ed25519 public key the provider uses to sign receipts. /// Required for settlement; providers without a registered key cannot /// settle receipts. #[serde(default, skip_serializing_if = "Option::is_none")] pub provider_pubkey: Option> } ``` Source line: `4051`. ## transaction::ComputePricing [#transactioncomputepricing] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputePricing { pub price_per_input_token: f64, pub price_per_output_token: f64, pub currency: String } ``` Source line: `4084`. ## transaction::ComputeProviderUpdateData [#transactioncomputeproviderupdatedata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeProviderUpdateData { pub provider_did: String, pub pricing: Option, pub supported_models: Option>, pub hardware_attestation: Option, /// Replace the dispatch endpoint URL. #[serde(default, skip_serializing_if = "Option::is_none")] pub endpoint_url: Option, /// Replace declared verification tiers. #[serde(default, skip_serializing_if = "Option::is_none")] pub verification_tiers: Option>, /// Replace capability metadata. #[serde(default, skip_serializing_if = "Option::is_none")] pub capabilities: Option, /// Rotate the provider's signing pubkey. #[serde(default, skip_serializing_if = "Option::is_none")] pub provider_pubkey: Option> } ``` Source line: `4092`. ## transaction::ComputeProviderRelayerData [#transactioncomputeproviderrelayerdata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeProviderRelayerData { pub provider_did: String, pub relayer_did: String } ``` Source line: `4113`. ## transaction::ComputeProviderExitData [#transactioncomputeproviderexitdata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeProviderExitData { pub provider_did: String } ``` Source line: `4120`. ## transaction::ComputeEscrowFundData [#transactioncomputeescrowfunddata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeEscrowFundData { /// Organization / agent / consumer DID owning the escrow. pub org_did: String, /// Amount to fund (micro-MINT). pub amount: u64, /// Optional mandate this escrow operates under (DAO / treasury policy). #[serde(default, skip_serializing_if = "Option::is_none")] pub mandate_id: Option, /// Optional budget cap (micro-MINT); enforced per-mandate or per-agent. #[serde(default, skip_serializing_if = "Option::is_none")] pub budget_limit: Option } ``` Source line: `4126`. ## transaction::ComputeEscrowWithdrawData [#transactioncomputeescrowwithdrawdata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeEscrowWithdrawData { pub org_did: String, pub amount: u64, /// Optional mandate scope. #[serde(default, skip_serializing_if = "Option::is_none")] pub mandate_id: Option } ``` Source line: `4141`. ## transaction::ComputeReceiptSettleData [#transactioncomputereceiptsettledata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeReceiptSettleData { /// The compute receipt to settle. pub receipt: ComputeReceipt } ``` Source line: `4151`. ## transaction::ComputeVerificationTier [#transactioncomputeverificationtier] Verification tier requested by a consumer or declared by a provider. Wire format mirrors `sigil_compute::VerificationTier` so the on-chain transaction surface and the off-chain dispatch types stay aligned. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(tag = "tier", rename_all = "snake_case")] pub enum ComputeVerificationTier { /// Optimistic: trust the provider receipt; rely on challenge window. T1Optimistic, /// Lumen: provider attaches a signed locality-sensitive inference /// commitment over sampled top-k hidden-state values. T15Lumen, /// Redundant: dispatch to `n_providers`; majority output wins. T2Redundant { /// Number of providers required to produce matching output. n_providers: u32, }, /// TEE: provider attaches a hardware attestation report. T3Tee, } ``` Source line: `4163`. ## transaction::ComputeEvidenceCommitment [#transactioncomputeevidencecommitment] Structurally validated commitments contained in a `ComputeReceipt`. At minimum a receipt commits to its input and output payload. All other fields are optional and used to support proof-of-compute over different runtimes (deterministic compute → hash comparison; AI/LLM → tool-trace + model commitments; high-value compute → TEE attestation). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeEvidenceCommitment { /// BLAKE3 hash of the input payload. pub input_commitment: SigilHash, /// BLAKE3 hash of the output payload. pub output_commitment: SigilHash, /// Optional commitment to runtime image / container digest. #[serde(default, skip_serializing_if = "Option::is_none")] pub runtime_commitment: Option, /// Optional commitment to executed code (script / binary digest). #[serde(default, skip_serializing_if = "Option::is_none")] pub code_commitment: Option, /// Optional commitment to the model used (weights digest / model ID hash). #[serde(default, skip_serializing_if = "Option::is_none")] pub model_commitment: Option, /// Optional commitment to the agent's tool-call trace. #[serde(default, skip_serializing_if = "Option::is_none")] pub tool_trace_commitment: Option } ``` Source line: `4186`. ## transaction::TeeAttestation [#transactionteeattestation] TEE attestation report metadata. Vendor-specific cryptographic verification is performed by `tee_verify` in `sigil-node` when the matching feature is enabled; in production builds without that feature, T3 settlement is rejected unconditionally. Phase 14a-2 added two optional, **additive** fields used by the SEV-SNP production-hardening path: * `generated_at_epoch`: chain epoch when the operator harvested the attestation report (SEV-SNP reports do not carry a timestamp). The verifier compares this against `now_epoch` and policy `max_attestation_age_epochs` for freshness. * `binding_nonce`: optional verifier-supplied nonce that must match bytes `[0x50..0x90]` (REPORT\_DATA, 64 bytes) inside a SEV-SNP report. The receipt-binding check (Phase 14a-2) compares this against a canonical 64-byte derivation of the receipt being settled. Both are `Option`-typed and `skip_serializing_if = Option::is_none`, so older clients that do not set them remain wire-compatible. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TeeAttestation { /// Vendor identifier ("intel-sgx-dcap", "amd-sev-snp", "intel-tdx", …). pub vendor: String, /// Vendor-specific format version. pub version: String, /// Hex-encoded measurement / quote payload. pub measurement: String, /// Vendor-specific signature blob (verified by future iterations). pub signature: Vec, /// Optional certificate chain for the attestation. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub cert_chain: Vec>, /// Phase 14a-2 — chain epoch when the report was harvested by the /// operator. Required by the SEV-SNP freshness check when /// `policy.sev_snp_trust_anchors.max_attestation_age_epochs` is set. #[serde(default, skip_serializing_if = "Option::is_none")] pub generated_at_epoch: Option, /// Phase 14a-2 — opaque 64-byte nonce that must match the report's /// REPORT_DATA field. Used by SEV-SNP to bind a report to a specific /// receipt (replay defence). Hex-encoded for wire form when present. #[serde(default, skip_serializing_if = "Option::is_none")] pub binding_nonce: Option } ``` Source line: `4227`. ## transaction::LumenTopKSample [#transactionlumentopksample] Quantized top-k values sampled from a model hidden-state/token window. Lumen keeps this intentionally quantized and integer-only so validators can replay commitment checks deterministically across hardware and OS targets. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LumenTopKSample { pub token_index: u32, pub quantized_topk: Vec } ``` Source line: `4257`. ## transaction::LumenAttestation [#transactionlumenattestation] Lumen inference attestation embedded in a compute receipt. The attestation binds job, model, prompt, output, sampled hidden-state values, declared precision, and provider authorship. Validators verify the digest and Ed25519 signature before settling a `T15Lumen` receipt. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LumenAttestation { pub version: u16, pub job_id: String, pub model_id: String, pub prompt_hash: SigilHash, pub output_hash: SigilHash, pub seed: u64, pub precision: String, pub sample_start_token: u32, pub token_count: u32, pub top_k: u16, pub samples: Vec, pub polynomial_digest: SigilHash, pub provider_pubkey: Vec, pub provider_signature: Vec } ``` Source line: `4269`. ## transaction::ComputeReceipt [#transactioncomputereceipt] On-chain compute receipt. Replaces the previous shallow form with proof-of-compute commitments and MACA-grade fields. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeReceipt { pub receipt_id: String, pub job_id: String, /// Optional sub-task identifier when a job is split into tasks. #[serde(default, skip_serializing_if = "Option::is_none")] pub task_id: Option, pub provider_did: String, pub consumer_did: String, /// Optional consumer-side agent identity (when an autonomous agent buys). #[serde(default, skip_serializing_if = "Option::is_none")] pub agent_did: Option, pub model_id: String, pub tokens_in: u64, pub tokens_out: u64, /// GPU-seconds consumed (0.0 for non-GPU jobs). #[serde(default)] pub gpu_seconds: f64, /// Cost in micro-MINT. pub cost: u64, pub latency_ms: u64, /// ISO 8601 start timestamp. pub started_at: String, /// ISO 8601 completion timestamp. pub completed_at: String, /// Verification tier this receipt is settled under. pub verification_tier: ComputeVerificationTier, /// Evidence commitments (input / output / runtime / code / model / tools). pub commitments: ComputeEvidenceCommitment, /// Optional TEE attestation (required when `verification_tier == T3Tee`). #[serde(default, skip_serializing_if = "Option::is_none")] pub tee_attestation: Option, /// Optional Lumen attestation (required when `verification_tier == T15Lumen`). #[serde(default, skip_serializing_if = "Option::is_none")] pub lumen_attestation: Option, /// Optional ACT / lineage authority context (JSON envelope). #[serde(default, skip_serializing_if = "Option::is_none")] pub authority_context: Option, /// Optional reference into the off-chain ARISE network (e.g. arise receipt id). #[serde(default, skip_serializing_if = "Option::is_none")] pub arise_receipt_ref: Option, /// BLAKE3 hash over all receipt fields except the signature itself. pub receipt_hash: SigilHash, /// Ed25519 signature over `receipt_hash`. pub receipt_signature: Vec, /// Public key matching `receipt_signature`. If absent, the executor falls /// back to the registered provider's pubkey. #[serde(default, skip_serializing_if = "Option::is_none")] pub signer_pubkey: Option>, /// Challenge window in epochs at settlement time. If `None`, the executor /// applies `ComputeParams.challenge_window_epochs`. #[serde(default, skip_serializing_if = "Option::is_none")] pub challenge_window_epochs: Option, /// Optional DAO context. #[serde(default, skip_serializing_if = "Option::is_none")] pub dao_did: Option, /// Optional mandate id. #[serde(default, skip_serializing_if = "Option::is_none")] pub mandate_id: Option } ``` Source line: `4290`. ## transaction::ComputeReceipt::compute\_receipt\_hash [#transactioncomputereceiptcompute_receipt_hash] Compute the canonical BLAKE3 hash over all fields except `receipt_hash` and `receipt_signature`. Field order is fixed and **must** match between provider and verifier. ```rust #[cfg(feature = "compute")] pub fn compute_receipt_hash(&self) -> SigilHash; ``` Source line: `4356`. ## transaction::ComputeReceipt::verify\_hash [#transactioncomputereceiptverify_hash] Returns true when the stored hash matches a recomputed hash. ```rust #[cfg(feature = "compute")] pub fn verify_hash(&self) -> bool; ``` Source line: `4425`. ## transaction::ComputeChallengeData [#transactioncomputechallengedata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeChallengeData { pub receipt_id: String, pub challenger_did: String, pub evidence: serde_json::Value, /// Optional explicit challenger deposit override (micro-MINT). #[serde(default, skip_serializing_if = "Option::is_none")] pub deposit: Option } ``` Source line: `4432`. ## transaction::ComputeChallengeResolveData [#transactioncomputechallengeresolvedata] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeChallengeResolveData { pub challenge_id: String, pub resolution: ChallengeResolution, pub arbitration_evidence: serde_json::Value, /// Optional reward share overrides; when absent the genesis policy applies. /// Must satisfy `0.0 <= each <= 1.0` and sum to `1.0` (validated semantically). #[serde(default, skip_serializing_if = "Option::is_none")] pub reward_shares: Option } ``` Source line: `4443`. ## transaction::ChallengeRewardShares [#transactionchallengerewardshares] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct ChallengeRewardShares { pub challenger: f64, pub arbitrators: f64, pub treasury: f64 } ``` Source line: `4455`. ## transaction::ChallengeResolution [#transactionchallengeresolution] Resolution outcome for a compute challenge. Replaces the earlier 2-variant enum with the resolution outcomes the design requires. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "outcome", rename_all = "snake_case")] pub enum ChallengeResolution { /// Challenge upheld — provider is slashed by `provider_slash` micro-MINT. ChallengeUpheld { provider_slash: u64 }, /// Challenge dismissed — challenger forfeits the configured deposit. ChallengeDismissed { challenger_forfeit: u64 }, /// Provider at fault — provider slashed and consumer refunded. ProviderFault { provider_slash: u64, consumer_refund: u64, }, /// Consumer at fault — challenger forfeits deposit and provider keeps payment. ConsumerFault { challenger_forfeit: u64 }, /// Inconclusive — partial refunds allowed. Inconclusive { refund_consumer: u64, return_challenger_deposit: bool, }, } ``` Source line: `4466`. ## transaction::AgentVerificationAttestation [#transactionagentverificationattestation] Agent-attested verification record for a `MacaWorkClaim`. A validator agent signs an attestation that is anchored on chain. Multiple validators may attest about the same work claim subject to the uniqueness rules in the MACA design (per `(work_id, validator_did)`; T2 also requires distinct provider DIDs and distinct human roots when known). ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AgentVerificationAttestation { /// `SigilHash::digest((work_id, validator_did))`. pub validation_id: SigilHash, /// Identifier of the work claim this attestation refers to. pub work_id: SigilHash, /// Validator agent's DID. pub validator_did: String, /// Validator role. pub validator_role: ValidatorRole, /// Validator outcome. pub outcome: ValidationOutcome, /// Optional independently produced output hash (T2 redundancy). #[serde(default, skip_serializing_if = "Option::is_none")] pub output_hash: Option, /// Free-form evidence payload. #[serde(default)] pub evidence: serde_json::Value, pub attested_at_epoch: u64, /// Ed25519 signature over the canonical encoding of the validation record. pub validator_signature: Vec, pub validator_pubkey: Vec } ``` Source line: `4497`. ## transaction::ValidatorRole [#transactionvalidatorrole] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ValidatorRole { Validator, Auditor, Sentinel, /// Phase 12: assembles open work claims into MACA epochs and finalises /// them once a quorum threshold of validator attestations is met. Proposer, /// Phase 12: publishes randomness used to seed proposer rotation / /// validator-set sampling for an epoch. Beacon, } ``` Source line: `4523`. ## transaction::ValidationOutcome [#transactionvalidationoutcome] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "outcome", rename_all = "snake_case")] pub enum ValidationOutcome { Agree, Disagree { reason: String }, Indeterminate { reason: String }, } ``` Source line: `4538`. ## transaction::StorageProofMetadata [#transactionstorageproofmetadata] Reserved fields for proof-of-storage. The current marketplace slice does not produce these via transactions; they are present so future `StorageReceiptSettle` / storage challenge transactions can be added without breaking existing consumers. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] pub struct StorageProofMetadata { #[serde(default, skip_serializing_if = "Option::is_none")] pub data_root: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub shard_root: Option, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub merkle_proof: Vec, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub challenge_nonce: Vec, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub challenge_response: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub storage_duration_epochs: Option, #[serde(default, skip_serializing_if = "Vec::is_empty")] pub retrieval_proof: Vec } ``` Source line: `4550`. ## transaction::MacaEpochState [#transactionmacaepochstate] Lifecycle state of a MACA epoch. Open — proposer has anchored the epoch + included work claims; validators and auditors may submit attestations. Sealed — proposer has stopped accepting new attestations (via the `MacaFinalizeEpoch` tx in this slice; in future this may be a time/height boundary). Quorum proofs are being aggregated. Finalized — quorum proofs persisted; epoch is immutable. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MacaEpochState { Open, Sealed, Finalized, } ``` Source line: `4582`. ## transaction::QuorumOutcome [#transactionquorumoutcome] Outcome of a MACA quorum proof — what the validator quorum agreed on for a single `MacaWorkClaim`. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "outcome", rename_all = "snake_case")] pub enum QuorumOutcome { /// `agreeing.len()` validators agreed on `output_hash`. The /// `agreeing` count must be `>= quorum_threshold`. Confirmed { output_hash: SigilHash }, /// Quorum disagreed (no single output hash reached the threshold) or /// every attestation explicitly disagreed. Rejected, /// Threshold not reached and no clear majority. Distinguished from /// Rejected so DAO/governance can choose between re-running and /// abandoning. Inconclusive, } ``` Source line: `4593`. ## transaction::MacaRegisterValidatorAgentData [#transactionmacaregistervalidatoragentdata] Register an agent that participates in MACA consensus. The agent's role gates which transactions it can submit (`Proposer` for `MacaProposeEpoch` / `MacaFinalizeEpoch`, `Beacon` for `MacaPublishBeacon`, `Validator`/`Auditor`/`Sentinel` for `MacaSubmitAttestation`). The `ComputePolicy` `proposer_dids` and `beacon_dids` allowlists are the final authority gate; this registration is the on-chain claim that an agent intends to operate in the named role. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaRegisterValidatorAgentData { pub agent_did: String, pub role: ValidatorRole, /// Optional human root the agent's lineage anchors to. #[serde(default, skip_serializing_if = "Option::is_none")] pub human_root_did: Option, /// Ed25519 verifying key the agent uses to sign attestations or /// epoch / beacon submissions. pub agent_pubkey: Vec, /// Free-form capability metadata (model families, hardware, etc.). #[serde(default, skip_serializing_if = "Option::is_none")] pub capabilities: Option } ``` Source line: `4616`. ## transaction::MacaPublishBeaconData [#transactionmacapublishbeacondata] A beacon agent publishes a randomness value for a specific MACA epoch. The value seeds proposer rotation and validator-set sampling. Beacon publication must be deterministic given the epoch; replays are idempotent on the `(epoch_id, beacon_did)` pair. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaPublishBeaconData { pub epoch_id: u64, pub beacon_did: String, /// 32-byte randomness output (e.g. VRF, hash of source block). pub beacon_value: SigilHash, /// Ed25519 signature over `(epoch_id || beacon_value)`. pub beacon_signature: Vec } ``` Source line: `4636`. ## transaction::MacaProposeEpochData [#transactionmacaproposeepochdata] A proposer rolls open `MacaWorkClaim`s into a new epoch. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaProposeEpochData { pub epoch_id: u64, pub proposer_did: String, /// Work claims (by `work_id`) included in this epoch. Must be unique /// and non-empty. The executor verifies each `work_id` references an /// existing settled receipt. pub included_work_ids: Vec, /// Block-height range the epoch covers (informational; replay-safe /// hashing folds these into the canonical epoch hash). pub start_block_height: u64, pub end_block_height: u64, /// Optional reference to the beacon value the proposer is committing /// against. If unset, the executor reads the latest beacon for the /// epoch (or fails if none exists). #[serde(default, skip_serializing_if = "Option::is_none")] pub beacon_value: Option, /// Ed25519 signature over the canonical epoch hash. pub proposer_signature: Vec } ``` Source line: `4648`. ## transaction::MacaSubmitAttestationData [#transactionmacasubmitattestationdata] A validator/auditor submits an attestation against a `MacaWorkClaim` included in an open epoch. The attestation carries the same shape as the off-chain `AgentVerificationAttestation` so existing tooling can be reused, plus an `epoch_id` so the executor can dedupe and aggregate per-epoch. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaSubmitAttestationData { pub epoch_id: u64, pub attestation: AgentVerificationAttestation } ``` Source line: `4675`. ## transaction::MacaFinalizeEpochData [#transactionmacafinalizeepochdata] Finalize an open MACA epoch: aggregate per-work attestations into `MacaQuorumProof` records and seal the epoch. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaFinalizeEpochData { pub epoch_id: u64, pub finalizer_did: String, /// Optional override of the policy quorum threshold for this epoch. /// Only honoured when the override is `>= policy.validator_quorum_threshold` /// (cannot weaken the policy). #[serde(default, skip_serializing_if = "Option::is_none")] pub quorum_threshold_override: Option } ``` Source line: `4684`. ## transaction::TowerRegisterValidatorData [#transactiontowerregistervalidatordata] Register a new validator on the Tower coordination chain. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerRegisterValidatorData { /// Validator's OAS DID. pub validator_did: String, /// Validator mode (BlockProducer or BlockValidator). pub mode: ValidatorMode, /// Initial stake amount. pub stake_amount: u64, /// Geographic region code (ISO 3166-1 alpha-2). pub geographic_region: String, /// Human root DID that this validator is lineage-derived from. pub human_root_did: Option, /// Ed25519 public key for Tower consensus signing. pub consensus_public_key: Vec } ``` Source line: `4697`. ## transaction::TowerUpdateValidatorData [#transactiontowerupdatevalidatordata] Update Tower validator metadata (region, key rotation, etc.). ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerUpdateValidatorData { pub validator_did: String, pub geographic_region: Option, pub consensus_public_key: Option> } ``` Source line: `4715`. ## transaction::TowerExitValidatorData [#transactiontowerexitvalidatordata] Exit as a Tower validator (begins unbonding/cooldown). ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerExitValidatorData { pub validator_did: String } ``` Source line: `4724`. ## transaction::TowerSubmitEvidenceData [#transactiontowersubmitevidencedata] Submit slashing evidence to the Tower Committee for adjudication. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TowerSubmitEvidenceData { /// The type of evidence (e.g. "double_sign", "downtime", "invalid_block"). pub evidence_type: String, /// The accused validator's DID. pub accused_validator_did: String, /// Serialized evidence payload (varies by type). pub evidence: serde_json::Value, /// Slot at which the alleged offense occurred. pub offense_slot: u64, /// Validator witness signatures over the canonical evidence hash. #[serde(default)] pub witness_signatures: Vec<(String, Vec)> } ``` Source line: `4731`. ## transaction::TowerFinalityVoteData [#transactiontowerfinalityvotedata] Cast a Casper FFG finality vote. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerFinalityVoteData { /// Source epoch (previously justified). pub source_epoch: u64, /// Target epoch (being voted to justify). pub target_epoch: u64, /// Block hash at the target epoch boundary. pub target_block_hash: String, /// Ed25519 signature over (source_epoch || target_epoch || target_block_hash). pub signature: Vec } ``` Source line: `4748`. ## transaction::TowerDelegateStakeData [#transactiontowerdelegatestakedata] Delegate stake to a Tower validator. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerDelegateStakeData { pub validator_did: String, pub amount: u64 } ``` Source line: `4762`. ## transaction::TowerClaimRewardsData [#transactiontowerclaimrewardsdata] Claim Tower-specific validator rewards. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerClaimRewardsData { pub from_epoch: Option, pub to_epoch: Option } ``` Source line: `4770`. ## transaction::CzacChannelOpenData [#transactionczacchannelopendata] Open a CZAC cross-zone communication channel on-consensus. ```rust #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacChannelOpenData { /// Unique channel identifier. pub channel_id: String, /// Initiator's OAS DID. pub initiator_did: String, /// Counterparty's OAS DID. pub counterparty_did: String, /// Channel type: "ephemeral", "persistent", "broadcast", "payment". pub channel_type: String, /// Escrow amount for payment channels (0 for non-payment). pub escrow_amount: u64, /// Zone routing metadata. pub source_zone: String, /// Target zone. pub target_zone: String } ``` Source line: `4782`. ## transaction::CzacChannelCloseData [#transactionczacchannelclosedata] Close a CZAC channel cooperatively. ```rust #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacChannelCloseData { pub channel_id: String, /// Final balance for the initiator (payment channels only). pub initiator_balance: u64, /// Final balance for the counterparty (payment channels only). pub counterparty_balance: u64, /// Cooperative close signature from both parties. pub close_signature: Vec } ``` Source line: `4802`. ## transaction::CzacChannelSettleData [#transactionczacchannelsettledata] Settle a closed CZAC channel on-consensus. ```rust #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacChannelSettleData { pub channel_id: String, /// Sequence number of the latest balance proof. pub sequence: u64, /// Final settlement amounts. pub initiator_gets: u64, pub counterparty_gets: u64 } ``` Source line: `4815`. ## transaction::CzacPaymentChannelDisputeData [#transactionczacpaymentchanneldisputedata] Dispute a CZAC payment channel by submitting a newer balance proof. ```rust #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacPaymentChannelDisputeData { pub channel_id: String, /// The disputer's DID. pub disputer_did: String, /// The sequence number of the newer balance proof. pub proof_sequence: u64, /// Balance proof: initiator balance. pub initiator_balance: u64, /// Balance proof: counterparty balance. pub counterparty_balance: u64, /// Signatures from both parties on this balance proof. pub proof_signatures: Vec> } ``` Source line: `4827`. ## transaction::GalAnchorEntryData [#transactiongalanchorentrydata] Anchor a new entry in the Global Anchor Layer (MARS-S sharding). ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalAnchorEntryData { /// The GAL entry type (e.g. "hmr_anchor", "mhr_anchor", "org_lineage_root"). pub entry_type: String, /// The DID being anchored. pub subject_did: String, /// Content hash of the full entry data. pub content_hash: String, /// Shard assignment for this entry. pub shard_id: Option } ``` Source line: `4848`. ## transaction::GalUpdateEntryData [#transactiongalupdateentrydata] Update an existing GAL entry. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalUpdateEntryData { pub subject_did: String, pub new_content_hash: String, pub sequence: u64 } ``` Source line: `4862`. ## transaction::GalRevokeEntryData [#transactiongalrevokeentrydata] Revoke a GAL entry (marks as revoked in the Global Anchor Layer). ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalRevokeEntryData { pub subject_did: String, pub reason: String } ``` Source line: `4871`. ## transaction::GalAssignShardData [#transactiongalassignsharddata] Assign an entry to a specific shard in the MARS-S topology. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalAssignShardData { pub entry_did: String, pub shard_id: String, pub affinity_type: String } ``` Source line: `4879`. ## transaction::GalUpdateTopologyData [#transactiongalupdatetopologydata] Update the shard topology map on-consensus. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GalUpdateTopologyData { pub shard_id: String, /// Operation: "add", "remove", "split", "merge", "migrate". pub operation: String, /// Topology change payload (varies by operation). pub payload: serde_json::Value } ``` Source line: `4888`. ## transaction::NovaClaimParcelData [#transactionnovaclaimparceldata] Claim a land parcel in the Nova metaverse. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaClaimParcelData { /// World ID. pub world_id: String, /// Parcel coordinates (region_x, region_z, local_x, local_z). pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16, /// Parcel type: "residential", "commercial", "public". pub parcel_type: String } ``` Source line: `4903`. ## transaction::NovaTransferParcelData [#transactionnovatransferparceldata] Transfer a Nova land parcel to a new owner. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaTransferParcelData { pub world_id: String, pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16, /// Recipient DID. pub to_did: String } ``` Source line: `4918`. ## transaction::NovaDeployBuildingData [#transactionnovadeploybuildingdata] Deploy a building on a Nova parcel. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaDeployBuildingData { /// Unique building ID. pub building_id: String, /// MARS DID of the 3D asset (GLTF model bundle). pub asset_did: String, /// Parcel on which to deploy. pub world_id: String, pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16, /// Polygon count (for fee calculation). pub polycount: u32 } ``` Source line: `4931`. ## transaction::NovaRemoveBuildingData [#transactionnovaremovebuildingdata] Remove a building from a Nova parcel. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaRemoveBuildingData { pub building_id: String } ``` Source line: `4949`. ## transaction::NovaUpdateAvatarData [#transactionnovaupdateavatardata] Update avatar state in the Nova world. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NovaUpdateAvatarData { pub world_id: String, /// Position as (x, y, z). pub position: [f64; 3], /// Rotation as (yaw, pitch, roll) in radians. pub rotation: [f32; 3], /// Animation state: "idle", "walking", "running", "sitting", etc. pub animation_state: String, /// Presence: "online", "away", "busy", "offline". pub presence: String } ``` Source line: `4956`. ## transaction::NovaCreateWorldData [#transactionnovacreateworlddata] Create a new Nova world instance. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NovaCreateWorldData { pub name: String, /// World configuration as JSON. pub config: serde_json::Value } ``` Source line: `4971`. ## transaction::NovaCreateAuctionData [#transactionnovacreateauctiondata] Open a seller-owned Nova land auction. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaCreateAuctionData { pub world_id: String, pub region_x: i32, pub region_z: i32, pub local_x: u16, pub local_z: u16, pub reserve_amount: u64, pub closes_at_height: u64 } ``` Source line: `4980`. ## transaction::NovaAuctionBidData [#transactionnovaauctionbiddata] Place a bid on a Nova land auction. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaAuctionBidData { /// Auction ID. pub auction_id: String, /// Bid amount in SIGIL. pub amount: u64 } ``` Source line: `4993`. ## transaction::NovaSettleAuctionData [#transactionnovasettleauctiondata] Settle a closed Nova land auction. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaSettleAuctionData { pub auction_id: String } ``` Source line: `5003`. ## transaction::NovaSetZonePermissionsData [#transactionnovasetzonepermissionsdata] Set permissions on a Nova spatial zone. ```rust #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NovaSetZonePermissionsData { pub zone_id: String, /// Access level for entry: "public", "members", "owner", "deny". pub enter: String, /// Access level for interaction. pub interact: String, /// Access level for building. pub build: String } ``` Source line: `5010`. ## transaction::RegisterDaoData [#transactionregisterdaodata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RegisterDaoData { pub dao_did: String, pub controller_policy: ControlPolicy, pub governance_policy: GovernancePolicy, pub treasuries: Vec, pub default_token_id: Option, pub hiring_policy: HiringPolicy, pub metadata_commitment: Option } ``` Source line: `5025`. ## transaction::UpdateDaoPolicyData [#transactionupdatedaopolicydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UpdateDaoPolicyData { pub dao_did: String, pub new_controller_policy: Option, pub new_governance_policy: Option, pub new_hiring_policy: Option, pub reason: Option } ``` Source line: `5036`. ## transaction::IssueMandateData [#transactionissuemandatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IssueMandateData { pub mandate_id: String, pub issuer_did: String, pub authorized_actor_did: String, pub scope: MandateScope, pub budget: MandateBudget, pub token_id: String, pub spend_limits: SpendLimits, pub allowed_counterparties: AllowedCounterparties, pub milestone_policy: MilestonePolicy, pub approval_policy: ApprovalPolicy, pub dispute_policy: DisputePolicy, pub revocation_policy: RevocationPolicy, pub reputation_impact: ReputationImpactPolicy, pub revenue_share: Option, pub delegation_policy: DelegationPolicy, pub expires_at_epoch: Option } ``` Source line: `5049`. ## transaction::UpdateMandateData [#transactionupdatemandatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UpdateMandateData { pub mandate_id: String, pub new_budget_total: Option, pub new_scope: Option, pub new_spend_limits: Option, pub new_expires_at_epoch: Option, pub new_allowed_counterparties: Option, pub reason: Option } ``` Source line: `5069`. ## transaction::RevokeMandateData [#transactionrevokemandatedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RevokeMandateData { pub mandate_id: String, pub reason: String, /// Block height after which the revocation takes effect (None = immediate). pub effective_block: Option } ``` Source line: `5080`. ## transaction::RecordMandateSpendData [#transactionrecordmandatespenddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RecordMandateSpendData { pub mandate_id: String, pub spent_amount: u128, pub spend_nonce: u64, pub linked_transaction_hash: String, pub epoch: u64 } ``` Source line: `5088`. ## transaction::PostLaborJobData [#transactionpostlaborjobdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PostLaborJobData { pub job_id: String, pub poster_did: String, pub posting_mandate_id: Option, pub title_commitment: String, pub description_commitment: String, pub category: String, pub required_skills: Vec, pub required_attestations: Vec, pub budget_token_id: String, pub budget_amount: u128, pub milestone_plan: MilestonePlan, pub escrow_policy: EscrowPolicy, pub counterparty_filter: CounterpartyFilter, pub deadline_epoch: Option } ``` Source line: `5101`. ## transaction::CancelLaborJobData [#transactioncancellaborjobdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CancelLaborJobData { pub job_id: String, pub reason: String } ``` Source line: `5119`. ## transaction::SubmitLaborBidData [#transactionsubmitlaborbiddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SubmitLaborBidData { pub bid_id: String, pub job_id: String, pub bidder_did: String, pub bidder_kind: BidderKind, pub proposed_price: u128, pub proposed_token_id: String, pub estimated_duration_seconds: u64, pub mandate_id_for_work: Option, pub capabilities_proof_commitment: String } ``` Source line: `5125`. ## transaction::WithdrawLaborBidData [#transactionwithdrawlaborbiddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WithdrawLaborBidData { pub bid_id: String, pub reason: Option } ``` Source line: `5138`. ## transaction::AcceptLaborBidData [#transactionacceptlaborbiddata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AcceptLaborBidData { pub bid_id: String, pub job_id: String, pub accepting_mandate_id: Option } ``` Source line: `5144`. ## transaction::CreateLaborContractData [#transactioncreatelaborcontractdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CreateLaborContractData { pub contract_id: String, pub job_id: String, pub bid_id: String, pub employer_did: String, pub worker_did: String, pub employer_mandate_id: Option, pub worker_mandate_id: Option, pub token_id: String, pub total_amount: u128, pub escrow_account_did: String, pub milestones: Vec, pub milestone_policy: MilestonePolicy, pub attestation_policy: AttestationPolicy, pub dispute_policy: DisputePolicy, pub reputation_impact: ReputationImpactPolicy, pub revenue_share: Option, pub royalty_recipients: Vec } ``` Source line: `5151`. ## transaction::FundLaborEscrowData [#transactionfundlaborescrowdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct FundLaborEscrowData { pub contract_id: String, pub funding_treasury_did: String, pub funding_mandate_id: Option, pub amount: u128 } ``` Source line: `5172`. ## transaction::LaborOpenOfferData [#transactionlaboropenofferdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborOpenOfferData { pub offer_id: String, pub sponsor_did: String, pub posting_mandate_id: Option, pub title_commitment: String, pub description_commitment: String, pub category: String, pub capability_spec: CapabilitySpec, pub token_id: String, pub total_funding: u128, pub per_claim_payout_cap: u128, pub claim_bond: u128, pub spam_fee: u128, pub max_claims: u32, pub claim_window_start_block: u64, pub claim_window_end_block: u64, pub claim_timeout_blocks: u64, pub verification_mode: VerificationMode, pub escrow_account_did: String } ``` Source line: `5180`. ## transaction::LaborSubmitClaimData [#transactionlaborsubmitclaimdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborSubmitClaimData { pub claim_id: String, pub offer_id: String, pub claimant_did: String, pub deliverable_hash: String, pub evidence_hashes: Vec, pub requested_payout: u128 } ``` Source line: `5202`. ## transaction::LaborAttestClaimData [#transactionlaborattestclaimdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborAttestClaimData { pub attestation_id: String, pub claim_id: String, pub offer_id: String, pub attester_did: String, pub verdict: AttestationVerdict, pub reason_commitment: Option, /// Required when the offer verification mode is `LumenAttested`. /// /// The executor verifies this against the submitted claim's /// `deliverable_hash`, the offer's Lumen registry/model id, and the /// attestation's provider signature before any payout can settle. #[cfg(feature = "compute")] #[serde(default, skip_serializing_if = "Option::is_none")] pub lumen_attestation: Option } ``` Source line: `5212`. ## transaction::LaborCancelOfferData [#transactionlaborcancelofferdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LaborCancelOfferData { pub offer_id: String, pub sponsor_did: String, pub reason: Option } ``` Source line: `5230`. ## transaction::SubmitDeliverableData [#transactionsubmitdeliverabledata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SubmitDeliverableData { pub deliverable_id: String, pub contract_id: String, pub milestone_index: u32, pub payload_hash: String, pub submitted_by_did: String } ``` Source line: `5237`. ## transaction::AttestMilestoneData [#transactionattestmilestonedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AttestMilestoneData { pub attestation_id: String, pub contract_id: String, pub milestone_index: u32, pub attester_did: String, pub attester_kind: AttesterKind, pub verdict: AttestationVerdict, pub reason_commitment: Option } ``` Source line: `5246`. ## transaction::ReleaseMilestonePaymentData [#transactionreleasemilestonepaymentdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReleaseMilestonePaymentData { pub contract_id: String, pub milestone_index: u32, pub releasing_mandate_id: Option } ``` Source line: `5257`. ## transaction::RaiseLaborDisputeData [#transactionraiselabordisputedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RaiseLaborDisputeData { pub dispute_id: String, pub contract_id: String, pub raiser_did: String, pub cause: DisputeCause, pub evidence_hashes: Vec } ``` Source line: `5264`. ## transaction::ResolveLaborDisputeData [#transactionresolvelabordisputedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ResolveLaborDisputeData { pub dispute_id: String, pub resolver_did: String, pub resolution: DisputeResolution, pub reason_commitment: Option } ``` Source line: `5273`. ## transaction::SubmitLaborReviewData [#transactionsubmitlaborreviewdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SubmitLaborReviewData { pub review_id: String, pub contract_id: String, pub reviewer_did: String, pub subject_did: String, pub score: u8, pub commentary_hash: String } ``` Source line: `5281`. ## transaction::TrainVerifierMode [#transactiontrainverifiermode] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TrainVerifierMode { CoordinatorSigned, CommitmentOnly, Redundant, Tee, Zk, } ``` Source line: `5296`. ## transaction::TrainRolloutPolicyData [#transactiontrainrolloutpolicydata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainRolloutPolicyData { pub version: u32, pub verifier_mode: TrainVerifierMode, pub max_staleness_epochs: u64, pub min_verifier_attestations: u32, pub allow_commitment_only: bool } ``` Source line: `5305`. ## transaction::TrainOpenData [#transactiontrainopendata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainOpenData { pub run_id: String, pub coordinator_did: String, pub reward_token_id: String, pub reward_pool: u64, pub model_family: String, pub objective_commitment: ArtifactCommitment, pub policy: TrainRolloutPolicyData, #[serde(default)] pub eligible_verifier_dids: Vec, #[serde(default)] pub authorized_publishers: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub deadline_epoch: Option } ``` Source line: `5314`. ## transaction::TrainRolloutBatchMetadataData [#transactiontrainrolloutbatchmetadatadata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainRolloutBatchMetadataData { pub environment_commitment: ArtifactCommitment, pub policy_digest: SigilHash, pub rollout_root: SigilHash, pub metrics_root: SigilHash } ``` Source line: `5331`. ## transaction::TrainRolloutBatchCommitData [#transactiontrainrolloutbatchcommitdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainRolloutBatchCommitData { pub run_id: String, pub batch_id: String, pub policy_version: u32, pub artifact: ArtifactCommitment, pub sample_count: u64, pub total_reward: u64, pub committed_by_did: String, pub committed_at_epoch: u64, pub verifier_mode: TrainVerifierMode, pub metadata: TrainRolloutBatchMetadataData } ``` Source line: `5339`. ## transaction::TrainRewardPayoutData [#transactiontrainrewardpayoutdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainRewardPayoutData { pub recipient_did: String, pub amount: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub generation: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub lineage_parent_did: Option } ``` Source line: `5353`. ## transaction::TrainRewardBatchAttestData [#transactiontrainrewardbatchattestdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainRewardBatchAttestData { pub attestation_id: String, pub run_id: String, pub rollout_batch_id: String, pub verifier_did: String, pub policy_version: u32, #[serde(default)] pub payouts: Vec, pub artifact: ArtifactCommitment, pub attested_at_epoch: u64 } ``` Source line: `5363`. ## transaction::TrainWeightsPublishData [#transactiontrainweightspublishdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainWeightsPublishData { pub run_id: String, pub model_root: SigilHash, pub artifact: ArtifactCommitment, #[serde(default, skip_serializing_if = "Option::is_none")] pub previous_root: Option, pub publisher_did: String, pub published_at_epoch: u64, #[serde(default, skip_serializing_if = "Option::is_none")] pub rollout_batch_id: Option } ``` Source line: `5376`. ## transaction::TrainSlashReason [#transactiontrainslashreason] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TrainSlashReason { InvalidCommitment, StaleRollout, PolicyViolation, Equivocation, InvalidWeights, FalseAttestation, } ``` Source line: `5390`. ## transaction::TrainSlashData [#transactiontrainslashdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainSlashData { pub slash_id: String, pub run_id: String, pub offender_did: String, pub reporter_did: String, pub reason: TrainSlashReason, pub evidence: ArtifactCommitment, pub amount: u64, pub slashed_at_epoch: u64 } ``` Source line: `5400`. ## transaction::TrainCloseReason [#transactiontrainclosereason] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TrainCloseReason { Completed, Expired, Cancelled, } ``` Source line: `5413`. ## transaction::TrainCloseData [#transactiontrainclosedata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TrainCloseData { pub run_id: String, pub reason: TrainCloseReason } ``` Source line: `5420`. # sigil-core · username URL: https://docs.sigil.ml/reference/rust/sigil-core/username Markdown: https://docs.sigil.ml/reference/rust/sigil-core/username.md Source declarations, signatures and documentation for username. Source: `sigil/node/sigil-core/src/username.rs`. SHA-256: `4eca3b9cc5d5053b105d7df8f518f077856eeffe91e6b604dddb8b726f4fab60`. 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. ## username::USERNAME\_MAX\_LEN [#usernameusername_max_len] Maximum length of a username. ```rust pub const USERNAME_MAX_LEN: usize; ``` Source line: `19`. ## username::USERNAME\_MIN\_LEN [#usernameusername_min_len] Minimum length of a username (charset rejects shorter strings entirely). ```rust pub const USERNAME_MIN_LEN: usize; ``` Source line: `22`. ## username::RESERVED\_GENESIS\_USERNAMES [#usernamereserved_genesis_usernames] Reserved short genesis handles assigned by the signed recipient manifest. These names remain invalid for ordinary public registration; they can only appear in genesis/import paths that explicitly call `validate_genesis_username`. ```rust pub const RESERVED_GENESIS_USERNAMES: &[&str]; ``` Source line: `27`. ## username::USERNAME\_MAX\_LEASE\_YEARS [#usernameusername_max_lease_years] Maximum lease duration (years) at registration / renewal. ```rust pub const USERNAME_MAX_LEASE_YEARS: u32; ``` Source line: `30`. ## username::DEFAULT\_PRICE\_3\_CHAR [#usernamedefault_price_3_char] Default per-tier annual lease price (in MINT for mainnet, BITS for canary). Governance can adjust the global multiplier (`price_multiplier_bps`); see `UsernameParams::price_multiplier_bps`. ```rust pub const DEFAULT_PRICE_3_CHAR: u128; ``` Source line: `36`. ## username::DEFAULT\_PRICE\_4\_CHAR [#usernamedefault_price_4_char] ```rust pub const DEFAULT_PRICE_4_CHAR: u128; ``` Source line: `37`. ## username::DEFAULT\_PRICE\_5\_CHAR [#usernamedefault_price_5_char] ```rust pub const DEFAULT_PRICE_5_CHAR: u128; ``` Source line: `38`. ## username::DEFAULT\_PRICE\_6\_PLUS\_CHAR [#usernamedefault_price_6_plus_char] ```rust pub const DEFAULT_PRICE_6_PLUS_CHAR: u128; ``` Source line: `39`. ## username::UsernameRecord [#usernameusernamerecord] On-chain record for a registered username. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameRecord { /// Canonical (lowercased, ASCII-validated) username. pub name: String, /// DID of the current owner. pub owner_did: String, /// Block height at registration. pub registered_at_height: u64, /// Block height at which the lease expires. pub expires_at_height: u64, /// Optional content hash of off-chain metadata (avatar, profile). pub metadata_cid: Option, /// Set if this name is in the genesis-pinned reserved list. pub is_reserved: bool, /// Set while a `RaiseUsernameDispute` is pending resolution. pub is_disputed: bool } ``` Source line: `43`. ## username::ReverseUsernameRecord [#usernamereverseusernamerecord] Reverse-lookup index entry: DID -> primary username. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReverseUsernameRecord { pub did: String, pub primary: String } ``` Source line: `62`. ## username::UsernameParams [#usernameusernameparams] Genesis-time username system parameters. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameParams { /// Whether the username feature is enabled at genesis. pub enabled: bool, /// Approximate blocks per year (used for lease term computation). pub blocks_per_year: u64, /// Per-length-tier annual lease price in base units. pub price_3_char: u128, pub price_4_char: u128, pub price_5_char: u128, pub price_6_plus_char: u128, /// Global price multiplier in basis points (10000 = 1.0x). /// Governance-adjustable with a 90-day timelock. pub price_multiplier_bps: u32, /// Maximum lease duration in years. pub max_lease_years: u32, /// Reserved list (cannot be registered without governance). pub reserved: Vec, /// DID of the dispute-resolver multisig. pub dispute_multisig_did: String, /// DID of the appellate dispute multisig. pub appeal_multisig_did: String, /// Filing fee for raising a dispute (in base units). pub dispute_filing_fee: u128, /// Filing fee for appealing a dispute (in base units). pub dispute_appeal_fee: u128, /// Members of the primary dispute multisig (DID + Ed25519 pubkey). /// Empty list disables dispute resolution (fail-closed). #[serde(default)] pub dispute_multisig_signers: Vec, /// Number of valid signatures required to resolve a dispute. /// `dispute_multisig_signers.len() >= dispute_multisig_threshold` MUST /// hold for genesis to be valid. #[serde(default)] pub dispute_multisig_threshold: u32 } ``` Source line: `69`. ## username::DisputeSignerEntry [#usernamedisputesignerentry] One member of the dispute multisig. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DisputeSignerEntry { pub signer_did: String, /// 32-byte Ed25519 public key, hex-encoded (no `0x` prefix). pub public_key_hex: String } ``` Source line: `107`. ## username::validate\_username [#usernamevalidate_username] Validate a username against the v1 charset and length rules. Returns `Ok(canonicalized)` (lowercased copy) if valid, or an error. ```rust pub fn validate_username(input: &str) -> Result; ``` Source line: `138`. ## username::validate\_genesis\_username [#usernamevalidate_genesis_username] Validate a username for a signed genesis/import bundle. Ordinary registration still uses `validate_username` and rejects names shorter than `USERNAME_MIN_LEN`. This function admits only the explicit launch-reserved exceptions from `RESERVED_GENESIS_USERNAMES`. ```rust pub fn validate_genesis_username(input: &str) -> Result; ``` Source line: `165`. ## username::compute\_lease\_price [#usernamecompute_lease_price] Compute the lease price in base units for a given username and number of years. Returns an error if the username is invalid or the year count is out of range. Multiplies the per-year tier price by `years`, then by `price_multiplier_bps / 10000`. Saturates on overflow (the chain will not silently roll over). ```rust pub fn compute_lease_price( canonical_name: &str, years: u32, params: &UsernameParams, ) -> Result; ``` Source line: `186`. ## username::RegisterUsernameData [#usernameregisterusernamedata] Register a new username for `years` years. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RegisterUsernameData { /// Username (will be canonicalized at executor time). pub name: String, /// DID of the new owner. pub owner_did: String, /// Number of years to prepay (1..=`max_lease_years`). pub years: u32, /// Optional metadata content hash to set at registration. pub metadata_cid: Option } ``` Source line: `220`. ## username::TransferUsernameData [#usernametransferusernamedata] Transfer ownership of a username to a new DID. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TransferUsernameData { pub name: String, pub new_owner_did: String } ``` Source line: `233`. ## username::ReleaseUsernameData [#usernamereleaseusernamedata] Release a username (current owner gives it up before lease expiry, or anyone after expiry for non-reserved names). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ReleaseUsernameData { pub name: String } ``` Source line: `241`. ## username::SetUsernameMetadataData [#usernamesetusernamemetadatadata] Set or clear the off-chain metadata content hash for a username. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SetUsernameMetadataData { pub name: String, pub metadata_cid: Option } ``` Source line: `247`. ## username::SetReverseUsernameData [#usernamesetreverseusernamedata] Designate which of an owner's usernames is the primary reverse-lookup target. A DID may own many usernames; only one is "primary" for `sigil_lookupUsername(did)`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SetReverseUsernameData { pub did: String, pub primary: String } ``` Source line: `256`. ## username::AuctionStatus [#usernameauctionstatus] Status of a `UsernameAuction`. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum AuctionStatus { /// Bidding is still open. The auction will close after /// `auction_anti_snipe_blocks` of silence past `closes_at_height`. Open, /// A winner has been determined; escrow has been settled and the /// username has been registered to the winning bidder. Settled, } ``` Source line: `274`. ## username::UsernameAuction [#usernameusernameauction] On-chain record for a single premium-name auction. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameAuction { /// Canonical name being auctioned (lower-cased ASCII). pub name: String, /// Block at which bidding opened. pub opened_at_height: u64, /// Earliest block at which the auction may finalize. Pushed forward by /// `auction_anti_snipe_blocks` whenever a new bid lands within the /// anti-snipe window. pub closes_at_height: u64, /// Current high bid in base units (None if no bid yet). pub current_bid: Option, /// DID of the current high bidder (None if no bid yet). pub current_bidder: Option, /// Total number of bids received. Used for the per-DID anti-collusion /// cap and for explorer display. pub bid_count: u64, /// Status (`Open` or `Settled`). pub status: AuctionStatus } ``` Source line: `285`. ## username::UsernameAuction::open [#usernameusernameauctionopen] Open a new auction. Caller is responsible for charset validation. ```rust pub fn open(name: String, opened_at_height: u64, closes_at_height: u64) -> Self; ``` Source line: `307`. ## username::UsernameAuction::finalizable\_at [#usernameusernameauctionfinalizable_at] True if the auction can be finalized at `current_height`. Auctions finalize when: * status is still `Open`, AND * `current_height >= closes_at_height`, AND * at least one bid has been recorded. ```rust pub fn finalizable_at(&self, current_height: u64) -> bool; ``` Source line: `324`. ## username::UsernameAuctionBidData [#usernameusernameauctionbiddata] Submit a bid against an open auction. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameAuctionBidData { /// Username being bid on (canonical lowercase). pub name: String, /// Bidder DID. pub bidder_did: String, /// Bid amount in base units (must be ≥ `current_bid + min_increment`, /// or ≥ opening price if no current bid). pub bid_amount: u128 } ``` Source line: `333`. ## username::UsernameAuctionFinalizeData [#usernameusernameauctionfinalizedata] Finalize an auction whose anti-snipe window has elapsed. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameAuctionFinalizeData { pub name: String } ``` Source line: `345`. ## username::DisputeStatus [#usernamedisputestatus] Status of a `UsernameDispute`. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum DisputeStatus { /// A dispute has been filed; the username is locked from transfer. Filed, /// The multisig has resolved the dispute; outcome was applied. Resolved, } ``` Source line: `362`. ## username::DisputeOutcome [#usernamedisputeoutcome] Possible outcomes of a username dispute. Mirrors `USERNAMES.md` §5.4. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum DisputeOutcome { /// Transfer the username to `claimant_did` (e.g. legitimate trademark /// holder). The original lease is retained; only the owner DID rotates. TransferTo { claimant_did: String }, /// The current owner keeps the name; claimant's filing fee is forfeited /// to the treasury. RetainCurrent, /// The username is released and goes into a 1-year cooldown before it /// can be re-registered. Forfeit, } ``` Source line: `371`. ## username::UsernameDispute [#usernameusernamedispute] On-chain record for a single open or resolved dispute. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct UsernameDispute { /// Unique dispute ID. Composed by the executor as /// `BLAKE3(name || claimant_did || filed_at_height)` truncated to 16 /// bytes (hex-encoded). Provides a deterministic, collision-resistant /// reference for cross-tx state lookup. pub dispute_id: String, /// Username being disputed (canonical lower-cased). pub name: String, /// DID of the party that filed the dispute (the claimant). pub claimant_did: String, /// DID of the username's owner at filing time. pub respondent_did: String, /// Block height at which the dispute was filed. pub filed_at_height: u64, /// Optional content hash of off-chain evidence (filing brief, screenshots, /// trademark certificate, etc.). pub evidence_cid: Option, /// Filing fee paid by the claimant, escrowed pending resolution. pub filing_fee: u64, /// Current status (`Filed` or `Resolved`). pub status: DisputeStatus, /// Resolution outcome (set when `status == Resolved`). pub outcome: Option } ``` Source line: `385`. ## username::RaiseUsernameDisputeData [#usernameraiseusernamedisputedata] Submit a UDRP-style dispute against a registered username. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RaiseUsernameDisputeData { /// Username being disputed (canonical lower-case). pub name: String, /// DID of the claimant (the party filing the dispute). Must equal the /// transaction sender DID. pub claimant_did: String, /// Optional content hash of the off-chain evidence package. pub evidence_cid: Option } ``` Source line: `412`. ## username::DisputeMultisigSignature [#usernamedisputemultisigsignature] One signer's contribution to a multisig resolution. The signature is over `BLAKE3(canonical_resolve_message)` where the canonical message is `dispute_id || serde_json(outcome)`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DisputeMultisigSignature { /// DID of the signing multisig member. pub signer_did: String, /// Ed25519 public key of the signer (32 bytes, hex). pub public_key_hex: String, /// Ed25519 signature over the resolution payload (64 bytes, hex). pub signature_hex: String } ``` Source line: `426`. ## username::ResolveUsernameDisputeData [#usernameresolveusernamedisputedata] Resolve a previously-filed dispute. Permissionless to submit (the gas payer can be anyone), but the executor verifies that the included multisig signatures meet the threshold and originate from genesis-pinned multisig members. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ResolveUsernameDisputeData { pub dispute_id: String, pub name: String, pub outcome: DisputeOutcome, /// Multisig signatures over the canonical resolution payload. pub signatures: Vec } ``` Source line: `440`. ## username::dispute\_resolve\_signing\_bytes [#usernamedispute_resolve_signing_bytes] Build the canonical bytes that the multisig signs for a resolve. Mirror the same construction in the executor to keep the verification side honest. ```rust pub fn dispute_resolve_signing_bytes(dispute_id: &str, outcome: &DisputeOutcome) -> Vec; ``` Source line: `451`. ## username::compute\_dispute\_id [#usernamecompute_dispute_id] Compute a deterministic dispute ID for a (name, claimant, height) triple. ```rust pub fn compute_dispute_id(name: &str, claimant_did: &str, filed_at_height: u64) -> String; ``` Source line: `461`. ## username::compute\_auction\_opening\_price [#usernamecompute_auction_opening_price] Compute the opening price for a premium-name auction. Per the spec, the opening price = `tier_price × auction_initial_bid_multiplier`. ```rust pub fn compute_auction_opening_price( canonical_name: &str, params: &UsernameParams, auction_initial_bid_multiplier: u32, ) -> Result; ``` Source line: `477`. ## username::compute\_min\_next\_bid [#usernamecompute_min_next_bid] Compute the minimum next bid given the current high bid (if any) and the minimum increment percentage in basis points (default 500 = 5%). ```rust pub fn compute_min_next_bid( current_bid: Option, opening_price: u128, min_increment_bps: u32, ) -> u128; ``` Source line: `503`. # sigil-core · velocity URL: https://docs.sigil.ml/reference/rust/sigil-core/velocity Markdown: https://docs.sigil.ml/reference/rust/sigil-core/velocity.md Source declarations, signatures and documentation for velocity. Source: `sigil/node/sigil-core/src/velocity.rs`. SHA-256: `13489dea1fc8c80ffaa3d5049a0af91d7d3cd6c8303cefc9fecd46e9edc56856`. 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. ## velocity::LaneId [#velocitylaneid] ```rust pub type LaneId = u32; ``` Source line: `15`. ## velocity::SlotId [#velocityslotid] ```rust pub type SlotId = u64; ``` Source line: `16`. ## velocity::VelocityAccessMode [#velocityvelocityaccessmode] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum VelocityAccessMode { Read, Write, } ``` Source line: `20`. ## velocity::VelocityAccess [#velocityvelocityaccess] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityAccess { pub partition: String, pub key: String, pub mode: VelocityAccessMode } ``` Source line: `26`. ## velocity::VelocityAccess::write [#velocityvelocityaccesswrite] ```rust pub fn write(partition: impl Into, key: impl Into) -> Self; ``` Source line: `33`. ## velocity::VelocityTxKind [#velocityvelocitytxkind] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "type", content = "data")] pub enum VelocityTxKind { Transfer { recipient_did: String, amount: u128, }, Event { topic: String, payload_hash: SigilHash, sequence: u64, }, } ``` Source line: `44`. ## velocity::VelocityTransaction [#velocityvelocitytransaction] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityTransaction { pub chain_id: String, pub lane_id: LaneId, pub slot_id: SlotId, pub sender_did: String, pub nonce: u64, pub timestamp_ns: u64, pub kind: VelocityTxKind, pub access: Vec, pub signer_public_key: Vec, pub signature: Vec } ``` Source line: `57`. ## velocity::VelocityTransaction::signed\_transfer [#velocityvelocitytransactionsigned_transfer] ```rust #[allow(clippy::too_many_arguments)] pub fn signed_transfer( chain_id: impl Into, lane_id: LaneId, slot_id: SlotId, sender_did: impl Into, recipient_did: impl Into, amount: u128, nonce: u64, timestamp_ns: u64, signing_key: &SigningKey, ) -> Result; ``` Source line: `72`. ## velocity::VelocityTransaction::verify\_signature [#velocityvelocitytransactionverify_signature] ```rust pub fn verify_signature(&self) -> Result<(), CoreError>; ``` Source line: `109`. ## velocity::VelocityTransaction::tx\_hash [#velocityvelocitytransactiontx_hash] ```rust pub fn tx_hash(&self) -> SigilHash; ``` Source line: `141`. ## velocity::VelocityLaneConfig [#velocityvelocitylaneconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneConfig { pub chain_id: String, pub lane_id: LaneId, pub slot_id: SlotId, pub parent_lane_hash: SigilHash, pub slot_start_ns: u64, pub slot_end_ns: u64 } ``` Source line: `168`. ## velocity::VelocityLaneHeader [#velocityvelocitylaneheader] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneHeader { pub chain_id: String, pub lane_id: LaneId, pub slot_id: SlotId, pub parent_lane_hash: SigilHash, pub tx_root: SigilHash, pub receipt_root: SigilHash, pub state_delta_root: SigilHash, pub post_state_root: SigilHash, pub slot_start_ns: u64, pub slot_end_ns: u64, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64 } ``` Source line: `178`. ## velocity::VelocityLaneHeader::block\_hash [#velocityvelocitylaneheaderblock_hash] ```rust pub fn block_hash(&self) -> SigilHash; ``` Source line: `196`. ## velocity::VelocityReceiptStatus [#velocityvelocityreceiptstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum VelocityReceiptStatus { Committed, } ``` Source line: `219`. ## velocity::VelocityStateDelta [#velocityvelocitystatedelta] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityStateDelta { pub partition: String, pub key: String, pub old_value: Vec, pub new_value: Vec } ``` Source line: `224`. ## velocity::VelocityReceipt [#velocityvelocityreceipt] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityReceipt { pub tx_hash: SigilHash, pub status: VelocityReceiptStatus, pub lane_id: LaneId, pub slot_id: SlotId, pub state_deltas: Vec } ``` Source line: `232`. ## velocity::VelocityDroppedTx [#velocityvelocitydroppedtx] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityDroppedTx { pub tx_hash: SigilHash, pub reason: String } ``` Source line: `241`. ## velocity::VelocityLaneBlock [#velocityvelocitylaneblock] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneBlock { pub header: VelocityLaneHeader, pub transactions: Vec, pub receipts: Vec, pub dropped: Vec } ``` Source line: `247`. ## velocity::VelocityLaneBlock::verify\_roots [#velocityvelocitylaneblockverify_roots] ```rust pub fn verify_roots(&self) -> Result; ``` Source line: `255`. ## velocity::VelocityExecutionOutcome [#velocityvelocityexecutionoutcome] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityExecutionOutcome { pub block: VelocityLaneBlock, pub post_state: VelocityAccountState, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64 } ``` Source line: `268`. ## velocity::VelocityExecutionOutcome::committed\_tx\_count [#velocityvelocityexecutionoutcomecommitted_tx_count] ```rust pub fn committed_tx_count(&self) -> u64; ``` Source line: `278`. ## velocity::VelocityAccount [#velocityvelocityaccount] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityAccount { pub balance: u128, pub nonce: u64 } ``` Source line: `284`. ## velocity::VelocityAccountState [#velocityvelocityaccountstate] ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityAccountState { } ``` Source line: `290`. ## velocity::VelocityAccountState::with\_account [#velocityvelocityaccountstatewith_account] ```rust pub fn with_account(mut self, did: impl Into, balance: u128, nonce: u64) -> Self; ``` Source line: `295`. ## velocity::VelocityAccountState::set\_account [#velocityvelocityaccountstateset_account] ```rust pub fn set_account(&mut self, did: impl Into, balance: u128, nonce: u64); ``` Source line: `300`. ## velocity::VelocityAccountState::balance [#velocityvelocityaccountstatebalance] ```rust pub fn balance(&self, did: &str) -> u128; ``` Source line: `305`. ## velocity::VelocityAccountState::nonce [#velocityvelocityaccountstatenonce] ```rust pub fn nonce(&self, did: &str) -> u64; ``` Source line: `312`. ## velocity::VelocityAccountState::state\_root [#velocityvelocityaccountstatestate_root] ```rust pub fn state_root(&self) -> SigilHash; ``` Source line: `356`. ## velocity::VelocityLaneCommitment [#velocityvelocitylanecommitment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneCommitment { pub lane_id: LaneId, pub slot_id: SlotId, pub lane_block_hash: SigilHash, pub tx_root: SigilHash, pub receipt_root: SigilHash, pub state_delta_root: SigilHash, pub post_state_root: SigilHash, pub committed_tx_count: u64 } ``` Source line: `371`. ## velocity::VelocityRootCommitment [#velocityvelocityrootcommitment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityRootCommitment { pub chain_id: String, pub root_height: u64, pub committed_at_ns: u64, pub lane_commitment_root: SigilHash, pub committed_tx_count: u64, pub lane_commitments: Vec } ``` Source line: `383`. ## velocity::VelocityRootCommitment::from\_lane\_blocks [#velocityvelocityrootcommitmentfrom_lane_blocks] ```rust pub fn from_lane_blocks( chain_id: impl Into, root_height: u64, committed_at_ns: u64, lane_blocks: &[VelocityLaneBlock], ) -> Result; ``` Source line: `393`. ## velocity::VelocityRootCommitment::verify\_against\_lane\_blocks [#velocityvelocityrootcommitmentverify_against_lane_blocks] ```rust pub fn verify_against_lane_blocks( &self, lane_blocks: &[VelocityLaneBlock], ) -> Result; ``` Source line: `428`. ## velocity::VelocityLaneCommitteeMember [#velocityvelocitylanecommitteemember] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneCommitteeMember { pub operator_id: String, pub validator_did: String, pub stake: u128, pub provider: String, pub asn: u32, pub region: String } ``` Source line: `443`. ## velocity::VelocityLaneCommitteeAssignment [#velocityvelocitylanecommitteeassignment] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneCommitteeAssignment { pub lane_id: LaneId, pub rotation_epoch: u64, pub rotation_interval_slots: u64, pub randomness_seed: SigilHash, pub members: Vec } ``` Source line: `453`. ## velocity::VelocityLaneDemotionPolicy [#velocityvelocitylanedemotionpolicy] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneDemotionPolicy { pub max_p95_latency_ns: u64, pub max_missed_slots: u64, pub max_invalid_roots: u64, pub max_missing_artifacts: u64, pub slash_on_equivocation: bool, pub slash_on_invalid_root: bool } ``` Source line: `462`. ## velocity::VelocityLaneSloSample [#velocityvelocitylaneslosample] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneSloSample { pub lane_id: LaneId, pub slot_id: SlotId, pub p95_latency_ns: u64, pub missed_slots: u64, pub invalid_roots: u64, pub missing_artifacts: u64, pub equivocations: u64 } ``` Source line: `472`. ## velocity::VelocityLaneDemotionDecision [#velocityvelocitylanedemotiondecision] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneDemotionDecision { pub lane_id: LaneId, pub slot_id: SlotId, pub demote: bool, pub slash: bool, pub reasons: Vec } ``` Source line: `483`. ## velocity::assign\_velocity\_lane\_committee [#velocityassign_velocity_lane_committee] ```rust pub fn assign_velocity_lane_committee( lane_id: LaneId, slot_id: SlotId, rotation_interval_slots: u64, committee_size: usize, candidates: &[VelocityLaneCommitteeMember], randomness_seed: SigilHash, ) -> Result; ``` Source line: `491`. ## velocity::evaluate\_velocity\_lane\_demotion [#velocityevaluate_velocity_lane_demotion] ```rust pub fn evaluate_velocity_lane_demotion( sample: &VelocityLaneSloSample, policy: &VelocityLaneDemotionPolicy, ) -> VelocityLaneDemotionDecision; ``` Source line: `552`. ## velocity::lane\_for\_account [#velocitylane_for_account] ```rust pub fn lane_for_account(account_did: &str, lane_count: LaneId) -> Result; ``` Source line: `598`. ## velocity::execute\_velocity\_lane\_block [#velocityexecute_velocity_lane_block] ```rust pub fn execute_velocity_lane_block( config: VelocityLaneConfig, initial_state: VelocityAccountState, raw_txs: Vec, ) -> Result; ``` Source line: `627`. ## velocity::replay\_velocity\_lane\_block [#velocityreplay_velocity_lane_block] ```rust pub fn replay_velocity_lane_block( block: &VelocityLaneBlock, initial_state: VelocityAccountState, ) -> Result; ``` Source line: `696`. # sigil-core · vigil URL: https://docs.sigil.ml/reference/rust/sigil-core/vigil Markdown: https://docs.sigil.ml/reference/rust/sigil-core/vigil.md Source declarations, signatures and documentation for vigil. Source: `sigil/node/sigil-core/src/vigil.rs`. SHA-256: `b055f1fc1e203d3a3fbb683a404eef612d7d10ace35129cd710ca494921a37d4`. 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. ## vigil::VIGIL\_EVENT\_ID\_DOMAIN [#vigilvigil_event_id_domain] ```rust pub const VIGIL_EVENT_ID_DOMAIN: &[u8]; ``` Source line: `11`. ## vigil::VIGIL\_SUBSCRIPTION\_ID\_DOMAIN [#vigilvigil_subscription_id_domain] ```rust pub const VIGIL_SUBSCRIPTION_ID_DOMAIN: &[u8]; ``` Source line: `12`. ## vigil::VIGIL\_FILTER\_HASH\_DOMAIN [#vigilvigil_filter_hash_domain] ```rust pub const VIGIL_FILTER_HASH_DOMAIN: &[u8]; ``` Source line: `13`. ## vigil::MIN\_VIGIL\_BOND [#vigilmin_vigil_bond] ```rust pub const MIN_VIGIL_BOND: u128; ``` Source line: `15`. ## vigil::MIN\_INGESTOR\_BOND [#vigilmin_ingestor_bond] ```rust pub const MIN_INGESTOR_BOND: u128; ``` Source line: `16`. ## vigil::MAX\_FILTER\_DEPTH [#vigilmax_filter_depth] ```rust pub const MAX_FILTER_DEPTH: usize; ``` Source line: `17`. ## vigil::MAX\_FILTER\_ARRAY\_LEN [#vigilmax_filter_array_len] ```rust pub const MAX_FILTER_ARRAY_LEN: usize; ``` Source line: `18`. ## vigil::MAX\_FIELD\_PATH\_LEN [#vigilmax_field_path_len] ```rust pub const MAX_FIELD_PATH_LEN: usize; ``` Source line: `19`. ## vigil::MAX\_EVENT\_PAYLOAD\_BYTES [#vigilmax_event_payload_bytes] ```rust pub const MAX_EVENT_PAYLOAD_BYTES: usize; ``` Source line: `20`. ## vigil::MAX\_EVENT\_PROOF\_BYTES [#vigilmax_event_proof_bytes] ```rust pub const MAX_EVENT_PROOF_BYTES: usize; ``` Source line: `21`. ## vigil::DEFAULT\_MAX\_CALLBACK\_GAS [#vigildefault_max_callback_gas] ```rust pub const DEFAULT_MAX_CALLBACK_GAS: u64; ``` Source line: `22`. ## vigil::OasDid [#vigiloasdid] ```rust pub type OasDid = String; ``` Source line: `24`. ## vigil::ContractAddress [#vigilcontractaddress] ```rust pub type ContractAddress = String; ``` Source line: `25`. ## vigil::AccountAddress [#vigilaccountaddress] ```rust pub type AccountAddress = String; ``` Source line: `26`. ## vigil::MethodSelector [#vigilmethodselector] ```rust pub type MethodSelector = String; ``` Source line: `27`. ## vigil::ZoneId [#vigilzoneid] ```rust pub type ZoneId = String; ``` Source line: `28`. ## vigil::TopicId [#vigiltopicid] ```rust pub type TopicId = String; ``` Source line: `29`. ## vigil::ExternalChainId [#vigilexternalchainid] ```rust pub type ExternalChainId = String; ``` Source line: `30`. ## vigil::ExternalAddress [#vigilexternaladdress] ```rust pub type ExternalAddress = String; ``` Source line: `31`. ## vigil::ExternalTopicId [#vigilexternaltopicid] ```rust pub type ExternalTopicId = String; ``` Source line: `32`. ## vigil::OracleFeedId [#vigiloraclefeedid] ```rust pub type OracleFeedId = String; ``` Source line: `33`. ## vigil::AriseRequestId [#vigilariserequestid] ```rust pub type AriseRequestId = String; ``` Source line: `34`. ## vigil::ContentHash [#vigilcontenthash] ```rust pub type ContentHash = SigilHash; ``` Source line: `35`. ## vigil::VigilError [#vigilvigilerror] ```rust #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum VigilError { #[error("vigil filter depth {depth} exceeds max {max}")] FilterTooDeep { depth: usize, max: usize }, #[error("vigil filter array length {len} exceeds max {max}")] FilterTooWide { len: usize, max: usize }, #[error("vigil filter field path length {len} exceeds max {max}")] FieldPathTooLong { len: usize, max: usize }, #[error("vigil field path segment must not be empty")] EmptyFieldPathSegment, #[error("vigil callback contract must not be empty")] EmptyCallbackContract, #[error("vigil callback method must not be empty")] EmptyCallbackMethod, #[error("vigil gas tank account must not be empty")] EmptyGasTank, #[error("vigil subscriber DID must not be empty")] EmptySubscriberDid, #[error("vigil ingestor DID must not be empty")] EmptyIngestorDid, #[error("vigil bond {amount} below minimum {minimum}")] BondBelowMinimum { amount: u128, minimum: u128 }, #[error("vigil max_callback_gas must be greater than zero")] ZeroCallbackGas, #[error("vigil max_deliveries_per_epoch must be greater than zero")] ZeroDeliveryLimit, #[error("vigil source does not match subscription")] SourceMismatch, #[error("vigil source kind {kind:?} requires a proof")] ProofRequired { kind: EventSourceKind }, #[error("vigil proof kind does not match source kind {kind:?}")] ProofSourceMismatch { kind: EventSourceKind }, #[error("vigil event payload is {len} bytes; max is {max}")] PayloadTooLarge { len: usize, max: usize }, #[error("vigil proof is {len} bytes; max is {max}")] ProofTooLarge { len: usize, max: usize }, #[error("vigil canonical encoding failed: {0}")] Encoding(String), } ``` Source line: `38`. ## vigil::EventSourceKind [#vigileventsourcekind] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum EventSourceKind { InZone, CrossZone, ExternalChain, Oracle, ComputeCompletion, TimeTrigger, TeeAttested, } ``` Source line: `79`. ## vigil::TimeKind [#vigiltimekind] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TimeKind { BlockHeight, AttestedWallClock, } ``` Source line: `91`. ## vigil::RecurrenceSpec [#vigilrecurrencespec] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum RecurrenceSpec { EveryBlocks { interval: u64 }, EveryAttestedSeconds { interval: u64 }, } ``` Source line: `98`. ## vigil::OracleThreshold [#vigiloraclethreshold] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct OracleThreshold { pub committee_id: String, pub min_signatures: u16 } ``` Source line: `104`. ## vigil::ProviderClass [#vigilproviderclass] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ProviderClass { Any, TeeBacked, Redundant, Deterministic, } ``` Source line: `111`. ## vigil::TeeClass [#vigilteeclass] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TeeClass { SgxDcap, SevSnp, Tdx, ArmCca, } ``` Source line: `120`. ## vigil::EventSource [#vigileventsource] ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(tag = "source_kind", rename_all = "snake_case")] pub enum EventSource { InZone { zone_id: ZoneId, emitter: ContractAddress, topic: TopicId, }, CrossZone { source_zone: ZoneId, emitter: ContractAddress, topic: TopicId, }, ExternalChain { chain_id: ExternalChainId, emitter: ExternalAddress, topic: ExternalTopicId, }, Oracle { feed_id: OracleFeedId, threshold: OracleThreshold, }, ComputeCompletion { arise_request_id: AriseRequestId, provider_class: ProviderClass, }, TimeTrigger { kind: TimeKind, target: u64, recurrence: Option, }, TeeAttested { model_or_payload_id: ContentHash, attestation_class: TeeClass, }, } ``` Source line: `129`. ## vigil::EventSource::kind [#vigileventsourcekind-1] ```rust pub fn kind(&self) -> EventSourceKind; ``` Source line: `165`. ## vigil::EventSource::matches\_kind [#vigileventsourcematches_kind] ```rust pub fn matches_kind(&self, kind: EventSourceKind) -> bool; ``` Source line: `177`. ## vigil::EventSource::matches\_subscription [#vigileventsourcematches_subscription] ```rust pub fn matches_subscription(&self, subscription_source: &Self) -> bool; ``` Source line: `181`. ## vigil::CanonicalValue [#vigilcanonicalvalue] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "type", content = "value", rename_all = "snake_case")] pub enum CanonicalValue { String(String), Bytes(Vec), U64(u64), I64(i64), Bool(bool), Hash(SigilHash), } ``` Source line: `188`. ## vigil::EventFilter [#vigileventfilter] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "op", content = "args", rename_all = "snake_case")] pub enum EventFilter { Any, TopicEquals(TopicId), PayloadFieldEquals { path: Vec, value: CanonicalValue, }, PayloadFieldRange { path: Vec, min: CanonicalValue, max: CanonicalValue, }, All(Vec), #[serde(alias = "Any2")] AnyOf(Vec), } ``` Source line: `236`. ## vigil::EventFilter::validate\_bounds [#vigileventfiltervalidate_bounds] ```rust pub fn validate_bounds(&self) -> Result<(), VigilError>; ``` Source line: `254`. ## vigil::EventFilter::evaluate [#vigileventfilterevaluate] ```rust pub fn evaluate(&self, payload: &serde_json::Value) -> Result; ``` Source line: `285`. ## vigil::EventFilter::filter\_hash [#vigileventfilterfilter_hash] ```rust pub fn filter_hash(&self) -> Result; ``` Source line: `322`. ## vigil::Event [#vigilevent] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Event { pub source: EventSource, pub payload: serde_json::Value, pub source_finality_anchor: SigilHash } ``` Source line: `332`. ## vigil::Event::validate\_size [#vigileventvalidate_size] ```rust pub fn validate_size(&self) -> Result<(), VigilError>; ``` Source line: `339`. ## vigil::EventProof [#vigileventproof] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", rename_all = "snake_case")] pub enum EventProof { None, CrossZone { proof_hash: SigilHash, encoded_proof: Vec, }, ExternalChain { client_id: String, proof_hash: SigilHash, encoded_proof: Vec, }, Oracle { committee_id: String, signature_bundle: Vec, }, ComputeReceipt { receipt_id: String, receipt_hash: SigilHash, provider_signature: Vec, }, TeeQuote { quote_hash: SigilHash, quote: Vec, material_hash: SigilHash, }, } ``` Source line: `353`. ## vigil::EventProof::encoded\_len [#vigileventproofencoded_len] ```rust pub fn encoded_len(&self) -> usize; ``` Source line: `381`. ## vigil::EventProof::validate\_size [#vigileventproofvalidate_size] ```rust pub fn validate_size(&self) -> Result<(), VigilError>; ``` Source line: `397`. ## vigil::EventProof::matches\_source [#vigileventproofmatches_source] ```rust pub fn matches_source(&self, source: &EventSource) -> Result; ``` Source line: `408`. ## vigil::SubscriptionStatus [#vigilsubscriptionstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SubscriptionStatus { Active, Paused, Slashed, Expired, } ``` Source line: `439`. ## vigil::IngestorStatus [#vigilingestorstatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum IngestorStatus { Active, Paused, Slashed, Deregistered, } ``` Source line: `448`. ## vigil::VigilSubscription [#vigilvigilsubscription] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VigilSubscription { pub subscription_id: SigilHash, pub subscriber_did: OasDid, pub callback_contract: ContractAddress, pub callback_method: MethodSelector, pub event_source: EventSource, pub event_filter: EventFilter, pub gas_tank: AccountAddress, pub bond_amount: u128, pub max_callback_gas: u64, pub max_deliveries_per_epoch: u32, pub created_at_height: u64, pub expires_at_height: Option, pub status: SubscriptionStatus, pub deliveries_this_epoch: u32, pub epoch_window_start: u64 } ``` Source line: `456`. ## vigil::VigilSubscription::is\_active\_at [#vigilvigilsubscriptionis_active_at] ```rust pub fn is_active_at(&self, height: u64) -> bool; ``` Source line: `475`. ## vigil::VigilSubscription::source\_filter\_key [#vigilvigilsubscriptionsource_filter_key] ```rust pub fn source_filter_key(&self) -> Result<(EventSourceKind, SigilHash), VigilError>; ``` Source line: `482`. ## vigil::Ingestor [#vigilingestor] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Ingestor { pub ingestor_did: OasDid, pub bond: u128, pub supported_sources: Vec, pub fee_per_delivery: u64, pub reputation: u32, pub registered_at_height: u64, pub status: IngestorStatus } ``` Source line: `488`. ## vigil::Ingestor::supports [#vigilingestorsupports] ```rust pub fn supports(&self, source: EventSourceKind) -> bool; ``` Source line: `499`. ## vigil::Ingestor::validate\_registration [#vigilingestorvalidate_registration] ```rust pub fn validate_registration(&self) -> Result<(), VigilError>; ``` Source line: `503`. ## vigil::RegisterVigilSubscriptionData [#vigilregistervigilsubscriptiondata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RegisterVigilSubscriptionData { pub callback_contract: ContractAddress, pub callback_method: MethodSelector, pub event_source: EventSource, pub event_filter: EventFilter, pub gas_tank: AccountAddress, pub bond_amount: u128, pub max_callback_gas: u64, pub max_deliveries_per_epoch: u32, #[serde(default, skip_serializing_if = "Option::is_none")] pub expires_at_height: Option } ``` Source line: `518`. ## vigil::RegisterVigilSubscriptionData::validate [#vigilregistervigilsubscriptiondatavalidate] ```rust pub fn validate(&self) -> Result<(), VigilError>; ``` Source line: `532`. ## vigil::RegisterVigilSubscriptionData::subscription\_id\_for [#vigilregistervigilsubscriptiondatasubscription_id_for] ```rust pub fn subscription_id_for(&self, subscriber_did: &str) -> Result; ``` Source line: `557`. ## vigil::RegisterVigilSubscriptionData::into\_record [#vigilregistervigilsubscriptiondatainto_record] ```rust pub fn into_record( &self, subscriber_did: impl Into, created_at_height: u64, epoch_window_start: u64, ) -> Result; ``` Source line: `569`. ## vigil::UpdateVigilSubscriptionData [#vigilupdatevigilsubscriptiondata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpdateVigilSubscriptionData { pub subscription_id: SigilHash, #[serde(default, skip_serializing_if = "Option::is_none")] pub event_filter: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub callback_method: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_callback_gas: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_deliveries_per_epoch: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub expires_at_height: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub status: Option } ``` Source line: `598`. ## vigil::CancelVigilSubscriptionData [#vigilcancelvigilsubscriptiondata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CancelVigilSubscriptionData { pub subscription_id: SigilHash } ``` Source line: `615`. ## vigil::DepositVigilGasData [#vigildepositvigilgasdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DepositVigilGasData { pub subscription_id: SigilHash, pub amount: u64 } ``` Source line: `620`. ## vigil::WithdrawVigilGasData [#vigilwithdrawvigilgasdata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WithdrawVigilGasData { pub subscription_id: SigilHash, pub amount: u64, pub recipient_did: OasDid } ``` Source line: `626`. ## vigil::EventDeliveryData [#vigileventdeliverydata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct EventDeliveryData { pub subscription_id: SigilHash, pub event: Event, pub proof: EventProof, pub ingestor_did: OasDid } ``` Source line: `633`. ## vigil::EventDeliveryData::event\_id [#vigileventdeliverydataevent_id] ```rust pub fn event_id(&self) -> Result; ``` Source line: `641`. ## vigil::SlashIngestorData [#vigilslashingestordata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SlashIngestorData { pub ingestor_did: OasDid, pub evidence_hash: SigilHash, pub slash_amount: u128 } ``` Source line: `647`. ## vigil::RegisterIngestorData [#vigilregisteringestordata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RegisterIngestorData { pub ingestor_did: OasDid, pub bond: u128, pub supported_sources: Vec, pub fee_per_delivery: u64 } ``` Source line: `654`. ## vigil::UpdateIngestorStakeData [#vigilupdateingestorstakedata] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpdateIngestorStakeData { pub ingestor_did: OasDid, pub bond_delta: i128, #[serde(default, skip_serializing_if = "Option::is_none")] pub supported_sources: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub fee_per_delivery: Option } ``` Source line: `662`. ## vigil::DeregisterIngestorData [#vigilderegisteringestordata] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeregisterIngestorData { pub ingestor_did: OasDid } ``` Source line: `672`. ## vigil::VigilDeliveryStatus [#vigilvigildeliverystatus] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum VigilDeliveryStatus { Scheduled, Delivered, Reverted, } ``` Source line: `678`. ## vigil::VigilDeliveryRecord [#vigilvigildeliveryrecord] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VigilDeliveryRecord { pub subscription_id: SigilHash, pub event_id: SigilHash, pub ingestor_did: OasDid, pub delivered_at_height: u64, pub status: VigilDeliveryStatus, pub proof_hash: SigilHash } ``` Source line: `685`. ## vigil::ScheduledVigilCallback [#vigilscheduledvigilcallback] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ScheduledVigilCallback { pub subscription_id: SigilHash, pub event_id: SigilHash, pub subscriber_did: OasDid, pub callback_contract: ContractAddress, pub callback_method: MethodSelector, pub payload: serde_json::Value, pub gas_tank: AccountAddress, pub gas_limit: u64, pub scheduled_at_height: u64 } ``` Source line: `695`. ## vigil::canonical\_event\_id [#vigilcanonical_event_id] ```rust pub fn canonical_event_id(event: &Event) -> Result; ``` Source line: `707`. ## vigil::canonical\_proof\_hash [#vigilcanonical_proof_hash] ```rust pub fn canonical_proof_hash(proof: &EventProof) -> Result; ``` Source line: `719`. # sigil-execution · anvil URL: https://docs.sigil.ml/reference/rust/sigil-execution/anvil Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/anvil.md Source declarations, signatures and documentation for anvil. Source: `sigil/node/sigil-execution/src/anvil.rs`. SHA-256: `d731bbc4f575e5c1cb4dd03229dfe16898b1f1532e3f3455e16be16aee42b868`. 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. ## anvil::AnvilHostFunction [#anvilanvilhostfunction] ANVIL host function categories — operations that WASM modules can invoke. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "function", content = "params")] pub enum AnvilHostFunction { // -- State access -- /// Read a value from the zone's key-value state tree. StateGet { /// Key to read. key: Vec, }, /// Write a value to the zone's key-value state tree. StateSet { /// Key to write. key: Vec, /// Value to store. value: Vec, }, /// Delete a key from the zone's state tree. StateDelete { /// Key to remove. key: Vec, }, // -- Cross-zone messaging -- /// Send a message to another Organization Zone. SendMessage { /// Target zone identifier. target_zone: String, /// Serialized message payload. payload: Vec, }, // -- Identity queries -- /// Resolve an OAS DID to its document. ResolveIdentity { /// The DID to resolve. did: String, }, /// Verify the lineage chain of an OAS DID. VerifyLineage { /// The DID whose lineage to verify. did: String, }, // -- Compute dispatch (feature-gated) -- /// Dispatch a compute request to an external provider. #[cfg(feature = "compute")] DispatchCompute { /// The compute provider's DID. provider_did: String, /// Serialized compute request. request: Vec, }, // -- Logging -- /// Emit a log message from the WASM module. Log { /// Log severity level. level: LogLevel, /// Log message content. message: String, }, } ``` Source line: `11`. ## anvil::LogLevel [#anvilloglevel] Log severity levels for ANVIL `Log` host function. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum LogLevel { /// Detailed debugging information. Debug, /// General informational messages. Info, /// Potentially harmful situations. Warn, /// Error conditions. Error, } ``` Source line: `77`. ## anvil::AnvilResult [#anvilanvilresult] Result of an ANVIL host function call. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum AnvilResult { /// A value was returned (e.g., from StateGet or ResolveIdentity). Value(Vec), /// The operation succeeded but produced no return value. Void, /// The operation failed. Error(AnvilError), } ``` Source line: `90`. ## anvil::AnvilError [#anvilanvilerror] Errors that can occur during an ANVIL host function call. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum AnvilError { /// The requested key does not exist in the zone state. KeyNotFound(String), /// The caller does not have permission for this operation. PermissionDenied(String), /// An argument was malformed or out of range. InvalidArgument(String), /// Gas was exhausted during the host function call. OutOfGas, /// The target zone was not found (for cross-zone messaging). ZoneNotFound(String), /// The cross-zone message queue is full. MessageQueueFull, } ``` Source line: `101`. # sigil-execution · context URL: https://docs.sigil.ml/reference/rust/sigil-execution/context Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/context.md Source declarations, signatures and documentation for context. Source: `sigil/node/sigil-execution/src/context.rs`. SHA-256: `0f1843b8437d04ea561f7a3b2729d3a49a8c5ce3a8dd20d135fc74aee8f278b7`. 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. ## context::StateChange [#contextstatechange] A single state mutation recorded during execution. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StateChange { /// Key that was modified. pub key: Vec, /// Previous value (None if the key did not exist). pub old_value: Option>, /// New value (None if the key was deleted). pub new_value: Option> } ``` Source line: `18`. ## context::LogEntry [#contextlogentry] A log entry emitted during execution. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LogEntry { /// Severity level. pub level: LogLevel, /// Log message. pub message: String, /// Block timestamp at which the log was emitted. pub timestamp: u64 } ``` Source line: `29`. ## context::ExecutionContext [#contextexecutioncontext] Context for a single WASM execution, tracking all side effects and gas usage. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ExecutionContext { /// Zone in which the execution is running. pub zone_id: String, /// OAS DID of the transaction sender. pub caller_did: String, /// Current block height. pub block_height: u64, /// Current block timestamp (Unix seconds). pub block_timestamp: u64, /// Hash of the transaction being executed. pub tx_hash: SigilHash, /// Gas meter for this execution. pub fuel_meter: FuelMeter, /// State mutations accumulated during execution. pub state_changes: Vec, /// Cross-zone messages emitted during execution. pub messages_sent: Vec, /// Log entries emitted during execution. pub logs: Vec } ``` Source line: `40`. ## context::ExecutionContext::new [#contextexecutioncontextnew] Create a new execution context. ```rust pub fn new( zone_id: impl Into, caller_did: impl Into, block_height: u64, block_timestamp: u64, tx_hash: SigilHash, gas_limit: u64, ) -> Self; ``` Source line: `67`. ## context::ExecutionContext::with\_gas\_costs [#contextexecutioncontextwith_gas_costs] Create a new execution context with custom gas costs. ```rust pub fn with_gas_costs(mut self, costs: GasCosts) -> Self; ``` Source line: `91`. ## context::ExecutionContext::record\_state\_change [#contextexecutioncontextrecord_state_change] Record a state change (key-value mutation). ```rust pub fn record_state_change( &mut self, key: Vec, old_value: Option>, new_value: Option>, ); ``` Source line: `97`. ## context::ExecutionContext::send\_message [#contextexecutioncontextsend_message] Send a cross-zone message, charging gas for the operation. Returns `Err(ExecutionError::OutOfGas)` if gas is insufficient. ```rust pub fn send_message( &mut self, target_zone: impl Into, payload: Vec, gas_forwarded: u64, ) -> Result<(), ExecutionError>; ``` Source line: `113`. ## context::ExecutionContext::log [#contextexecutioncontextlog] Emit a log entry, charging gas per byte of the message. Returns `Err(ExecutionError::OutOfGas)` if gas is insufficient. ```rust pub fn log( &mut self, level: LogLevel, message: impl Into, ) -> Result<(), ExecutionError>; ``` Source line: `146`. ## context::ExecutionContext::finalize [#contextexecutioncontextfinalize] Finalize the execution context into an \[`ExecutionResult`]. If `error` is `Some`, the result is marked as failed. ```rust pub fn finalize(self, return_value: Option>, error: Option) -> ExecutionResult; ``` Source line: `170`. ## context::ExecutionContext::gas\_remaining [#contextexecutioncontextgas_remaining] Returns the remaining gas budget. ```rust pub fn gas_remaining(&self) -> u64; ``` Source line: `186`. ## context::ExecutionContext::gas\_used [#contextexecutioncontextgas_used] Returns the gas consumed so far. ```rust pub fn gas_used(&self) -> u64; ``` Source line: `191`. # sigil-execution · contract URL: https://docs.sigil.ml/reference/rust/sigil-execution/contract Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/contract.md Source declarations, signatures and documentation for contract. Source: `sigil/node/sigil-execution/src/contract.rs`. SHA-256: `7defbad9f717653f76cc1a7f43191bbad41f07a9ff416cc10c35bf46c3fd562c`. 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. ## contract::ContractStatus [#contractcontractstatus] Lifecycle status of a deployed contract. ```rust #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ContractStatus { /// Contract accepts calls. #[default] Active, /// Contract is suspended by governance/controller; calls reject. Suspended, /// Contract is being migrated as part of an upgrade — no calls. Migrating, /// Contract has been retired and is read-only. Archived, } ``` Source line: `28`. ## contract::DEFAULT\_ALLOWED\_HOST\_FUNCTIONS [#contractdefault_allowed_host_functions] Conservative default ANVIL host-function allowlist used when a contract is deployed without an explicit list. ```rust pub const DEFAULT_ALLOWED_HOST_FUNCTIONS: &[&str]; ``` Source line: `42`. ## contract::ContractRecord [#contractcontractrecord] Live, on-chain record of a deployed agent contract. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ContractRecord { pub contract_did: String, pub zone_id: String, pub controller_did: String, pub runtime: ContractRuntime, pub code_hash: SigilHash, pub state_root: SigilHash, pub upgrade_policy: ControlPolicy, pub call_policy: ControlPolicy, pub revenue_account: Option, pub allowed_host_functions: Vec, pub kind: ContractKind, pub status: ContractStatus, /// Whether this contract opts in to autonomous Vigils callbacks. #[serde(default)] pub accepts_vigil_callbacks: bool, pub created_height: u64, pub updated_height: u64, /// Optional model-commitment pointer (set by ModelManager-style /// contracts that point at a verified compute artifact). Updated /// only via `UpgradeContract { new_model_commitment, model_receipt_id }`. #[serde(default, skip_serializing_if = "Option::is_none")] pub model_commitment: Option } ``` Source line: `54`. ## contract::ContractRecord::is\_callable [#contractcontractrecordis_callable] Returns true when the contract is currently callable. ```rust pub fn is_callable(&self) -> bool; ``` Source line: `81`. ## contract::ContractRecord::is\_upgradable [#contractcontractrecordis_upgradable] Returns true when the contract may be upgraded (active or migrating). Archived/suspended cannot be upgraded. ```rust pub fn is_upgradable(&self) -> bool; ``` Source line: `87`. ## contract::ContractRecord::allows\_host\_fn [#contractcontractrecordallows_host_fn] Returns true if the contract is permitted to invoke `host_fn`. ```rust pub fn allows_host_fn(&self, host_fn: &str) -> bool; ``` Source line: `95`. ## contract::ContractEvent [#contractcontractevent] A persisted contract event (emitted via the ANVIL `emit_event` host function or by the executor for lifecycle events). ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ContractEvent { pub contract_did: String, pub block_height: u64, pub seq: u64, pub topic: String, /// Indexed key/value pairs; opaque bytes preserved verbatim. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub indexed: Vec<(String, Vec)>, pub data: Vec } ``` Source line: `105`. ## contract::ContractEventQuery [#contractcontracteventquery] Filter for `list_contract_events`. ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct ContractEventQuery { pub contract_did: Option, pub topic: Option, pub from_height: Option, pub to_height: Option, pub limit: Option } ``` Source line: `118`. # sigil-execution · crate URL: https://docs.sigil.ml/reference/rust/sigil-execution/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-execution/src/lib.rs`. SHA-256: `297694625e326392f827109dbf80248dba66d9240f9794d432559e2c25eaaf06`. 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. ## anvil [#anvil] ```rust pub mod anvil; ``` Source line: `10`. ## context [#context] ```rust pub mod context; ``` Source line: `11`. ## contract [#contract] ```rust pub mod contract; ``` Source line: `12`. ## error [#error] ```rust pub mod error; ``` Source line: `13`. ## message [#message] ```rust pub mod message; ``` Source line: `14`. ## metering [#metering] ```rust pub mod metering; ``` Source line: `15`. ## result [#result] ```rust pub mod result; ``` Source line: `16`. ## zone [#zone] ```rust pub mod zone; ``` Source line: `17`. ## pub use anvil::\{AnvilError, AnvilHostFunction, AnvilResult, LogLevel}; [#pub-use-anvilanvilerror-anvilhostfunction-anvilresult-loglevel] ```rust pub use anvil::{AnvilError, AnvilHostFunction, AnvilResult, LogLevel}; ``` Source line: `21`. ## pub use context::\{ExecutionContext, LogEntry, StateChange}; [#pub-use-contextexecutioncontext-logentry-statechange] ```rust pub use context::{ExecutionContext, LogEntry, StateChange}; ``` Source line: `22`. ## pub use contract::\{ [#pub-use-contract] ContractEvent, ContractEventQuery, ContractRecord, ContractStatus, DEFAULT\_ALLOWED\_HOST\_FUNCTIONS, }; ```rust pub use contract::{ ContractEvent, ContractEventQuery, ContractRecord, ContractStatus, DEFAULT_ALLOWED_HOST_FUNCTIONS, }; ``` Source line: `23`. ## pub use error::ExecutionError; [#pub-use-errorexecutionerror] ```rust pub use error::ExecutionError; ``` Source line: `27`. ## pub use message::\{CrossZoneMessage, MessageQueue, MessageStatus}; [#pub-use-messagecrosszonemessage-messagequeue-messagestatus] ```rust pub use message::{CrossZoneMessage, MessageQueue, MessageStatus}; ``` Source line: `28`. ## pub use metering::\{FuelMeter, GasCosts}; [#pub-use-meteringfuelmeter-gascosts] ```rust pub use metering::{FuelMeter, GasCosts}; ``` Source line: `29`. ## pub use result::ExecutionResult; [#pub-use-resultexecutionresult] ```rust pub use result::ExecutionResult; ``` Source line: `30`. ## pub use zone::\{DeployedModule, OrganizationZone, ZoneStatus}; [#pub-use-zonedeployedmodule-organizationzone-zonestatus] ```rust pub use zone::{DeployedModule, OrganizationZone, ZoneStatus}; ``` Source line: `31`. # sigil-execution · error URL: https://docs.sigil.ml/reference/rust/sigil-execution/error Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-execution/src/error.rs`. SHA-256: `f083c447715aae66ac9effcc598d26399096e60c802f6ea3509fe955dac5a4b3`. 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. ## error::ExecutionError [#errorexecutionerror] Errors that can occur during WASM execution in an Organization Zone. ```rust #[derive(Debug, Clone, thiserror::Error, Serialize, Deserialize)] pub enum ExecutionError { /// Gas limit exceeded during execution. #[error("out of gas: used {used} of {limit}")] OutOfGas { /// Gas consumed before failure. used: u64, /// Gas limit for this execution. limit: u64, }, /// WASM runtime trap (e.g., unreachable instruction, division by zero). #[error("WASM trap: {0}")] WasmTrap(String), /// Module failed validation or compilation. #[error("invalid module: {0}")] InvalidModule(String), /// Referenced zone does not exist. #[error("zone not found: {0}")] ZoneNotFound(String), /// Zone is suspended and cannot execute. #[error("zone suspended: {0}")] ZoneSuspended(String), /// Referenced module is not deployed in the zone. #[error("module not found: {0}")] ModuleNotFound(String), /// Error reading or writing zone state. #[error("state error: {0}")] StateError(String), /// Error during cross-zone message delivery. #[error("cross-zone error: {0}")] CrossZoneError(String), /// Caller lacks required permissions. #[error("permission denied: {0}")] PermissionDenied(String), /// WASM linear memory limit exceeded. #[error("memory limit exceeded: requested {requested} bytes, limit {limit} bytes")] MemoryLimitExceeded { /// Bytes requested. requested: u64, /// Maximum allowed bytes. limit: u64, }, /// WASM call stack overflow. #[error("stack overflow")] StackOverflow, } ``` Source line: `7`. # sigil-execution URL: https://docs.sigil.ml/reference/rust/sigil-execution Markdown: https://docs.sigil.ml/reference/rust/sigil-execution.md WASM execution environment types and Organization Zones for Sigil blockchain WASM execution environment types and Organization Zones for Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-execution` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-execution/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_execution` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-execution = { path = "../sigil-execution" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `czac` | `sigil-core/czac` | | `nova` | `sigil-core/nova` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-execution/crate) — 16 declarations * [anvil](/reference/rust/sigil-execution/anvil) — 4 declarations * [context](/reference/rust/sigil-execution/context) — 11 declarations * [contract](/reference/rust/sigil-execution/contract) — 8 declarations * [error](/reference/rust/sigil-execution/error) — 1 declarations * [message](/reference/rust/sigil-execution/message) — 10 declarations * [metering](/reference/rust/sigil-execution/metering) — 8 declarations * [result](/reference/rust/sigil-execution/result) — 4 declarations * [zone](/reference/rust/sigil-execution/zone) — 11 declarations # sigil-execution · message URL: https://docs.sigil.ml/reference/rust/sigil-execution/message Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/message.md Source declarations, signatures and documentation for message. Source: `sigil/node/sigil-execution/src/message.rs`. SHA-256: `460f10f723a2d81a3f2d0f150250dc14b4bc2a7cc6d2ec4c3d4fe7afbf4bdc26`. 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. ## message::MessageStatus [#messagemessagestatus] Status of a cross-zone message. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum MessageStatus { /// Message is waiting to be delivered. Pending, /// Message was successfully delivered to the target zone. Delivered, /// Message delivery failed (e.g., target zone not found or suspended). Failed, /// Message expired before delivery. Expired, } ``` Source line: `13`. ## message::CrossZoneMessage [#messagecrosszonemessage] A cross-zone message sent from one Organization Zone to another. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CrossZoneMessage { /// Unique message identifier. pub id: String, /// Zone ID of the sender. pub source_zone: String, /// Zone ID of the intended recipient. pub target_zone: String, /// Serialized message payload. pub payload: Vec, /// Gas forwarded to the target zone for processing this message. pub gas_forwarded: u64, /// Block height at which this message was created. pub created_height: u64, /// Current delivery status. pub status: MessageStatus } ``` Source line: `26`. ## message::MessageQueue [#messagemessagequeue] Bounded queue for pending cross-zone messages. This queue enforces a maximum size to prevent unbounded resource consumption during heavy cross-zone messaging. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct MessageQueue { } ``` Source line: `48`. ## message::MessageQueue::new [#messagemessagequeuenew] Create a new message queue with the given maximum capacity. ```rust pub fn new(max_pending: usize) -> Self; ``` Source line: `55`. ## message::MessageQueue::enqueue [#messagemessagequeueenqueue] Add a message to the queue. Returns `Err(ExecutionError::CrossZoneError)` if the queue is full. ```rust pub fn enqueue(&mut self, msg: CrossZoneMessage) -> Result<(), ExecutionError>; ``` Source line: `65`. ## message::MessageQueue::dequeue\_for\_zone [#messagemessagequeuedequeue_for_zone] Drain and return all pending messages destined for the given zone. Returned messages are removed from the queue. ```rust pub fn dequeue_for_zone(&mut self, zone_id: &str) -> Vec; ``` Source line: `79`. ## message::MessageQueue::pending\_count [#messagemessagequeuepending_count] Returns the number of messages currently in the queue. ```rust pub fn pending_count(&self) -> usize; ``` Source line: `96`. ## message::MessageQueue::expire\_old [#messagemessagequeueexpire_old] Remove messages older than `max_age` blocks, marking them as expired. Returns the number of messages expired. ```rust pub fn expire_old(&mut self, current_height: u64, max_age: u64) -> usize; ``` Source line: `103`. ## message::MessageQueue::messages [#messagemessagequeuemessages] Returns a read-only view of all messages in the queue. ```rust pub fn messages(&self) -> &[CrossZoneMessage]; ``` Source line: `122`. ## message::MessageQueue::capacity [#messagemessagequeuecapacity] Returns the maximum capacity of this queue. ```rust pub fn capacity(&self) -> usize; ``` Source line: `127`. # sigil-execution · metering URL: https://docs.sigil.ml/reference/rust/sigil-execution/metering Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/metering.md Source declarations, signatures and documentation for metering. Source: `sigil/node/sigil-execution/src/metering.rs`. SHA-256: `bc5b1011359964f14ee11f72be63a0635280ec30dfd6a631f25af34d65b6e014`. 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. ## metering::GasCosts [#meteringgascosts] Gas costs for different ANVIL host function operations and WASM resources. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GasCosts { /// Cost per WASM instruction executed. pub wasm_instruction: u64, /// Cost per state read (`StateGet`). pub state_read: u64, /// Cost per state write (`StateSet`). pub state_write: u64, /// Cost per state deletion (`StateDelete`). pub state_delete: u64, /// Cost per cross-zone message (`SendMessage`). pub cross_zone_message: u64, /// Cost per DID resolution (`ResolveIdentity`). pub identity_resolve: u64, /// Cost per lineage verification (`VerifyLineage`). pub lineage_verify: u64, /// Cost per byte of log output (`Log`). pub log_per_byte: u64, /// Cost per 64KB memory page allocated. pub memory_page: u64 } ``` Source line: `14`. ## metering::GasCosts::cost\_for [#meteringgascostscost_for] Compute the gas cost for a specific ANVIL host function call. ```rust pub fn cost_for(&self, op: &AnvilHostFunction) -> u64; ``` Source line: `53`. ## metering::FuelMeter [#meteringfuelmeter] Fuel meter tracking cumulative gas consumption within a single execution. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct FuelMeter { /// Maximum gas allowed for this execution. pub gas_limit: u64, /// Gas consumed so far. pub gas_used: u64 } ``` Source line: `73`. ## metering::FuelMeter::new [#meteringfuelmeternew] Create a new fuel meter with the given gas limit. ```rust pub fn new(gas_limit: u64) -> Self; ``` Source line: `82`. ## metering::FuelMeter::consume [#meteringfuelmeterconsume] Consume `amount` gas. Returns `Err(ExecutionError::OutOfGas)` if the limit would be exceeded. ```rust pub fn consume(&mut self, amount: u64) -> Result<(), ExecutionError>; ``` Source line: `91`. ## metering::FuelMeter::remaining [#meteringfuelmeterremaining] Returns the remaining gas budget. ```rust pub fn remaining(&self) -> u64; ``` Source line: `112`. ## metering::FuelMeter::is\_exhausted [#meteringfuelmeteris_exhausted] Returns `true` if the gas budget is fully consumed. ```rust pub fn is_exhausted(&self) -> bool; ``` Source line: `117`. ## metering::FuelMeter::charge\_operation [#meteringfuelmetercharge_operation] Charge gas for a specific ANVIL host function operation using the provided cost table. ```rust pub fn charge_operation( &mut self, costs: &GasCosts, op: &AnvilHostFunction, ) -> Result<(), ExecutionError>; ``` Source line: `123`. # sigil-execution · result URL: https://docs.sigil.ml/reference/rust/sigil-execution/result Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/result.md Source declarations, signatures and documentation for result. Source: `sigil/node/sigil-execution/src/result.rs`. SHA-256: `55b67483f749967398b9308385ec07e12ba9f188df78746f93621dbb05aa7458`. 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. ## result::ExecutionResult [#resultexecutionresult] The complete result of a single WASM execution within an Organization Zone. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ExecutionResult { /// Zone in which the execution occurred. pub zone_id: String, /// Hash of the transaction that triggered this execution. pub tx_hash: SigilHash, /// Whether the execution completed successfully. pub success: bool, /// Total gas consumed during execution. pub gas_used: u64, /// Return value from the WASM entry point (if any). pub return_value: Option>, /// State mutations applied during execution. pub state_changes: Vec, /// Cross-zone messages emitted during execution. pub messages: Vec, /// Log entries emitted during execution. pub logs: Vec, /// Error description if the execution failed. pub error: Option } ``` Source line: `15`. ## result::ExecutionResult::is\_success [#resultexecutionresultis_success] Returns `true` if the execution succeeded (no error). ```rust pub fn is_success(&self) -> bool; ``` Source line: `38`. ## result::ExecutionResult::state\_change\_count [#resultexecutionresultstate_change_count] Returns the number of state mutations. ```rust pub fn state_change_count(&self) -> usize; ``` Source line: `43`. ## result::ExecutionResult::message\_count [#resultexecutionresultmessage_count] Returns the number of cross-zone messages emitted. ```rust pub fn message_count(&self) -> usize; ``` Source line: `48`. # sigil-execution · zone URL: https://docs.sigil.ml/reference/rust/sigil-execution/zone Markdown: https://docs.sigil.ml/reference/rust/sigil-execution/zone.md Source declarations, signatures and documentation for zone. Source: `sigil/node/sigil-execution/src/zone.rs`. SHA-256: `398f86918f41155452c3c17c31132ec61f0fc8f34bff777a150a01364343aaad`. 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. ## zone::ZoneStatus [#zonezonestatus] Status of an Organization Zone. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ZoneStatus { /// Zone is active and accepting transactions. Active, /// Zone is suspended (e.g., by governance action). Suspended, /// Zone is being migrated to a new state root. Migrating, /// Zone has been archived and is read-only. Archived, } ``` Source line: `13`. ## zone::DeployedModule [#zonedeployedmodule] A WASM module deployed within an Organization Zone. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeployedModule { /// Unique module identifier within the zone. pub module_id: String, /// BLAKE3 hash of the WASM bytecode. pub module_hash: SigilHash, /// Human-readable module name. pub name: String, /// Semantic version string (e.g., "1.0.0"). pub version: String, /// Size of the WASM bytecode in bytes. pub wasm_size: u64, /// Block height at which this module was deployed. pub deployed_height: u64, /// OAS DID of the entity that deployed this module. pub deployer_did: String } ``` Source line: `26`. ## zone::OrganizationZone [#zoneorganizationzone] An Organization Zone — independent WASM execution environment for a single organization. Each zone maintains its own Merkle state root, a set of deployed WASM modules, and cumulative gas accounting. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct OrganizationZone { /// Unique zone identifier (derived from org DID + creation height). pub zone_id: String, /// OAS DID of the organization that owns this zone. pub org_did: String, /// Current Merkle root of the zone's state tree. pub state_root: SigilHash, /// WASM modules currently deployed in this zone. pub deployed_modules: Vec, /// Current zone status. pub status: ZoneStatus, /// Block height at which this zone was created. pub created_height: u64, /// Block height of the most recent transaction in this zone. pub last_active_height: u64, /// Cumulative gas consumed by all executions in this zone. pub gas_used_total: u64 } ``` Source line: `49`. ## zone::CzacRouteTarget [#zoneczacroutetarget] Routing information for a cross-zone CZAC message targeting this zone. When a CZAC envelope arrives at the execution layer, the router resolves the target zone and constructs a `CzacRouteTarget` so the zone executor knows which module (if any) should handle the message. ```rust #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacRouteTarget { /// Target zone ID. pub zone_id: String, /// OAS DID of the target organization. pub target_org_did: String, /// Optional specific module within the zone to handle the message. pub target_module_id: Option, /// CZAC channel ID through which the message arrived. pub channel_id: String, /// Message sequence number within the channel. pub sequence: u64 } ``` Source line: `75`. ## zone::OrganizationZone::new [#zoneorganizationzonenew] Create a new Organization Zone for the given OAS DID at the given block height. The zone ID is derived as the BLAKE3 hash of `org_did || height`. ```rust pub fn new(org_did: impl Into, height: u64) -> Self; ``` Source line: `92`. ## zone::OrganizationZone::deploy\_module [#zoneorganizationzonedeploy_module] Deploy a new WASM module into this zone. Returns an error if the zone is not active or a module with the same ID is already deployed. ```rust pub fn deploy_module(&mut self, module: DeployedModule) -> Result<(), ExecutionError>; ``` Source line: `115`. ## zone::OrganizationZone::remove\_module [#zoneorganizationzoneremove_module] Remove a deployed module by ID. Returns an error if the zone is not active or the module is not found. ```rust pub fn remove_module(&mut self, module_id: &str) -> Result; ``` Source line: `141`. ## zone::OrganizationZone::find\_module [#zoneorganizationzonefind_module] Find a deployed module by ID. ```rust pub fn find_module(&self, module_id: &str) -> Option<&DeployedModule>; ``` Source line: `164`. ## zone::OrganizationZone::is\_active [#zoneorganizationzoneis_active] Returns `true` if the zone status is `Active`. ```rust pub fn is_active(&self) -> bool; ``` Source line: `171`. ## zone::OrganizationZone::update\_state\_root [#zoneorganizationzoneupdate_state_root] Update the zone's Merkle state root. ```rust pub fn update_state_root(&mut self, new_root: SigilHash); ``` Source line: `176`. ## zone::OrganizationZone::resolve\_czac\_route [#zoneorganizationzoneresolve_czac_route] Resolve a CZAC message to a route target within this zone. If `module_id` is `Some`, validates that the module exists in this zone. If `None`, the zone itself is the target (no specific module). ```rust #[cfg(feature = "czac")] pub fn resolve_czac_route( &self, channel_id: String, sequence: u64, module_id: Option, ) -> Result; ``` Source line: `185`. # sigil-economics · bonds URL: https://docs.sigil.ml/reference/rust/sigil-economics/bonds Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/bonds.md Source declarations, signatures and documentation for bonds. Source: `sigil/node/sigil-economics/src/bonds.rs`. SHA-256: `e553b9426004f07453e9b2713121c2c2a74f33e66c9701b825ea73e3606f53f6`. 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. ## bonds::bond\_requirement [#bondsbond_requirement] Returns the bond requirement (in micro-MINT) for a given MARS entry type. ```rust pub fn bond_requirement(entry_type: &str) -> u64; ``` Source line: `18`. ## bonds::BondRecord [#bondsbondrecord] A bond posted by a publisher against a MARS registry entry. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BondRecord { /// Unique bond identifier. pub bond_id: String, /// OAS DID of the publisher who posted the bond. pub publisher_did: String, /// OAS DID of the MARS entry this bond secures. pub entry_did: String, /// micro-MINT posted as bond. pub amount: u64, /// Current status of the bond. pub status: BondStatus, /// Epoch at which the bond was created. pub created_epoch: u64 } ``` Source line: `38`. ## bonds::BondStatus [#bondsbondstatus] Lifecycle status of a bond. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum BondStatus { /// Bond is active and securing the entry. Active, /// A portion of the bond has been slashed. PartiallySlashed, /// The entire bond has been slashed. FullySlashed, /// Bond has been released (entry deregistered or bond returned). Released, } ``` Source line: `55`. ## bonds::BondSlashDistribution [#bondsbondslashdistribution] Distribution of a slashed bond: 30% reporter, 40% harmed party, 30% treasury. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BondSlashDistribution { /// micro-MINT awarded to the reporter. pub reporter_share: u64, /// micro-MINT awarded to the harmed party. pub harmed_share: u64, /// micro-MINT sent to the protocol treasury. pub treasury_share: u64 } ``` Source line: `68`. ## bonds::create\_bond [#bondscreate_bond] Create a new bond record. The `amount` must be at least the `bond_requirement` for the given `entry_type`. If it exceeds the requirement, the full amount is bonded. ```rust pub fn create_bond( bond_id: String, publisher_did: String, entry_did: String, entry_type: &str, amount: u64, created_epoch: u64, ) -> Result; ``` Source line: `85`. ## bonds::slash\_bond [#bondsslash_bond] Slash a bond by the given `total_slash_amount`. Distribution: 30% reporter, 40% harmed party, 30% treasury. If `total_slash_amount >= bond.amount`, the bond is fully slashed. Otherwise it is partially slashed and the bond amount is reduced. ```rust pub fn slash_bond( bond: &mut BondRecord, total_slash_amount: u64, ) -> Result; ``` Source line: `122`. ## bonds::release\_bond [#bondsrelease_bond] Release a bond, returning the remaining amount to the publisher. Can only release an active or partially-slashed bond. Returns the freed micro-MINT amount. ```rust pub fn release_bond(bond: &mut BondRecord) -> Result; ``` Source line: `167`. # sigil-economics · crate URL: https://docs.sigil.ml/reference/rust/sigil-economics/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-economics/src/lib.rs`. SHA-256: `a45e66ee186fb62b9128fd548255f709d5238e5b756d3667fcda75b6589dd458`. 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. ## bonds [#bonds] ```rust pub mod bonds; ``` Source line: `5`. ## error [#error] ```rust pub mod error; ``` Source line: `6`. ## rewards [#rewards] ```rust pub mod rewards; ``` Source line: `7`. ## slashing [#slashing] ```rust pub mod slashing; ``` Source line: `8`. ## staking [#staking] ```rust pub mod staking; ``` Source line: `9`. ## escrow [#escrow] ```rust #[cfg(feature = "compute")] pub mod escrow; ``` Source line: `12`. ## pub use bonds::\{BondRecord, BondSlashDistribution, BondStatus}; [#pub-use-bondsbondrecord-bondslashdistribution-bondstatus] ```rust pub use bonds::{BondRecord, BondSlashDistribution, BondStatus}; ``` Source line: `14`. ## pub use error::EconomicsError; [#pub-use-erroreconomicserror] ```rust pub use error::EconomicsError; ``` Source line: `15`. ## pub use rewards::\{DelegatorReward, RewardConfig, RewardDistribution}; [#pub-use-rewardsdelegatorreward-rewardconfig-rewarddistribution] ```rust pub use rewards::{DelegatorReward, RewardConfig, RewardDistribution}; ``` Source line: `16`. ## pub use slashing::\{SlashConfig, SlashOffense, SlashResult}; [#pub-use-slashingslashconfig-slashoffense-slashresult] ```rust pub use slashing::{SlashConfig, SlashOffense, SlashResult}; ``` Source line: `17`. ## pub use staking::\{ [#pub-use-staking] Delegation, PendingUndelegation, StakeRecord, StakeStatus, MIN\_BP\_STAKE, MIN\_BV\_STAKE, UNBONDING\_EPOCHS, }; ```rust pub use staking::{ Delegation, PendingUndelegation, StakeRecord, StakeStatus, MIN_BP_STAKE, MIN_BV_STAKE, UNBONDING_EPOCHS, }; ``` Source line: `18`. ## pub use escrow::EscrowAccount; [#pub-use-escrowescrowaccount] ```rust #[cfg(feature = "compute")] pub use escrow::EscrowAccount; ``` Source line: `24`. ## ::MICRO\_MINT\_PER\_MINT [#micro_mint_per_mint] 1 MINT = 1\_000\_000 micro-MINT. ```rust pub const MICRO_MINT_PER_MINT: u64; ``` Source line: `27`. # sigil-economics · error URL: https://docs.sigil.ml/reference/rust/sigil-economics/error Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-economics/src/error.rs`. SHA-256: `e6f633ac4d318a805fdb366b9ab112205a4df420f14edd9c0305921e81fd73e3`. 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. ## error::EconomicsError [#erroreconomicserror] Error types for the Sigil economics crate. Errors arising from economic operations (staking, rewards, slashing, bonds, escrow). ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum EconomicsError { #[error("insufficient stake: required {required} micro-MINT, available {available}")] InsufficientStake { required: u64, available: u64 }, #[error("insufficient balance: required {required} micro-MINT, available {available}")] InsufficientBalance { required: u64, available: u64 }, #[error("validator not found: {0}")] ValidatorNotFound(String), #[error("validator already unbonding: {0}")] AlreadyUnbonding(String), #[error("validator not unbonding: {0}")] NotUnbonding(String), #[error("unbonding not complete: current epoch {current_epoch}, completion epoch {completion_epoch}")] UnbondingNotComplete { current_epoch: u64, completion_epoch: u64, }, #[error("bond not found: {0}")] BondNotFound(String), #[error("bond already slashed: {0}")] BondAlreadySlashed(String), #[error("escrow insufficient: required {required} micro-MINT, available {available}")] EscrowInsufficient { required: u64, available: u64 }, #[error("agent budget exceeded: agent {agent_did} limit {limit}, requested {requested}")] AgentBudgetExceeded { agent_did: String, limit: u64, requested: u64, }, #[error("invalid amount: {0}")] InvalidAmount(String), #[error("validator is jailed: {0}")] ValidatorJailed(String), } ``` Source line: `5`. # sigil-economics · escrow URL: https://docs.sigil.ml/reference/rust/sigil-economics/escrow Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/escrow.md Source declarations, signatures and documentation for escrow. Source: `sigil/node/sigil-economics/src/escrow.rs`. SHA-256: `e933bb2c512391ce8f712f08c0f5303bc6c535626f4a820ea6f392785a7f0ac8`. 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. Module condition: ```rust #[cfg(feature = "compute")] ``` ## escrow::EscrowAccount [#escrowescrowaccount] An escrow account for an organization's compute spending. Funds flow: `funded -> reserved -> spent`. Un-used reservations can be refunded back to the free balance. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EscrowAccount { /// OAS DID of the organization that owns this escrow. pub org_did: String, /// Total micro-MINT deposited into this escrow (lifetime). pub total_funded: u64, /// micro-MINT currently reserved for active jobs. pub total_reserved: u64, /// micro-MINT already settled (paid to providers). pub total_spent: u64, /// Per-agent maximum budget (agent_did -> max micro-MINT). pub per_agent_budgets: HashMap, /// Reservations by job ID. #[serde(default)] pub reservations: HashMap } ``` Source line: `17`. ## escrow::EscrowAccount::new [#escrowescrowaccountnew] Create a new, empty escrow account for the given organization. ```rust #[cfg(feature = "compute")] pub fn new(org_did: String) -> Self; ``` Source line: `35`. ## escrow::EscrowAccount::available\_balance [#escrowescrowaccountavailable_balance] Available (unreserved, unspent) balance. ```rust #[cfg(feature = "compute")] pub fn available_balance(&self) -> u64; ``` Source line: `47`. ## escrow::fund\_escrow [#escrowfund_escrow] Add funds to the escrow account. ```rust #[cfg(feature = "compute")] pub fn fund_escrow(account: &mut EscrowAccount, amount: u64) -> Result<(), EconomicsError>; ``` Source line: `55`. ## escrow::reserve\_for\_job [#escrowreserve_for_job] Reserve funds for a compute job. The reserved amount is subtracted from the available balance but not yet spent. It is held until the job settles or is refunded. ```rust #[cfg(feature = "compute")] pub fn reserve_for_job( account: &mut EscrowAccount, job_id: String, amount: u64, ) -> Result<(), EconomicsError>; ``` Source line: `72`. ## escrow::settle\_job [#escrowsettle_job] Settle a completed job, debiting the actual cost from the reservation. If `actual_cost < reserved`, the surplus is returned to the free balance (by reducing `total_reserved`). `total_spent` increases by `actual_cost`. ```rust #[cfg(feature = "compute")] pub fn settle_job( account: &mut EscrowAccount, job_id: &str, actual_cost: u64, ) -> Result<(), EconomicsError>; ``` Source line: `101`. ## escrow::refund\_job [#escrowrefund_job] Refund a job's reservation back to the free balance. Used when a job is cancelled before completion. ```rust #[cfg(feature = "compute")] pub fn refund_job(account: &mut EscrowAccount, job_id: &str) -> Result<(), EconomicsError>; ``` Source line: `133`. ## escrow::check\_agent\_budget [#escrowcheck_agent_budget] Check whether an agent's spending would stay within its budget. Returns `true` if the agent's budget allows the given amount, or if no per-agent budget is set (i.e., unlimited). ```rust #[cfg(feature = "compute")] pub fn check_agent_budget(account: &EscrowAccount, agent_did: &str, amount: u64) -> bool; ``` Source line: `147`. ## escrow::PaymentChannelEscrow [#escrowpaymentchannelescrow] A payment channel escrow for Lightning-style off-consensus micropayments. Both parties fund the channel; updates are signed balance sheets exchanged off-chain. Disputes are resolved via the Tower coordination chain. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PaymentChannelEscrow { /// Unique channel identifier. pub channel_id: String, /// OAS DID of the channel initiator. pub party_a_did: String, /// OAS DID of the channel counterparty. pub party_b_did: String, /// micro-MINT funded by party A. pub party_a_deposit: u64, /// micro-MINT funded by party B. pub party_b_deposit: u64, /// Current balance for party A (per latest signed state). pub balance_a: u64, /// Current balance for party B (per latest signed state). pub balance_b: u64, /// Monotonically increasing sequence number for the latest signed state. pub sequence: u64, /// Block height at which the channel was opened. pub opened_at_height: u64, /// Block height at which a dispute was filed (if any). pub dispute_height: Option, /// Channel status. pub status: PaymentChannelStatus } ``` Source line: `164`. ## escrow::PaymentChannelStatus [#escrowpaymentchannelstatus] Status of a CZAC payment channel. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum PaymentChannelStatus { /// Channel is open and accepting off-chain balance updates. Open, /// A unilateral close has been initiated; in dispute window. Disputed, /// Channel is cooperatively or unilaterally closed and settled. Settled, } ``` Source line: `192`. ## escrow::PaymentChannelEscrow::new [#escrowpaymentchannelescrownew] Create a new payment channel escrow. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] pub fn new( channel_id: String, party_a_did: String, party_b_did: String, party_a_deposit: u64, party_b_deposit: u64, opened_at_height: u64, ) -> Self; ``` Source line: `204`. ## escrow::PaymentChannelEscrow::total\_capacity [#escrowpaymentchannelescrowtotal_capacity] Total channel capacity. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] pub fn total_capacity(&self) -> u64; ``` Source line: `228`. ## escrow::PaymentChannelEscrow::update\_balance [#escrowpaymentchannelescrowupdate_balance] Apply a signed balance update. The balances must sum to total capacity. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] pub fn update_balance( &mut self, balance_a: u64, balance_b: u64, sequence: u64, ) -> Result<(), EconomicsError>; ``` Source line: `233`. ## escrow::PaymentChannelEscrow::cooperative\_close [#escrowpaymentchannelescrowcooperative_close] Cooperatively close the channel. Returns `(party_a_payout, party_b_payout)`. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] pub fn cooperative_close(&mut self) -> Result<(u64, u64), EconomicsError>; ``` Source line: `263`. ## escrow::PaymentChannelEscrow::initiate\_dispute [#escrowpaymentchannelescrowinitiate_dispute] Initiate a unilateral dispute at the given block height. ```rust #[cfg(feature = "compute")] #[cfg(feature = "czac")] pub fn initiate_dispute(&mut self, height: u64) -> Result<(), EconomicsError>; ``` Source line: `272`. ## escrow::LandAuctionEscrow [#escrowlandauctionescrow] Escrow for a Nova land auction bid. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LandAuctionEscrow { /// Parcel ID being auctioned. pub parcel_id: String, /// OAS DID of the highest bidder. pub bidder_did: String, /// Current highest bid in micro-MINT. pub bid_amount: u64, /// Block height at which the auction started. pub auction_start_height: u64, /// Block height at which the auction ends. pub auction_end_height: u64, /// Whether the auction has been finalized. pub finalized: bool } ``` Source line: `289`. ## escrow::LandAuctionEscrow::new [#escrowlandauctionescrownew] Create a new land auction escrow with the first bid. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn new( parcel_id: String, bidder_did: String, bid_amount: u64, auction_start_height: u64, auction_duration_blocks: u64, ) -> Self; ``` Source line: `307`. ## escrow::LandAuctionEscrow::place\_bid [#escrowlandauctionescrowplace_bid] Place a higher bid. Returns the previous bidder DID and amount for refund. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn place_bid( &mut self, bidder_did: String, amount: u64, current_height: u64, ) -> Result<(String, u64), EconomicsError>; ``` Source line: `325`. ## escrow::LandAuctionEscrow::finalize [#escrowlandauctionescrowfinalize] Finalize the auction. Returns the winner DID and winning bid. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn finalize(&mut self, current_height: u64) -> Result<(String, u64), EconomicsError>; ``` Source line: `353`. ## escrow::RentEscrow [#escrowrentescrow] Escrow for recurring Nova property rent payments via CZAC payment channels. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RentEscrow { /// Parcel ID being rented. pub parcel_id: String, /// OAS DID of the tenant. pub tenant_did: String, /// OAS DID of the landlord (parcel owner). pub landlord_did: String, /// Rent amount per epoch in micro-MINT. pub rent_per_epoch: u64, /// Total micro-MINT deposited by the tenant. pub total_deposited: u64, /// Total micro-MINT paid to the landlord so far. pub total_paid: u64, /// Epoch at which the lease started. pub lease_start_epoch: u64, /// Number of epochs the lease is valid for. pub lease_duration_epochs: u64 } ``` Source line: `372`. ## escrow::RentEscrow::new [#escrowrentescrownew] Create a new rent escrow. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn new( parcel_id: String, tenant_did: String, landlord_did: String, rent_per_epoch: u64, deposit: u64, lease_start_epoch: u64, lease_duration_epochs: u64, ) -> Self; ``` Source line: `394`. ## escrow::RentEscrow::remaining\_deposit [#escrowrentescrowremaining_deposit] Remaining deposit available to cover rent. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn remaining_deposit(&self) -> u64; ``` Source line: `416`. ## escrow::RentEscrow::pay\_epoch [#escrowrentescrowpay_epoch] Process rent payment for one epoch. Returns the amount paid. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn pay_epoch(&mut self) -> Result; ``` Source line: `421`. ## escrow::RentEscrow::is\_expired [#escrowrentescrowis_expired] Check if the lease has expired at the given epoch. ```rust #[cfg(feature = "compute")] #[cfg(feature = "nova")] pub fn is_expired(&self, current_epoch: u64) -> bool; ``` Source line: `437`. # sigil-economics URL: https://docs.sigil.ml/reference/rust/sigil-economics Markdown: https://docs.sigil.ml/reference/rust/sigil-economics.md Economic model for the Sigil blockchain — staking, rewards, slashing, bonds, escrow Economic model for the Sigil blockchain — staking, rewards, slashing, bonds, escrow | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-economics` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-economics/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_economics` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-economics = { path = "../sigil-economics" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `czac` | `sigil-core/czac` | | `nova` | `sigil-core/nova` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-economics/crate) — 13 declarations * [bonds](/reference/rust/sigil-economics/bonds) — 7 declarations * [error](/reference/rust/sigil-economics/error) — 1 declarations * [rewards](/reference/rust/sigil-economics/rewards) — 5 declarations * [slashing](/reference/rust/sigil-economics/slashing) — 7 declarations * [staking](/reference/rust/sigil-economics/staking) — 16 declarations * [escrow](/reference/rust/sigil-economics/escrow) — 24 declarations # sigil-economics · rewards URL: https://docs.sigil.ml/reference/rust/sigil-economics/rewards Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/rewards.md Source declarations, signatures and documentation for rewards. Source: `sigil/node/sigil-economics/src/rewards.rs`. SHA-256: `10143805d37352cd5bec5c00c384d26d794a994dc2e35ca96b1cf9ac528a22e1`. 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. ## rewards::RewardConfig [#rewardsrewardconfig] Configuration governing block reward computation. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RewardConfig { /// Base block reward in micro-MINT (before generation decay). pub base_block_reward: u64, /// Generation decay factor (0 < beta <= 1). Typically 0.85. pub generation_decay_beta: f64, /// Minimum fraction of the validator portion that goes to the human root. /// Typically 0.51 (51%). pub min_human_share: f64, /// Fraction of the base block reward taken by the treasury. /// Typically 0.15 (15%). pub treasury_fraction: f64 } ``` Source line: `17`. ## rewards::RewardDistribution [#rewardsrewarddistribution] The fully computed reward distribution for a single block. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RewardDistribution { /// Block height this distribution applies to. pub block_height: u64, /// OAS DID of the block proposer. pub proposer_did: String, /// micro-MINT awarded to the proposer (validator operator). pub proposer_reward: u64, /// micro-MINT awarded to the human root. pub human_root_reward: u64, /// micro-MINT sent to the protocol treasury. pub treasury_reward: u64, /// Per-delegator rewards. pub delegator_rewards: Vec } ``` Source line: `43`. ## rewards::DelegatorReward [#rewardsdelegatorreward] Reward for a single delegator. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegatorReward { /// OAS DID of the delegator. pub delegator_did: String, /// micro-MINT awarded to this delegator. pub amount: u64 } ``` Source line: `60`. ## rewards::compute\_block\_reward [#rewardscompute_block_reward] Compute the generation-decayed block reward. `reward = base_block_reward * beta^generation` Result is floored to the nearest micro-MINT. ```rust pub fn compute_block_reward(config: &RewardConfig, generation: u32) -> u64; ``` Source line: `72`. ## rewards::distribute\_rewards [#rewardsdistribute_rewards] Distribute rewards for a single block. Steps: 1. Compute treasury share from the base reward. 2. Compute the generation-decayed reward for the validator portion. 3. Ensure the human root receives at least `min_human_share` of the validator portion. 4. Divide the remainder between proposer (self-stake) and delegators (delegated stake) in proportion to their contributions. ```rust pub fn distribute_rewards( config: &RewardConfig, block_height: u64, proposer: &StakeRecord, delegations: &[Delegation], ) -> RewardDistribution; ``` Source line: `87`. # sigil-economics · slashing URL: https://docs.sigil.ml/reference/rust/sigil-economics/slashing Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/slashing.md Source declarations, signatures and documentation for slashing. Source: `sigil/node/sigil-economics/src/slashing.rs`. SHA-256: `8319d2c50cf009c062c88becbf664540858e94bd99e6a79fd6b000d02f1afd3c`. 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. ## slashing::SlashOffense [#slashingslashoffense] Types of slashable offenses with associated severity multipliers. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum SlashOffense { /// Signing two different blocks at the same height. Severity 3.0x. DoubleSign, /// Extended validator downtime. Severity 1.0x. Downtime, /// Proposing an invalid block. Severity 2.0x. InvalidBlock, /// Presenting equivocation evidence. Severity 2.5x. EquivocationEvidence, /// Attempting to censor transactions. Severity 2.0x. CensorshipAttempt, /// Committing an invalid state transition. Severity 3.0x. InvalidStateTransition, } ``` Source line: `18`. ## slashing::SlashOffense::severity\_multiplier [#slashingslashoffenseseverity_multiplier] The severity multiplier applied to the base slash rate for this offense. ```rust pub fn severity_multiplier(&self) -> f64; ``` Source line: `35`. ## slashing::SlashOffense::should\_jail [#slashingslashoffenseshould_jail] Whether this offense results in jailing the validator. ```rust pub fn should_jail(&self) -> bool; ``` Source line: `47`. ## slashing::SlashConfig [#slashingslashconfig] Parameters governing how slashing penalties are computed. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SlashConfig { /// Base fraction of total stake to slash (before severity multiplier). /// For example, 0.05 means 5% base slash. pub base_slash_rate: f64, /// How much of the slash propagates to the human root. /// 1.0 means the human root bears the FULL penalty. pub slashing_delta: f64 } ``` Source line: `58`. ## slashing::SlashResult [#slashingslashresult] The outcome of a slash computation. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SlashResult { /// OAS DID of the slashed validator. pub validator_did: String, /// OAS DID of the validator's human root. pub human_root_did: String, /// The offense that triggered the slash. pub offense: SlashOffense, /// Total micro-MINT slashed from the validator. pub amount_slashed: u64, /// The severity multiplier that was applied. pub severity_multiplier: f64, /// micro-MINT penalty charged to the human root (delta * amount_slashed). pub human_root_penalty: u64, /// Whether the validator should be jailed as a result of this offense. pub jail: bool } ``` Source line: `82`. ## slashing::compute\_slash [#slashingcompute_slash] Compute the slash amounts for a given offense. `amount_slashed = total_stake * base_slash_rate * severity_multiplier` `human_root_penalty = amount_slashed * slashing_delta` The amount is capped at the validator's total stake. ```rust pub fn compute_slash( config: &SlashConfig, stake_record: &StakeRecord, offense: SlashOffense, ) -> SlashResult; ``` Source line: `109`. ## slashing::apply\_slash [#slashingapply_slash] Apply a previously computed slash to a validator's stake record. Deducts `amount_slashed` from self\_stake (capped at self\_stake), and optionally jails the validator. ```rust pub fn apply_slash( stake_record: &mut StakeRecord, slash_result: &SlashResult, ) -> Result<(), EconomicsError>; ``` Source line: `138`. # sigil-economics · staking URL: https://docs.sigil.ml/reference/rust/sigil-economics/staking Markdown: https://docs.sigil.ml/reference/rust/sigil-economics/staking.md Source declarations, signatures and documentation for staking. Source: `sigil/node/sigil-economics/src/staking.rs`. SHA-256: `4f07a1633f16d77f266547e9be06b2ff2da63149a988bd46e806c0fc2bcdc605`. 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. ## staking::MIN\_BP\_STAKE [#stakingmin_bp_stake] Minimum self-stake for a Block Producer: 10,000 MINT = 10\_000\_000\_000 micro-MINT. ```rust pub const MIN_BP_STAKE: u64; ``` Source line: `11`. ## staking::MIN\_BV\_STAKE [#stakingmin_bv_stake] Minimum self-stake for a Block Validator: 1,000 MINT = 1\_000\_000\_000 micro-MINT. ```rust pub const MIN_BV_STAKE: u64; ``` Source line: `14`. ## staking::UNBONDING\_EPOCHS [#stakingunbonding_epochs] Number of epochs a validator must wait after initiating unstake. ```rust pub const UNBONDING_EPOCHS: u64; ``` Source line: `17`. ## staking::StakeRecord [#stakingstakerecord] A validator's stake record. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StakeRecord { /// OAS DID of the validator. pub validator_did: String, /// OAS DID of the human root that spawned this validator. pub human_root_did: String, /// Lineage generation (0 = human root itself, 1 = direct child, ...). pub generation: u32, /// micro-MINT staked by the validator itself. pub self_stake: u64, /// micro-MINT delegated to this validator by others. pub delegated_stake: u64, /// Whether this validator produces blocks or only validates them. pub mode: ValidatorMode, /// Current lifecycle status. pub status: StakeStatus, /// Epoch at which unbonding completes (set when unbonding begins). pub unbonding_epoch: Option } ``` Source line: `25`. ## staking::StakeRecord::total\_stake [#stakingstakerecordtotal_stake] Total stake = self-stake + delegated stake. ```rust pub fn total_stake(&self) -> u64; ``` Source line: `46`. ## staking::StakeRecord::meets\_minimum [#stakingstakerecordmeets_minimum] Whether the validator's self-stake meets the mode-specific minimum. ```rust pub fn meets_minimum(&self) -> bool; ``` Source line: `51`. ## staking::StakeRecord::can\_unstake [#stakingstakerecordcan_unstake] Whether the validator is in a state that allows unstaking. ```rust pub fn can_unstake(&self) -> bool; ``` Source line: `57`. ## staking::StakeStatus [#stakingstakestatus] Current lifecycle status of a validator. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum StakeStatus { /// Validator is active and participating in consensus. Active, /// Validator has initiated unstake; waiting for unbonding period. Unbonding, /// Unbonding complete; funds are free. Unbonded, /// Validator is jailed (e.g., for double-signing). Jailed, } ``` Source line: `64`. ## staking::Delegation [#stakingdelegation] A delegation from a delegator to a validator. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Delegation { /// OAS DID of the delegator. pub delegator_did: String, /// OAS DID of the validator receiving delegation. pub validator_did: String, /// micro-MINT delegated. pub amount: u64, /// Epoch at which this delegation started. pub start_epoch: u64, /// If set, the delegator is withdrawing some portion. pub pending_undelegation: Option } ``` Source line: `81`. ## staking::PendingUndelegation [#stakingpendingundelegation] An in-progress undelegation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PendingUndelegation { /// micro-MINT being undelegated. pub amount: u64, /// Epoch when undelegation completes. pub completion_epoch: u64 } ``` Source line: `96`. ## staking::min\_stake\_for\_mode [#stakingmin_stake_for_mode] Returns the minimum self-stake for the given validator mode. ```rust pub fn min_stake_for_mode(mode: &ValidatorMode) -> u64; ``` Source line: `108`. ## staking::apply\_stake\_deposit [#stakingapply_stake_deposit] Deposit additional stake into a validator record. Returns an error if the validator is jailed or unbonding. ```rust pub fn apply_stake_deposit(record: &mut StakeRecord, amount: u64) -> Result<(), EconomicsError>; ``` Source line: `118`. ## staking::apply\_unstake [#stakingapply_unstake] Begin the unstaking process for a validator. Reduces self-stake by `amount` and sets status to `Unbonding` if the remaining self-stake no longer meets the mode minimum. Otherwise the validator stays `Active` but the amount is still deducted. ```rust pub fn apply_unstake( record: &mut StakeRecord, amount: u64, current_epoch: u64, ) -> Result<(), EconomicsError>; ``` Source line: `146`. ## staking::apply\_delegation [#stakingapply_delegation] Add delegation to an existing delegation record. ```rust pub fn apply_delegation(delegation: &mut Delegation, amount: u64) -> Result<(), EconomicsError>; ``` Source line: `180`. ## staking::apply\_undelegation [#stakingapply_undelegation] Begin undelegation of `amount` from a delegation. Subtracts `amount` from the delegation's active balance and sets a pending undelegation record. ```rust pub fn apply_undelegation( delegation: &mut Delegation, amount: u64, current_epoch: u64, ) -> Result<(), EconomicsError>; ``` Source line: `197`. ## staking::complete\_unbonding [#stakingcomplete_unbonding] Complete unbonding for a validator if the unbonding epoch has passed. Returns `Some(freed_amount)` if the unbonding is complete and the record transitions to `Unbonded`. Returns `None` if the record is not unbonding or the epoch has not yet arrived. ```rust pub fn complete_unbonding(record: &mut StakeRecord, current_epoch: u64) -> Option; ``` Source line: `233`. # sigil-ft-1 · crate URL: https://docs.sigil.ml/reference/rust/sigil-ft-1/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-ft-1/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../contracts/reference/sigil-ft-1/src/lib.rs`. SHA-256: `d7bce61f4eb4c1757b7300daf2a8d84bb682ced007437b60c4549c879eb60094`. 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. ## ::anvil\_alloc [#anvil_alloc] ```rust #[no_mangle] pub extern "C" fn anvil_alloc(len: i32) -> i32; ``` Source line: `22`. ## ::anvil\_init [#anvil_init] ```rust #[no_mangle] pub extern "C" fn anvil_init(ptr: i32, len: i32) -> i32; ``` Source line: `34`. ## ::anvil\_call [#anvil_call] ```rust #[no_mangle] pub extern "C" fn anvil_call(ptr: i32, len: i32) -> i32; ``` Source line: `43`. # sigil-ft-1 URL: https://docs.sigil.ml/reference/rust/sigil-ft-1 Markdown: https://docs.sigil.ml/reference/rust/sigil-ft-1.md sigil-ft-1 implementation in the Sigil workspace. sigil-ft-1 implementation in the Sigil workspace. | Property | Source value | | ---------------- | --------------------------------------------------------- | | Package | `sigil-ft-1` | | Manifest version | `1.0.0` | | Source | `sigil/node/../contracts/reference/sigil-ft-1/Cargo.toml` | | Reference status | source reference | | Publish flag | `false`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_ft_1` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-ft-1 = { path = "../sigil-ft-1" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-ft-1/crate) — 3 declarations # sigil-governance · crate URL: https://docs.sigil.ml/reference/rust/sigil-governance/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-governance/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-governance/src/lib.rs`. SHA-256: `eba33baeb446eee2cd142324cf3ce7b3c4e9d7fdd2d7d5941090cde89a913807`. 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. ## error [#error] ```rust pub mod error; ``` Source line: `5`. ## execution [#execution] ```rust pub mod execution; ``` Source line: `6`. ## proposal [#proposal] ```rust pub mod proposal; ``` Source line: `7`. ## voting [#voting] ```rust pub mod voting; ``` Source line: `8`. ## pub use error::GovernanceError; [#pub-use-errorgovernanceerror] ```rust pub use error::GovernanceError; ``` Source line: `10`. ## pub use execution::\{TimelockEntry, TimelockQueue, TimelockStatus}; [#pub-use-executiontimelockentry-timelockqueue-timelockstatus] ```rust pub use execution::{TimelockEntry, TimelockQueue, TimelockStatus}; ``` Source line: `11`. ## pub use proposal::\{Proposal, ProposalPayload, ProposalStatus, ProposalType}; [#pub-use-proposalproposal-proposalpayload-proposalstatus-proposaltype] ```rust pub use proposal::{Proposal, ProposalPayload, ProposalStatus, ProposalType}; ``` Source line: `12`. ## pub use voting::\{Vote, VoteChoice, VotingResult, VotingTally}; [#pub-use-votingvote-votechoice-votingresult-votingtally] ```rust pub use voting::{Vote, VoteChoice, VotingResult, VotingTally}; ``` Source line: `13`. # sigil-governance · error URL: https://docs.sigil.ml/reference/rust/sigil-governance/error Markdown: https://docs.sigil.ml/reference/rust/sigil-governance/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-governance/src/error.rs`. SHA-256: `b86420f84e6522d569701fe8d92930482f253bd147dde8607e5484050b227cca`. 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. ## error::GovernanceError [#errorgovernanceerror] Errors that can occur during governance operations. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum GovernanceError { #[error("proposal not found: {0}")] ProposalNotFound(String), #[error("invalid proposal transition from {from:?} to {to:?}")] InvalidProposalTransition { from: ProposalStatus, to: ProposalStatus, }, #[error("insufficient deposit: required {required}, provided {provided}")] InsufficientDeposit { required: u64, provided: u64 }, #[error("voting not active for proposal: {0}")] VotingNotActive(String), #[error("voter {voter_did} already voted on proposal {proposal_id}")] AlreadyVoted { voter_did: String, proposal_id: String, }, #[error("voter not eligible: {0}")] NotEligibleToVote(String), #[error("timelock not ready for proposal {proposal_id}: current epoch {current_epoch}, execution epoch {execution_epoch}")] TimelockNotReady { proposal_id: String, current_epoch: u64, execution_epoch: u64, }, #[error("proposal expired: {0}")] ProposalExpired(String), #[error("invalid payload: {0}")] InvalidPayload(String), #[error("emergency action not authorized: {0}")] EmergencyNotAuthorized(String), } ``` Source line: `7`. # sigil-governance · execution URL: https://docs.sigil.ml/reference/rust/sigil-governance/execution Markdown: https://docs.sigil.ml/reference/rust/sigil-governance/execution.md Source declarations, signatures and documentation for execution. Source: `sigil/node/sigil-governance/src/execution.rs`. SHA-256: `a4d3385a3a3eecb89d597655f6c432c4651e3c8afa71489d09ca445c333422a1`. 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. ## execution::TimelockStatus [#executiontimelockstatus] Lifecycle of a timelock entry. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum TimelockStatus { /// Waiting for the execution epoch. Pending, /// Current epoch has reached or passed the execution epoch. Ready, /// Successfully executed. Executed, /// Cancelled before execution. Cancelled, } ``` Source line: `14`. ## execution::TimelockEntry [#executiontimelockentry] A single entry in the timelock queue representing a passed proposal awaiting execution. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TimelockEntry { /// ID of the passed proposal. pub proposal_id: String, /// Proposal type (determines timelock duration). pub proposal_type: ProposalType, /// The action to execute. pub payload: ProposalPayload, /// Epoch at which this entry becomes executable. pub execution_epoch: u64, /// Current status of this entry. pub status: TimelockStatus } ``` Source line: `32`. ## execution::TimelockQueue [#executiontimelockqueue] Ordered collection of timelock entries waiting for execution. ```rust #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct TimelockQueue { } ``` Source line: `51`. ## execution::TimelockQueue::new [#executiontimelockqueuenew] Create an empty timelock queue. ```rust #[must_use] pub fn new() -> Self; ``` Source line: `58`. ## execution::TimelockQueue::add [#executiontimelockqueueadd] Add an entry to the queue. ```rust pub fn add(&mut self, entry: TimelockEntry); ``` Source line: `65`. ## execution::TimelockQueue::ready\_entries [#executiontimelockqueueready_entries] Return all entries whose execution epoch has been reached and whose status is still \[`TimelockStatus::Pending`]. This method also promotes matching entries to \[`TimelockStatus::Ready`]. ```rust pub fn ready_entries(&mut self, current_epoch: u64) -> Vec<&TimelockEntry>; ``` Source line: `73`. ## execution::TimelockQueue::cancel [#executiontimelockqueuecancel] Cancel a pending or ready entry. Returns an error if the entry is not found or has already been executed/cancelled. ```rust pub fn cancel(&mut self, proposal_id: &str) -> Result<(), GovernanceError>; ``` Source line: `90`. ## execution::TimelockQueue::mark\_executed [#executiontimelockqueuemark_executed] Mark an entry as executed. Returns an error if the entry is not found or is not in the \[`TimelockStatus::Ready`] state. ```rust pub fn mark_executed(&mut self, proposal_id: &str) -> Result<(), GovernanceError>; ``` Source line: `111`. ## execution::TimelockQueue::pending\_count [#executiontimelockqueuepending_count] Number of entries still in \[`TimelockStatus::Pending`] state. ```rust #[must_use] pub fn pending_count(&self) -> usize; ``` Source line: `133`. ## execution::TimelockQueue::len [#executiontimelockqueuelen] Total number of entries in the queue (all statuses). ```rust #[must_use] pub fn len(&self) -> usize; ``` Source line: `142`. ## execution::TimelockQueue::is\_empty [#executiontimelockqueueis_empty] Returns `true` if the queue has no entries. ```rust #[must_use] pub fn is_empty(&self) -> bool; ``` Source line: `148`. # sigil-governance URL: https://docs.sigil.ml/reference/rust/sigil-governance Markdown: https://docs.sigil.ml/reference/rust/sigil-governance.md On-chain governance for the Sigil blockchain — proposals, voting, execution On-chain governance for the Sigil blockchain — proposals, voting, execution | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-governance` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-governance/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_governance` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-governance = { path = "../sigil-governance" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-governance/crate) — 8 declarations * [error](/reference/rust/sigil-governance/error) — 1 declarations * [execution](/reference/rust/sigil-governance/execution) — 11 declarations * [proposal](/reference/rust/sigil-governance/proposal) — 13 declarations * [voting](/reference/rust/sigil-governance/voting) — 10 declarations # sigil-governance · proposal URL: https://docs.sigil.ml/reference/rust/sigil-governance/proposal Markdown: https://docs.sigil.ml/reference/rust/sigil-governance/proposal.md Source declarations, signatures and documentation for proposal. Source: `sigil/node/sigil-governance/src/proposal.rs`. SHA-256: `b16ff906488a6ec4dad5dcfe077f98fef85bd10faafd22d116ae3c7f0bda96dd`. 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. ## proposal::ProposalType [#proposalproposaltype] The five governance proposal types, each with different approval thresholds, voting periods, and timelock durations. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ProposalType { /// Change a chain parameter (60% threshold). ParameterChange, /// Upgrade a WASI module binary (75% threshold). WasiModuleUpgrade, /// Spend funds from the community treasury (67% threshold). TreasurySpend, /// Slash a validator for misbehaviour (67% threshold). ValidatorSlashing, /// Emergency governance action requiring super-majority (80% threshold). EmergencyAction, } ``` Source line: `12`. ## proposal::ProposalType::approval\_threshold [#proposalproposaltypeapproval_threshold] Fraction of (yes / (yes + no + veto)) required for approval. ```rust #[must_use] pub fn approval_threshold(&self) -> f64; ``` Source line: `28`. ## proposal::ProposalType::veto\_threshold [#proposalproposaltypeveto_threshold] Fraction of (veto / (yes + no + veto)) above which the proposal is vetoed. ```rust #[must_use] pub fn veto_threshold(&self) -> f64; ``` Source line: `40`. ## proposal::ProposalType::voting\_period\_epochs [#proposalproposaltypevoting_period_epochs] Number of epochs the voting window is open. ```rust #[must_use] pub fn voting_period_epochs(&self) -> u64; ``` Source line: `46`. ## proposal::ProposalType::timelock\_epochs [#proposalproposaltypetimelock_epochs] Number of epochs between passing and earliest execution. ```rust #[must_use] pub fn timelock_epochs(&self) -> u64; ``` Source line: `55`. ## proposal::ProposalType::min\_deposit [#proposalproposaltypemin_deposit] Minimum deposit in micro-MINT required to submit this proposal type. ```rust #[must_use] pub fn min_deposit(&self) -> u64; ``` Source line: `64`. ## proposal::ProposalPayload [#proposalproposalpayload] Type-specific data carried by a proposal. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum ProposalPayload { /// Change a chain parameter from one value to another. ParameterChange { parameter_path: String, old_value: serde_json::Value, new_value: serde_json::Value, }, /// Upgrade a WASI module to a new binary. WasiModuleUpgrade { module_name: String, current_hash: String, new_hash: String, new_wasm_size: u64, }, /// Transfer funds from the community treasury. TreasurySpend { recipient_did: String, amount: u64, reason: String, }, /// Slash a validator for a documented offense. ValidatorSlashing { validator_did: String, offense_description: String, evidence_hashes: Vec, }, /// Emergency action with freeform parameters. EmergencyAction { action_type: String, parameters: serde_json::Value, }, } ``` Source line: `81`. ## proposal::ProposalStatus [#proposalproposalstatus] Lifecycle states of a governance proposal. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ProposalStatus { /// Collecting the required deposit. Deposit, /// Active voting period. Voting, /// Passed vote but not yet executed (in timelock). Passed, /// Did not reach the approval threshold. Rejected, /// Successfully executed after timelock. Executed, /// Cancelled by the proposer before execution. Cancelled, /// Rejected via NoWithVeto exceeding the veto threshold. Vetoed, /// Execution was attempted but failed. Failed, } ``` Source line: `120`. ## proposal::ProposalStatus::is\_terminal [#proposalproposalstatusis_terminal] Returns `true` if the proposal has reached a final state and cannot transition further. ```rust #[must_use] pub fn is_terminal(&self) -> bool; ``` Source line: `143`. ## proposal::Proposal [#proposalproposal] A governance proposal submitted to the chain. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Proposal { /// Unique proposal identifier. pub id: String, /// DID of the account that submitted the proposal. pub proposer_did: String, /// Category of the proposal, determines thresholds and periods. pub proposal_type: ProposalType, /// Short human-readable title. pub title: String, /// Extended description / rationale. pub description: String, /// Type-specific payload data. pub payload: ProposalPayload, /// Current lifecycle status. pub status: ProposalStatus, /// Epoch at which the proposal was submitted. pub submit_epoch: u64, /// Epoch at which voting begins (after deposit is met). pub voting_start_epoch: u64, /// Epoch at which voting closes. pub voting_end_epoch: u64, /// Epoch at which the proposal may be executed (after timelock). /// `None` until the proposal passes. pub execution_epoch: Option, /// Deposit amount in micro-MINT. pub deposit: u64 } ``` Source line: `157`. ## proposal::Proposal::is\_active [#proposalproposalis_active] Determines whether the proposal is in an active, non-terminal state. ```rust #[must_use] pub fn is_active(&self) -> bool; ``` Source line: `188`. ## proposal::Proposal::is\_terminal [#proposalproposalis_terminal] Determines whether the proposal has reached a terminal state. ```rust #[must_use] pub fn is_terminal(&self) -> bool; ``` Source line: `197`. ## proposal::Proposal::can\_transition\_to [#proposalproposalcan_transition_to] Returns `true` if transitioning from the current status to `new_status` is a legal state machine transition. ```rust #[must_use] pub fn can_transition_to(&self, new_status: ProposalStatus) -> bool; ``` Source line: `204`. # sigil-governance · voting URL: https://docs.sigil.ml/reference/rust/sigil-governance/voting Markdown: https://docs.sigil.ml/reference/rust/sigil-governance/voting.md Source declarations, signatures and documentation for voting. Source: `sigil/node/sigil-governance/src/voting.rs`. SHA-256: `ea9e2356a4fd6467191be7731ecf400c8f552a47e1c915940e1ac90332873fa9`. 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. ## voting::VoteChoice [#votingvotechoice] The four possible vote choices. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum VoteChoice { Yes, No, Abstain, NoWithVeto, } ``` Source line: `15`. ## voting::Vote [#votingvote] A single vote cast by a participant. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Vote { /// DID of the voter. pub voter_did: String, /// Proposal being voted on. pub proposal_id: String, /// The voter's choice. pub choice: VoteChoice, /// Raw staked balance in micro-MINT. pub stake_weight: u64, /// Trust factor derived from OATS lineage score (range 0.0 ..= 2.0). pub lineage_trust_factor: f64, /// `stake_weight * lineage_trust_factor`, rounded and clamped. pub effective_weight: u64, /// Epoch at which the vote was recorded. pub cast_epoch: u64 } ``` Source line: `28`. ## voting::Vote::compute\_effective\_weight [#votingvotecompute_effective_weight] Compute effective voting weight from raw stake and trust factor. The trust factor is clamped to `[0.0, 2.0]` and the multiplication is performed in floating-point then rounded, with the result clamped to `u64::MAX` to avoid overflow. ```rust #[must_use] pub fn compute_effective_weight(stake: u64, trust_factor: f64) -> u64; ``` Source line: `52`. ## voting::VotingTally [#votingvotingtally] Accumulated vote totals for a single proposal. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct VotingTally { /// Proposal being tallied. pub proposal_id: String, /// Sum of effective weights for Yes votes. pub yes_weight: u64, /// Sum of effective weights for No votes. pub no_weight: u64, /// Sum of effective weights for Abstain votes. pub abstain_weight: u64, /// Sum of effective weights for NoWithVeto votes. pub veto_weight: u64, /// Total effective weight that has been cast (all choices). pub total_voted_weight: u64, /// Total effective weight eligible to vote (set externally). pub total_eligible_weight: u64, /// Number of individual votes cast. pub vote_count: u32 } ``` Source line: `73`. ## voting::VotingTally::new [#votingvotingtallynew] Create an empty tally for the given proposal. ```rust #[must_use] pub fn new(proposal_id: impl Into) -> Self; ``` Source line: `98`. ## voting::VotingTally::add\_vote [#votingvotingtallyadd_vote] Record a vote, accumulating its effective weight into the correct bucket. Returns `false` if the voter already has a recorded vote (use [`remove_vote`](Self::remove_vote) first to change a vote). ```rust pub fn add_vote(&mut self, vote: &Vote) -> bool; ``` Source line: `116`. ## voting::VotingTally::remove\_vote [#votingvotingtallyremove_vote] Remove a previously recorded vote so the voter may cast a new one. Returns `true` if the vote was found and removed. ```rust pub fn remove_vote(&mut self, voter_did: &str) -> bool; ``` Source line: `131`. ## voting::VotingTally::compute\_result [#votingvotingtallycompute_result] Compute the final result given proposal type and total eligible weight. ```rust #[must_use] pub fn compute_result(&self, proposal_type: ProposalType, total_eligible: u64) -> VotingResult; ``` Source line: `143`. ## voting::VotingTally::quorum\_reached [#votingvotingtallyquorum_reached] Returns `true` if the participation ratio meets or exceeds the minimum. ```rust #[must_use] pub fn quorum_reached(&self, min_participation: f64) -> bool; ``` Source line: `179`. ## voting::VotingResult [#votingvotingresult] The computed outcome of a vote. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct VotingResult { /// Proposal this result belongs to. pub proposal_id: String, /// Whether the proposal passed. pub passed: bool, /// Whether the proposal was vetoed. pub vetoed: bool, /// yes / (yes + no + veto). pub approval_ratio: f64, /// veto / (yes + no + veto). pub veto_ratio: f64, /// total_voted / total_eligible. pub participation_ratio: f64, /// Underlying tally data. pub tally: VotingTally } ``` Source line: `213`. # sigil-keyloader · crate URL: https://docs.sigil.ml/reference/rust/sigil-keyloader/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-keyloader/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-keyloader/src/lib.rs`. SHA-256: `16106d0affea8ed4c43bde11d72ea5177a64d7f4ffc601b7dcc4afac28249301`. 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. ## ::KeyloaderError [#keyloadererror] ```rust #[derive(Debug, thiserror::Error)] pub enum KeyloaderError { #[error("invalid argument: {0}")] InvalidArgument(String), #[error("OpenBao request failed: {0}")] OpenBao(String), #[error("validator key payload is invalid: {0}")] InvalidPayload(String), #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("JSON error: {0}")] Json(#[from] serde_json::Error), #[error("HTTP client error: {0}")] Http(#[from] reqwest::Error), } ``` Source line: `16`. ## ::ValidatorKeys [#validatorkeys] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ValidatorKeys { pub consensus_pubkey: String, pub consensus_secret: String, pub network_pubkey: String, pub network_secret: String, pub validator_did: String, #[serde(default = "default_tower_addr")] pub tower_addr: String, #[serde(default)] pub tower_region: Option } ``` Source line: `32`. ## ::ValidatorKeys::validate [#validatorkeysvalidate] ```rust pub fn validate(&self) -> Result<(), KeyloaderError>; ``` Source line: `45`. ## ::FetchConfig [#fetchconfig] ```rust #[derive(Debug, Clone)] pub struct FetchConfig { pub openbao_addr: String, pub role: String, pub secret_path: String, pub token_path: PathBuf, pub auth_path: String, pub namespace: Option } ``` Source line: `84`. ## ::FetchConfig::validate [#fetchconfigvalidate] ```rust pub fn validate(&self) -> Result<(), KeyloaderError>; ``` Source line: `94`. ## ::openbao\_kv2\_read\_path [#openbao_kv2_read_path] ```rust pub fn openbao_kv2_read_path(secret_path: &str) -> String; ``` Source line: `129`. ## ::extract\_validator\_keys [#extract_validator_keys] ```rust pub fn extract_validator_keys(payload: &Value) -> Result; ``` Source line: `144`. ## ::fetch\_openbao\_validator\_keys [#fetch_openbao_validator_keys] ```rust pub fn fetch_openbao_validator_keys(config: &FetchConfig) -> Result; ``` Source line: `155`. ## ::write\_validator\_keys\_atomically [#write_validator_keys_atomically] ```rust pub fn write_validator_keys_atomically( keys: &ValidatorKeys, output: &Path, ) -> Result<(), KeyloaderError>; ``` Source line: `219`. # sigil-keyloader URL: https://docs.sigil.ml/reference/rust/sigil-keyloader Markdown: https://docs.sigil.ml/reference/rust/sigil-keyloader.md OpenBao-backed validator key material loader for Sigil Kubernetes init containers OpenBao-backed validator key material loader for Sigil Kubernetes init containers | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-keyloader` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-keyloader/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_keyloader` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-keyloader = { path = "../sigil-keyloader" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-keyloader/crate) — 9 declarations # sigil-ingestor · crate URL: https://docs.sigil.ml/reference/rust/sigil-ingestor/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-ingestor/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-ingestor/src/lib.rs`. SHA-256: `381d8cf903b34ca6d7c5a060d069fc7438ac08ba3fb2f83a393a71610cf9ffc7`. 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. ## ::IngestorError [#ingestorerror] ```rust #[derive(Debug, Error)] pub enum IngestorError { #[error("config IO: {0}")] Io(#[from] std::io::Error), #[error("config parse: {0}")] Toml(#[from] toml::de::Error), #[error("invalid config: {0}")] InvalidConfig(String), #[error("invalid hash: {0}")] InvalidHash(String), } ``` Source line: `18`. ## ::ConfiguredSourceKind [#configuredsourcekind] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ConfiguredSourceKind { InZone, CrossZone, ComputeCompletion, TimeBlockHeight, TimeAttestedWallClock, TeeAttested, } ``` Source line: `31`. ## ::ConfiguredSourceKind::event\_source\_kind [#configuredsourcekindevent_source_kind] ```rust pub fn event_source_kind(&self) -> EventSourceKind; ``` Source line: `41`. ## ::IngestorSourceConfig [#ingestorsourceconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IngestorSourceConfig { pub name: String, pub subscription_id: String, pub kind: ConfiguredSourceKind, #[serde(default = "default_confirmations")] pub confirmation_depth: u64, #[serde(default = "default_poll_interval_secs")] pub poll_interval_secs: u64 } ``` Source line: `53`. ## ::IngestorConfig [#ingestorconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct IngestorConfig { pub ingestor_did: String, pub node_rpc_url: String, pub local_state_path: String, #[serde(default = "default_fee_per_delivery")] pub fee_per_delivery: u64, #[serde(default)] pub dry_run: bool, #[serde(default)] pub sources: Vec } ``` Source line: `64`. ## ::IngestorConfig::from\_path [#ingestorconfigfrom_path] ```rust pub fn from_path(path: &Path) -> Result; ``` Source line: `89`. ## ::IngestorConfig::validate [#ingestorconfigvalidate] ```rust pub fn validate(&self) -> Result<(), IngestorError>; ``` Source line: `94`. ## ::IngestorSourceConfig::validate [#ingestorsourceconfigvalidate] ```rust pub fn validate(&self) -> Result<(), IngestorError>; ``` Source line: `119`. ## ::validate\_rpc\_url [#validate_rpc_url] ```rust pub fn validate_rpc_url(url: &str) -> Result<(), IngestorError>; ``` Source line: `140`. ## ::parse\_hash [#parse_hash] ```rust pub fn parse_hash(value: &str) -> Result; ``` Source line: `156`. ## ::build\_block\_height\_delivery [#build_block_height_delivery] ```rust pub fn build_block_height_delivery( subscription_id: SigilHash, ingestor_did: String, target_height: u64, payload: serde_json::Value, ) -> EventDeliveryData; ``` Source line: `160`. # sigil-ingestor URL: https://docs.sigil.ml/reference/rust/sigil-ingestor Markdown: https://docs.sigil.ml/reference/rust/sigil-ingestor.md Reference off-chain Vigils ingestor Reference off-chain Vigils ingestor | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-ingestor` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-ingestor/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_ingestor` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-ingestor = { path = "../sigil-ingestor" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-ingestor/crate) — 11 declarations # sigil-labor-api · auth URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/auth Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/auth.md Source declarations, signatures and documentation for auth. Source: `sigil/node/../labor-api/src/auth.rs`. SHA-256: `394b621dd57390f77fdc00e59c8c06657a89c1344ffa137e206c9c3b96b6504c`. 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. ## auth::MAX\_CLOCK\_SKEW\_SECS [#authmax_clock_skew_secs] Maximum allowed clock skew between client and server. ```rust pub const MAX_CLOCK_SKEW_SECS: i64; ``` Source line: `65`. ## auth::AuthDid [#authauthdid] The authenticated principal, attached as a request extension after the auth middleware runs. Handlers extract it via `axum::Extension`. ```rust #[derive(Debug, Clone)] pub struct AuthDid { pub did: String, pub public_key: [u8; 32] } ``` Source line: `73`. ## auth::AuthDid::as\_str [#authauthdidas_str] Convenience: returns the DID as a `&str`. ```rust pub fn as_str(&self) -> &str; ``` Source line: `80`. ## auth::AuthError [#authautherror] Errors produced by the auth middleware. Each variant maps to an HTTP 4xx with a stable error code so clients can branch. ```rust #[derive(Debug)] pub enum AuthError { MissingHeader(&'static str), BadHeader { name: &'static str, reason: String }, BadTimestamp(String), ClockSkew { skew_secs: i64 }, BadSignature, DidPubkeyMismatch, DidRegistryUnavailable(String), DidRegistryRejected(String), BodyTooLarge, InternalError(String), } ``` Source line: `88`. ## auth::canonical\_request\_bytes [#authcanonical_request_bytes] Build the canonical request transcript that the client signs. ```rust pub fn canonical_request_bytes( method: &str, path: &str, timestamp_iso: &str, body: &[u8], ) -> Vec; ``` Source line: `159`. ## auth::require\_did\_signed [#authrequire_did_signed] Tower middleware that authenticates the request via DID-signed headers. Read-only routes (HTTP `GET`, plus the `/health` probe) bypass auth so observability and probes work without credentials. Mutating routes require the full header set. ```rust pub async fn require_did_signed(req: Request, next: Next) -> Result; ``` Source line: `185`. # sigil-labor-api · config URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/config Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/config.md Source declarations, signatures and documentation for config. Source: `sigil/node/../labor-api/src/config.rs`. SHA-256: `924443031026fc500f9b72aac34c7aaaae0627150ce270af38cf500c39fdb31e`. 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. ## config::ServerConfig [#configserverconfig] Top-level server configuration. ```rust #[derive(Debug, Clone, Deserialize)] #[serde(default)] pub struct ServerConfig { /// Socket address to bind the HTTP listener. pub listen_addr: SocketAddr, /// PostgreSQL connection URL. /// /// When absent and `LABOR_ALLOW_MEMORY_STORE=1` is not set, the server /// refuses to start. pub database_url: Option, /// Log level / `RUST_LOG` directive (e.g. `info`, `debug`). pub log_level: String, /// Sigil node JSON-RPC URL used to verify HMR/MHR/ENR principals against /// the on-chain GAL registry. pub identity_rpc_url: Option } ``` Source line: `13`. # sigil-labor-api · crate URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../labor-api/src/lib.rs`. SHA-256: `a5dea71cf7d4a2b49665449db19a3bb531f383dd8b1c0811a7d4fecdc4707252`. 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. ## auth [#auth] Library interface for sigil-labor-api. Exposes the public modules so that integration tests in `tests/` can access the store trait, types, and error types directly. ```rust pub mod auth; ``` Source line: `6`. ## config [#config] ```rust pub mod config; ``` Source line: `7`. ## error [#error] ```rust pub mod error; ``` Source line: `8`. ## handlers [#handlers] ```rust pub mod handlers; ``` Source line: `9`. ## idempotency [#idempotency] ```rust pub mod idempotency; ``` Source line: `10`. ## store [#store] ```rust pub mod store; ``` Source line: `11`. ## types [#types] ```rust pub mod types; ``` Source line: `12`. # sigil-labor-api · error URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/error Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/../labor-api/src/error.rs`. SHA-256: `bb03a40b211648f502b902cc1ae57c46620e3c1f705a594f7c083afc1924f538`. 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. ## error::LaborError [#errorlaborerror] Internal service errors. ```rust #[derive(Debug, thiserror::Error)] pub enum LaborError { #[error("store error: {0}")] Store(String), #[error("not found")] NotFound, #[error("forbidden: {0}")] Forbidden(String), #[error("serialization error: {0}")] Serialization(#[from] serde_json::Error), } ``` Source line: `10`. # sigil-labor-api · handlers URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/handlers Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/handlers.md Source declarations, signatures and documentation for handlers. Source: `sigil/node/../labor-api/src/handlers.rs`. SHA-256: `1a000ed52979da1832dd164225f658c4b764aa501240ddeb32b51dea6ccb3199`. 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. ## handlers::AppState [#handlersappstate] Shared application state. ```rust pub struct AppState { pub store: Arc } ``` Source line: `28`. ## handlers::health [#handlershealth] ```rust pub async fn health() -> &'static str; ``` Source line: `36`. ## handlers::post\_job [#handlerspost_job] ```rust pub async fn post_job( State(state): State>, Extension(auth): Extension>, Json(req): Json, ) -> Result; ``` Source line: `44`. ## handlers::list\_jobs [#handlerslist_jobs] ```rust pub async fn list_jobs( State(state): State>, Query(params): Query, ) -> Result>, LaborError>; ``` Source line: `65`. ## handlers::get\_job [#handlersget_job] ```rust pub async fn get_job( State(state): State>, Path(id): Path, ) -> Result, LaborError>; ``` Source line: `91`. ## handlers::close\_job [#handlersclose_job] ```rust pub async fn close_job( State(state): State>, Extension(auth): Extension>, Path(id): Path, ) -> Result, LaborError>; ``` Source line: `103`. ## handlers::apply\_to\_job [#handlersapply_to_job] ```rust pub async fn apply_to_job( State(state): State>, Extension(auth): Extension>, Path(job_id): Path, Json(req): Json, ) -> Result; ``` Source line: `128`. ## handlers::get\_applications [#handlersget_applications] ```rust pub async fn get_applications( State(state): State>, Path(job_id): Path, Query(params): Query, ) -> Result>, LaborError>; ``` Source line: `152`. ## handlers::create\_contract [#handlerscreate_contract] ```rust pub async fn create_contract( State(state): State>, Extension(auth): Extension>, Json(req): Json, ) -> Result; ``` Source line: `178`. ## handlers::get\_contract [#handlersget_contract] ```rust pub async fn get_contract( State(state): State>, Path(id): Path, ) -> Result, LaborError>; ``` Source line: `210`. ## handlers::complete\_contract [#handlerscomplete_contract] ```rust pub async fn complete_contract( State(state): State>, Extension(auth): Extension>, Path(id): Path, ) -> Result, LaborError>; ``` Source line: `222`. ## handlers::submit\_review [#handlerssubmit_review] ```rust pub async fn submit_review( State(state): State>, Extension(_auth): Extension>, Json(req): Json, ) -> Result; ``` Source line: `251`. ## handlers::get\_reputation [#handlersget_reputation] ```rust pub async fn get_reputation( State(state): State>, Path(agent_id): Path, ) -> Result, LaborError>; ``` Source line: `271`. # sigil-labor-api · idempotency URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/idempotency Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/idempotency.md Source declarations, signatures and documentation for idempotency. Source: `sigil/node/../labor-api/src/idempotency.rs`. SHA-256: `b8196b939a77fd70da3d1f049d6e4b8a1b75c666071c87f72841f33226d2ef43`. 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. ## idempotency::IdempotencyCache [#idempotencyidempotencycache] The shared idempotency cache. Cheap to clone — wraps an `Arc>`. ```rust #[derive(Clone, Default)] pub struct IdempotencyCache { } ``` Source line: `83`. ## idempotency::IdempotencyCache::new [#idempotencyidempotencycachenew] ```rust pub fn new() -> Self; ``` Source line: `89`. ## idempotency::IdempotencyCache::with\_ttl [#idempotencyidempotencycachewith_ttl] ```rust pub fn with_ttl(mut self, ttl: Duration) -> Self; ``` Source line: `96`. ## idempotency::idempotency\_middleware [#idempotencyidempotency_middleware] Tower middleware: deduplicate POST requests by `Idempotency-Key`. Read methods (`GET`, `HEAD`) bypass the cache. ```rust pub async fn idempotency_middleware(cache: IdempotencyCache, req: Request, next: Next) -> Response; ``` Source line: `138`. # sigil-labor-api URL: https://docs.sigil.ml/reference/rust/sigil-labor-api Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api.md Sigil Agent Labor Market — HTTP API for job posting, hiring, and reputation Sigil Agent Labor Market — HTTP API for job posting, hiring, and reputation | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-labor-api` | | Manifest version | `0.1.0` | | Source | `sigil/node/../labor-api/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_labor_api` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-labor-api = { path = "../labor-api" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | -------------- | ---------------------------------- | | `default` | `postgres` | | `postgres` | `dep:sqlx` | | `memory-store` | No additional feature dependencies | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-labor-api/crate) — 7 declarations * [auth](/reference/rust/sigil-labor-api/auth) — 6 declarations * [config](/reference/rust/sigil-labor-api/config) — 1 declarations * [error](/reference/rust/sigil-labor-api/error) — 1 declarations * [handlers](/reference/rust/sigil-labor-api/handlers) — 13 declarations * [idempotency](/reference/rust/sigil-labor-api/idempotency) — 4 declarations * [store](/reference/rust/sigil-labor-api/store) — 4 declarations * [store::postgres](/reference/rust/sigil-labor-api/store-postgres) — 2 declarations * [store::memory](/reference/rust/sigil-labor-api/store-memory) — 2 declarations * [types](/reference/rust/sigil-labor-api/types) — 21 declarations # sigil-labor-api · store::memory URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/store-memory Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/store-memory.md Source declarations, signatures and documentation for store::memory. Source: `sigil/node/../labor-api/src/store/memory.rs`. SHA-256: `fac704d5201ff5043d3738629fb5ce1b869963b29b9a644e49a08fc82b672c7f`. 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. Module condition: ```rust #[cfg(feature = "memory-store")] ``` ## store::memory::MemoryStore [#storememorymemorystore] ```rust #[cfg(feature = "memory-store")] #[derive(Default)] pub struct MemoryStore { } ``` Source line: `16`. ## store::memory::MemoryStore::new [#storememorymemorystorenew] ```rust #[cfg(feature = "memory-store")] pub fn new() -> Self; ``` Source line: `24`. # sigil-labor-api · store::postgres URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/store-postgres Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/store-postgres.md Source declarations, signatures and documentation for store::postgres. Source: `sigil/node/../labor-api/src/store/postgres.rs`. SHA-256: `87d8d5e7774fa03389b9b60917be1e1677f1ac7330a782ffa5963e19ac3b2af5`. 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. Module condition: ```rust #[cfg(feature = "postgres")] ``` ## store::postgres::PostgresStore [#storepostgrespostgresstore] Production PostgreSQL storage backend. ```rust #[cfg(feature = "postgres")] #[derive(Clone)] pub struct PostgresStore { } ``` Source line: `32`. ## store::postgres::PostgresStore::connect [#storepostgrespostgresstoreconnect] ```rust #[cfg(feature = "postgres")] pub async fn connect(database_url: &str) -> Result, LaborError>; ``` Source line: `37`. # sigil-labor-api · store URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/store Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/store.md Source declarations, signatures and documentation for store. Source: `sigil/node/../labor-api/src/store/mod.rs`. SHA-256: `98c04b58075150a11ed6dafe2fd066f9695397b2ef2182f2f20a93638a277836`. 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. ## store::postgres [#storepostgres] Storage backend trait and implementations. \[`LaborStore`] is the contract that all storage backends must satisfy. The production binary always uses \[`postgres::PostgresStore`]; the in-memory backend exists solely for tests and is compiled only when the `memory-store` feature is active. ```rust #[cfg(feature = "postgres")] pub mod postgres; ``` Source line: `9`. ## store::memory [#storememory] ```rust #[cfg(feature = "memory-store")] pub mod memory; ``` Source line: `12`. ## store::LaborStore [#storelaborstore] Storage contract for the labor market service. All implementations must be `Send + Sync` to be shared across Tokio tasks via `Arc`. ## Pagination contract [#pagination-contract] Listing endpoints accept a cursor (`after: Option`) and a limit. Implementations MUST return results in deterministic order (by `id` for jobs/applications, by `created_at` then `id` for tie-breaking) so that `(after, limit)` produces stable, non-overlapping pages across requests. ## Reputation units [#reputation-units] All score values are integer micro-units (1.0 ≡ 1\_000\_000) to keep rolling averages exact. Implementations MUST perform the average update inside a single SQL statement so concurrent reviewers cannot corrupt the running totals. ```rust #[async_trait::async_trait] pub trait LaborStore: Send + Sync { // ---- Jobs --------------------------------------------------------------- async fn insert_job(&self, job: JobPosting) -> Result; /// List jobs with optional keyword + status filters and cursor pagination. async fn list_jobs( &self, keyword: Option<&str>, status: Option<&str>, after: Option, limit: u32, ) -> Result, LaborError>; async fn get_job(&self, id: Uuid) -> Result, LaborError>; async fn update_job_status( &self, id: Uuid, status: &str, ) -> Result, LaborError>; // ---- Applications ------------------------------------------------------- async fn insert_application(&self, app: JobApplication) -> Result; /// List applications for a job with cursor pagination. async fn list_applications( &self, job_id: Uuid, after: Option, limit: u32, ) -> Result, LaborError>; // ---- Contracts ---------------------------------------------------------- /// Atomically insert a contract AND mark the job as `filled`. async fn insert_contract_and_fill_job( &self, contract: Contract, ) -> Result; async fn get_contract(&self, id: Uuid) -> Result, LaborError>; async fn update_contract_status( &self, id: Uuid, status: &str, ) -> Result, LaborError>; // ---- Reputation --------------------------------------------------------- /// Atomically update (or insert) a reputation row using running-average /// arithmetic executed inside the database. Score parameters are in /// micro-units (1.0 = 1_000_000). async fn upsert_reputation( &self, agent_id: &str, quality_micro: u64, reliability_micro: u64, speed_micro: u64, ) -> Result; async fn get_reputation(&self, agent_id: &str) -> Result, LaborError>; } ``` Source line: `38`. ## pub use async\_trait::async\_trait; [#pub-use-async_traitasync_trait] ```rust pub use async_trait::async_trait; ``` Source line: `104`. # sigil-labor-api · types URL: https://docs.sigil.ml/reference/rust/sigil-labor-api/types Markdown: https://docs.sigil.ml/reference/rust/sigil-labor-api/types.md Source declarations, signatures and documentation for types. Source: `sigil/node/../labor-api/src/types.rs`. SHA-256: `95090c01324f0b677ef895c013e73d3ec5633b90a1db985e7894d47373fdb230`. 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. ## types::MicroAmount [#typesmicroamount] A token amount in chain base units (1 MINT = 1\_000\_000 micro-MINT). Stored as `u128` even though Sigil's per-account balance is u64; payment totals (sums across many escrows) can exceed u64 even when no single account does. Serializes as a JSON string to avoid f64 truncation. ```rust pub type MicroAmount = u128; ``` Source line: `35`. ## types::Currency [#typescurrency] On-chain currency symbol the labor-API operates in. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "UPPERCASE")] pub enum Currency { /// Sigil mainnet token. Mint, /// Evolve canary token. Bits, } ``` Source line: `40`. ## types::Currency::as\_str [#typescurrencyas_str] ```rust pub fn as_str(self) -> &'static str; ``` Source line: `48`. ## types::Compensation [#typescompensation] Payment terms for a job or contract. `amount_micro` is denominated in `currency` base units. The wallet/UI converts to/from human decimals before display. Serde renders the u128 as a JSON string to dodge JS f64 precision loss. Deserializers must accept both `"123456"` and `123456` for backward compatibility during the canary-period migration. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Compensation { /// Amount in chain base units. JSON: string-encoded. #[serde(with = "string_u128")] pub amount_micro: MicroAmount, /// Symbol the amount is denominated in. pub currency: Currency, /// Payment type: `"fixed"`, `"hourly"`, or `"milestone"`. pub payment_type: String, /// Optional budget ceiling in the same currency. #[serde(default, with = "string_u128_opt")] pub budget_cap_micro: Option } ``` Source line: `71`. ## types::string\_u128::serialize [#typesstring_u128serialize] ```rust pub fn serialize(value: &u128, s: S) -> Result; ``` Source line: `87`. ## types::string\_u128::deserialize [#typesstring_u128deserialize] ```rust pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result; ``` Source line: `91`. ## types::string\_u128\_opt::serialize [#typesstring_u128_optserialize] ```rust pub fn serialize(value: &Option, s: S) -> Result; ``` Source line: `112`. ## types::string\_u128\_opt::deserialize [#typesstring_u128_optdeserialize] ```rust pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result, D::Error>; ``` Source line: `119`. ## types::JobPosting [#typesjobposting] A job posting from an organization. Lifecycle status values mirror `sigil_core::labor::JobStatus`: `open`, `reviewing`, `awarded`, `cancelled`, `closed`. We add `filled` for the HTTP API (contract created) which maps to `JobStatus::Awarded` on-chain. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct JobPosting { pub id: Uuid, pub org_id: String, pub title: String, pub description: String, pub requirements: Vec, pub compensation: Compensation, pub duration_hours: u32, /// Job lifecycle: `open` | `reviewing` | `awarded` | `filled` | /// `cancelled` | `closed`. pub status: String, pub created_at: DateTime } ``` Source line: `148`. ## types::JobApplication [#typesjobapplication] An agent's application to a job posting. `reputation_snapshot_micro` is the agent's reputation score at application time, expressed in micro-units (1.0 → 1\_000\_000) to keep all numeric fields integer-typed. Authoritative reputation lives in MARS / OATS; this snapshot exists only for time-of-application freezing. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct JobApplication { pub id: Uuid, pub job_id: Uuid, pub agent_id: String, pub cover_letter: String, pub skills: Vec, /// Reputation snapshot in micro-units (e.g. 4_530_000 = 4.53). pub reputation_snapshot_micro: u64, pub applied_at: DateTime } ``` Source line: `173`. ## types::Contract [#typescontract] A binding agreement between an organization and an agent. Status values mirror `sigil_core::labor::ContractState`: `active` (InProgress), `completed`, `cancelled`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Contract { pub id: Uuid, pub job_id: Uuid, pub agent_id: String, pub org_id: String, pub compensation: Compensation, /// Contract status: `active` | `completed` | `cancelled`. pub status: String, pub start_date: DateTime } ``` Source line: `193`. ## types::ReputationScore [#typesreputationscore] Rolling reputation score for an agent. Stored as integer micro-units (1.0 = 1\_000\_000). The chain MARS/OATS system is the authoritative source for reputation; this table is a denormalized cache. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ReputationScore { pub agent_id: String, pub overall_micro: u64, pub quality_micro: u64, pub reliability_micro: u64, pub speed_micro: u64, pub reviews_count: i32 } ``` Source line: `214`. ## types::PostJobReq [#typespostjobreq] Request body for `POST /v1/jobs`. `org_id` is OMITTED — it's bound to the authenticated principal by middleware. Caller-supplied org\_id fields are silently ignored. ```rust #[derive(Debug, Deserialize)] pub struct PostJobReq { pub title: String, pub description: String, pub requirements: Vec, pub compensation: Compensation, pub duration_hours: u32 } ``` Source line: `232`. ## types::ApplyReq [#typesapplyreq] Request body for `POST /v1/jobs/:id/apply`. `agent_id` is bound to the authenticated principal. ```rust #[derive(Debug, Deserialize)] pub struct ApplyReq { pub cover_letter: String, pub skills: Vec, /// Reputation snapshot at application time, in micro-units. pub reputation_snapshot_micro: u64 } ``` Source line: `244`. ## types::CreateContractReq [#typescreatecontractreq] Request body for `POST /v1/contracts`. `org_id` is bound to the authenticated principal. The caller may only create contracts as the org they're authenticated as. ```rust #[derive(Debug, Deserialize)] pub struct CreateContractReq { pub job_id: Uuid, pub agent_id: String, pub compensation: Compensation } ``` Source line: `256`. ## types::SubmitReviewReq [#typessubmitreviewreq] Request body for `POST /v1/reviews`. All score fields in micro-units (1.0 = 1\_000\_000). ```rust #[derive(Debug, Deserialize)] pub struct SubmitReviewReq { pub agent_id: String, pub quality_micro: u64, pub reliability_micro: u64, pub speed_micro: u64 } ``` Source line: `266`. ## types::SearchParams [#typessearchparams] Query parameters for `GET /v1/jobs`. Cursor-based pagination. ```rust #[derive(Debug, Deserialize)] pub struct SearchParams { pub keyword: Option, pub status: Option, /// Cursor: return results after this UUID (exclusive). pub after: Option, /// Page size (default 50, max 200). pub limit: Option } ``` Source line: `275`. ## types::SearchParams::DEFAULT\_LIMIT [#typessearchparamsdefault_limit] ```rust pub const DEFAULT_LIMIT: u32; ``` Source line: `285`. ## types::SearchParams::MAX\_LIMIT [#typessearchparamsmax_limit] ```rust pub const MAX_LIMIT: u32; ``` Source line: `286`. ## types::SearchParams::effective\_limit [#typessearchparamseffective_limit] ```rust pub fn effective_limit(&self) -> u32; ``` Source line: `288`. ## types::Page [#typespage] Standard cursor-paginated response envelope. ```rust #[derive(Debug, Clone, Serialize)] pub struct Page { pub items: Vec, /// Cursor to pass to the next request as `after=`. None when the /// returned page is the last page. pub next: Option, pub limit: u32 } ``` Source line: `297`. # sigil-integration-tests URL: https://docs.sigil.ml/reference/rust/sigil-integration-tests Markdown: https://docs.sigil.ml/reference/rust/sigil-integration-tests.md Cross-spec integration tests for Tower, CZAC, Nova, and Economics Cross-spec integration tests for Tower, CZAC, Nova, and Economics | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-integration-tests` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-integration-tests/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_integration_tests` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-integration-tests = { path = "../sigil-integration-tests" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ----------------------------------------------------------------------------------------------------------------------------- | | `default` | No additional feature dependencies | | `gal` | `sigil-sdk/gal`, `dep:mars-protocol`, `dep:oas-resolve`, `dep:oas-document`, `dep:oas-crypto`, `dep:async-trait`, `dep:tokio` | ## Public source modules [#public-source-modules] # sigil-multisig-1 · crate URL: https://docs.sigil.ml/reference/rust/sigil-multisig-1/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-multisig-1/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../contracts/reference/sigil-multisig-1/src/lib.rs`. SHA-256: `ea48e498624055ee96c8e569cfcd3df032f8d5aa4ca755b5fcf09886ca74671a`. 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. ## ::anvil\_alloc [#anvil_alloc] ```rust #[no_mangle] pub extern "C" fn anvil_alloc(len: i32) -> i32; ``` Source line: `23`. ## ::anvil\_init [#anvil_init] ```rust #[no_mangle] pub extern "C" fn anvil_init(ptr: i32, len: i32) -> i32; ``` Source line: `35`. ## ::anvil\_call [#anvil_call] ```rust #[no_mangle] pub extern "C" fn anvil_call(ptr: i32, len: i32) -> i32; ``` Source line: `71`. # sigil-multisig-1 URL: https://docs.sigil.ml/reference/rust/sigil-multisig-1 Markdown: https://docs.sigil.ml/reference/rust/sigil-multisig-1.md sigil-multisig-1 implementation in the Sigil workspace. sigil-multisig-1 implementation in the Sigil workspace. | Property | Source value | | ---------------- | --------------------------------------------------------------- | | Package | `sigil-multisig-1` | | Manifest version | `1.0.0` | | Source | `sigil/node/../contracts/reference/sigil-multisig-1/Cargo.toml` | | Reference status | source reference | | Publish flag | `false`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_multisig_1` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-multisig-1 = { path = "../sigil-multisig-1" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-multisig-1/crate) — 3 declarations # sigil-lumen · commitment URL: https://docs.sigil.ml/reference/rust/sigil-lumen/commitment Markdown: https://docs.sigil.ml/reference/rust/sigil-lumen/commitment.md Source declarations, signatures and documentation for commitment. Source: `sigil/node/sigil-lumen/src/commitment.rs`. SHA-256: `c0030ee4cf7631a4471988df4fa1b1678e6443213c6f28a12a642beca26d63ec`. 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. ## commitment::LUMEN\_SIGNING\_DOMAIN [#commitmentlumen_signing_domain] ```rust pub const LUMEN_SIGNING_DOMAIN: &[u8]; ``` Source line: `6`. ## commitment::signing\_digest [#commitmentsigning_digest] ```rust pub fn signing_digest(attestation: &LumenAttestation) -> Result; ``` Source line: `8`. # sigil-lumen · crate URL: https://docs.sigil.ml/reference/rust/sigil-lumen/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-lumen/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-lumen/src/lib.rs`. SHA-256: `8e7949c8133a8b02a1a3dc826adafb2d79ec15202a3e93e0b3c9d14a6f0a7c20`. 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. ## commitment [#commitment] Lumen verifies inference receipts without trusting the operator alone. The crate intentionally keeps the launch path narrow: validators verify a deterministic commitment over sampled top-k hidden-state values plus the provider's Ed25519 authorship signature. It does not claim full model re-execution or ZK-level proof of inference. ```rust pub mod commitment; ``` Source line: `8`. ## polynomial [#polynomial] ```rust pub mod polynomial; ``` Source line: `9`. ## verify [#verify] ```rust pub mod verify; ``` Source line: `10`. ## pub use commitment::\{signing\_digest, LUMEN\_SIGNING\_DOMAIN}; [#pub-use-commitmentsigning_digest-lumen_signing_domain] ```rust pub use commitment::{signing_digest, LUMEN_SIGNING_DOMAIN}; ``` Source line: `12`. ## pub use polynomial::\{compute\_polynomial\_digest, LUMEN\_POLYNOMIAL\_DOMAIN}; [#pub-use-polynomialcompute_polynomial_digest-lumen_polynomial_domain] ```rust pub use polynomial::{compute_polynomial_digest, LUMEN_POLYNOMIAL_DOMAIN}; ``` Source line: `13`. ## pub use verify::\{verify\_lumen\_attestation, LumenExpectedBinding, LumenVerificationError}; [#pub-use-verifyverify_lumen_attestation-lumenexpectedbinding-lumenverificationerror] ```rust pub use verify::{verify_lumen_attestation, LumenExpectedBinding, LumenVerificationError}; ``` Source line: `14`. # sigil-lumen URL: https://docs.sigil.ml/reference/rust/sigil-lumen Markdown: https://docs.sigil.ml/reference/rust/sigil-lumen.md Sigil Lumen verifier for cryptographic inference commitments Sigil Lumen verifier for cryptographic inference commitments | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-lumen` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-lumen/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_lumen` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-lumen = { path = "../sigil-lumen" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-lumen/crate) — 6 declarations * [commitment](/reference/rust/sigil-lumen/commitment) — 2 declarations * [polynomial](/reference/rust/sigil-lumen/polynomial) — 3 declarations * [verify](/reference/rust/sigil-lumen/verify) — 3 declarations # sigil-lumen · polynomial URL: https://docs.sigil.ml/reference/rust/sigil-lumen/polynomial Markdown: https://docs.sigil.ml/reference/rust/sigil-lumen/polynomial.md Source declarations, signatures and documentation for polynomial. Source: `sigil/node/sigil-lumen/src/polynomial.rs`. SHA-256: `9bd96685e75c01ca4c3554e61b71b3d3587d50f8691c0277c76ebb0ff63cb9c9`. 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. ## polynomial::LUMEN\_POLYNOMIAL\_DOMAIN [#polynomiallumen_polynomial_domain] ```rust pub const LUMEN_POLYNOMIAL_DOMAIN: &[u8]; ``` Source line: `5`. ## polynomial::LumenPolynomialError [#polynomiallumenpolynomialerror] ```rust #[derive(Debug, Error, PartialEq, Eq)] pub enum LumenPolynomialError { #[error("lumen: token_count must be non-zero")] EmptyTokenWindow, #[error("lumen: top_k must be non-zero")] EmptyTopK, #[error("lumen: samples length does not match token_count")] SampleCountMismatch, #[error("lumen: sample {0} has wrong top-k width")] TopKWidthMismatch(u32), #[error("lumen: precision must be declared")] MissingPrecision, } ``` Source line: `8`. ## polynomial::compute\_polynomial\_digest [#polynomialcompute_polynomial_digest] ```rust pub fn compute_polynomial_digest( attestation: &LumenAttestation, ) -> Result; ``` Source line: `21`. # sigil-lumen · verify URL: https://docs.sigil.ml/reference/rust/sigil-lumen/verify Markdown: https://docs.sigil.ml/reference/rust/sigil-lumen/verify.md Source declarations, signatures and documentation for verify. Source: `sigil/node/sigil-lumen/src/verify.rs`. SHA-256: `aa9e19db98be5e31542a4bfb9fde8f3a29c5ba64457023b881237b7820cbb9ab`. 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. ## verify::LumenExpectedBinding [#verifylumenexpectedbinding] ```rust pub struct LumenExpectedBinding<'a> { pub job_id: &'a str, pub model_id: &'a str, pub output_hash: &'a SigilHash, pub provider_pubkey: &'a [u8] } ``` Source line: `9`. ## verify::LumenVerificationError [#verifylumenverificationerror] ```rust #[derive(Debug, Error)] pub enum LumenVerificationError { #[error(transparent)] Polynomial(#[from] LumenPolynomialError), #[error("lumen: job id does not match receipt")] JobMismatch, #[error("lumen: model id does not match receipt")] ModelMismatch, #[error("lumen: output commitment does not match receipt")] OutputMismatch, #[error("lumen: polynomial digest does not match samples")] DigestMismatch, #[error("lumen: provider public key does not match receipt signer")] ProviderKeyMismatch, #[error("lumen: invalid provider public key")] InvalidProviderKey, #[error("lumen: invalid provider signature")] InvalidSignature, } ``` Source line: `17`. ## verify::verify\_lumen\_attestation [#verifyverify_lumen_attestation] ```rust pub fn verify_lumen_attestation( attestation: &LumenAttestation, expected: LumenExpectedBinding<'_>, ) -> Result<(), LumenVerificationError>; ``` Source line: `36`. # sigil-network · config URL: https://docs.sigil.ml/reference/rust/sigil-network/config Markdown: https://docs.sigil.ml/reference/rust/sigil-network/config.md Source declarations, signatures and documentation for config. Source: `sigil/node/sigil-network/src/config.rs`. SHA-256: `e13b53ac23e6afcda0fe0e70da55f3912733308aa6a36c1b44ba2eed3b6cedcb`. 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. ## config::NetworkConfig [#confignetworkconfig] Complete network configuration for a Sigil node. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NetworkConfig { /// P2P listen address (e.g. "0.0.0.0:26656"). pub listen_addr: String, /// External address advertised to peers (e.g. "1.2.3.4:26656"). /// If `None`, the node will attempt to auto-detect its external address. #[serde(default, skip_serializing_if = "Option::is_none")] pub external_addr: Option, /// Seed node addresses for initial peer discovery. pub seed_nodes: Vec, /// Persistent peer addresses that should always be connected. #[serde(default)] pub persistent_peers: Vec, /// Maximum number of inbound connections. pub max_inbound: u32, /// Maximum number of outbound connections. pub max_outbound: u32, /// NAT traversal configuration. pub nat: NatConfig, /// Gossipsub protocol parameters. pub gossipsub: GossipsubConfig, /// QUIC transaction ingress parameters. #[serde(default)] pub quic_ingress: QuicIngressConfig, /// Stake-weighted sender quota parameters. #[serde(default)] pub stake_weighted_ingress: StakeWeightedIngressConfig, /// Erasure-sharded block propagation parameters. #[serde(default)] pub block_propagation: BlockPropagationConfig, /// Connection timeout in seconds. pub connection_timeout_secs: u64, /// Dial-back interval in seconds for persistent peers. pub dial_back_interval_secs: u64, /// Enable Kademlia DHT for peer discovery. pub enable_dht: bool, /// Protocol identifier prefix (e.g. "/sigil/testnet-1"). pub protocol_prefix: String } ``` Source line: `14`. ## config::NetworkConfig::testnet\_default [#confignetworkconfigtestnet_default] Create a testnet network configuration with sensible defaults. ```rust pub fn testnet_default() -> Self; ``` Source line: `77`. ## config::NetworkConfig::max\_peers [#confignetworkconfigmax_peers] Total maximum peer count (inbound + outbound). ```rust pub fn max_peers(&self) -> u32; ``` Source line: `98`. ## config::NetworkConfig::validate [#confignetworkconfigvalidate] Validate the network configuration. ```rust pub fn validate(&self) -> Result<(), NetworkConfigError>; ``` Source line: `103`. ## config::NatConfig [#confignatconfig] NAT traversal configuration. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NatConfig { /// Enable UPnP port mapping. pub enable_upnp: bool, /// Enable NAT-PMP port mapping. pub enable_nat_pmp: bool, /// Enable relay circuit for nodes behind restrictive NATs. pub enable_relay: bool, /// Enable hole punching for direct connections through NAT. pub enable_hole_punching: bool } ``` Source line: `129`. ## config::GossipsubConfig [#configgossipsubconfig] Gossipsub protocol parameters. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GossipsubConfig { /// Target number of peers in the mesh for each topic. pub mesh_n: u32, /// Minimum number of peers in the mesh before requesting more. pub mesh_n_low: u32, /// Maximum number of peers in the mesh before pruning excess. pub mesh_n_high: u32, /// Number of lazy (gossip-only) peers per topic. pub gossip_lazy: u32, /// Heartbeat interval in milliseconds. pub heartbeat_interval_ms: u64, /// Maximum message size in bytes. pub max_message_size: u32, /// Time-to-live for seen message deduplication cache (seconds). pub seen_messages_ttl_secs: u64, /// Maximum number of messages in the deduplication cache. pub seen_messages_capacity: u32, /// Per-topic overrides. #[serde(default)] pub topic_overrides: Vec } ``` Source line: `153`. ## config::GossipsubConfig::testnet\_default [#configgossipsubconfigtestnet_default] Testnet gossipsub defaults with smaller mesh and faster heartbeat. ```rust pub fn testnet_default() -> Self; ``` Source line: `193`. ## config::GossipsubConfig::validate [#configgossipsubconfigvalidate] Validate gossipsub parameters. ```rust pub fn validate(&self) -> Result<(), NetworkConfigError>; ``` Source line: `223`. ## config::TopicConfig [#configtopicconfig] Per-topic gossipsub parameter overrides. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TopicConfig { /// Which gossip topic this override applies to. pub topic: GossipTopic, /// Override mesh_n for this topic. #[serde(default, skip_serializing_if = "Option::is_none")] pub mesh_n: Option, /// Override mesh_n_low for this topic. #[serde(default, skip_serializing_if = "Option::is_none")] pub mesh_n_low: Option, /// Override mesh_n_high for this topic. #[serde(default, skip_serializing_if = "Option::is_none")] pub mesh_n_high: Option, /// Override max_message_size for this topic. #[serde(default, skip_serializing_if = "Option::is_none")] pub max_message_size: Option } ``` Source line: `250`. ## config::NetworkConfigError [#confignetworkconfigerror] Errors in network configuration. ```rust #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum NetworkConfigError { #[error("invalid address: {0}")] InvalidAddress(String), #[error("invalid peer limits: {0}")] InvalidPeerLimits(String), #[error("invalid timeout: {0}")] InvalidTimeout(String), #[error("invalid gossipsub config: {0}")] InvalidGossipsub(String), #[error("invalid ingress config: {0}")] InvalidIngress(String), #[error("invalid propagation config: {0}")] InvalidPropagation(String), } ``` Source line: `269`. # sigil-network · crate URL: https://docs.sigil.ml/reference/rust/sigil-network/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-network/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-network/src/lib.rs`. SHA-256: `577aa794089cafe4e91b20e9e6c33d54f71dbab2c6973d038424c3b322790595`. 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. ## config [#config] ```rust pub mod config; ``` Source line: `9`. ## error [#error] ```rust pub mod error; ``` Source line: `10`. ## ingress [#ingress] ```rust pub mod ingress; ``` Source line: `11`. ## message [#message] ```rust pub mod message; ``` Source line: `12`. ## peer [#peer] ```rust pub mod peer; ``` Source line: `13`. ## propagation [#propagation] ```rust pub mod propagation; ``` Source line: `14`. ## scoring [#scoring] ```rust pub mod scoring; ``` Source line: `15`. ## topic [#topic] ```rust pub mod topic; ``` Source line: `16`. ## pub use config::\{GossipsubConfig, NatConfig, NetworkConfig, NetworkConfigError, TopicConfig}; [#pub-use-configgossipsubconfig-natconfig-networkconfig-networkconfigerror-topicconfig] ```rust pub use config::{GossipsubConfig, NatConfig, NetworkConfig, NetworkConfigError, TopicConfig}; ``` Source line: `19`. ## pub use error::\{NetworkError, NetworkResult}; [#pub-use-errornetworkerror-networkresult] ```rust pub use error::{NetworkError, NetworkResult}; ``` Source line: `20`. ## pub use ingress::\{ [#pub-use-ingress] IngressConfigError, StakeWeightedIngressConfig, DEFAULT\_MAX\_SENDER\_QUOTA\_PER\_WINDOW, DEFAULT\_STAKE\_QUOTA\_PER\_UNIT, DEFAULT\_STAKE\_QUOTA\_UNIT, }; ```rust pub use ingress::{ IngressConfigError, StakeWeightedIngressConfig, DEFAULT_MAX_SENDER_QUOTA_PER_WINDOW, DEFAULT_STAKE_QUOTA_PER_UNIT, DEFAULT_STAKE_QUOTA_UNIT, }; ``` Source line: `21`. ## pub use message::\{ [#pub-use-message] BlockAnnouncement, BlockShardAnnouncement, BlockSyncRequest, BlockSyncResponse, MessagePayload, NetworkMessage, PeerInfoRequest, PeerInfoResponse, PreCommitMessage, PreVoteMessage, StateSyncRequest, StateSyncResponse, TransactionAnnouncement, }; ```rust pub use message::{ BlockAnnouncement, BlockShardAnnouncement, BlockSyncRequest, BlockSyncResponse, MessagePayload, NetworkMessage, PeerInfoRequest, PeerInfoResponse, PreCommitMessage, PreVoteMessage, StateSyncRequest, StateSyncResponse, TransactionAnnouncement, }; ``` Source line: `25`. ## pub use peer::\{ [#pub-use-peer] ConnectionState, PeerAdmission, PeerDiversity, PeerInfo, PeerRegistry, PeerSecurityConfig, }; ```rust pub use peer::{ ConnectionState, PeerAdmission, PeerDiversity, PeerInfo, PeerRegistry, PeerSecurityConfig, }; ``` Source line: `30`. ## pub use propagation::\{ [#pub-use-propagation] plan\_block\_propagation, recover\_payload\_from\_shards, BlockPropagationConfig, BlockPropagationPlan, BlockPropagationShard, PeerShardAssignment, PropagationConfigError, PropagationPeer, QuicIngressConfig, DEFAULT\_BLOCK\_SHARD\_BYTES, DEFAULT\_MAX\_BLOCK\_PAYLOAD\_BYTES, DEFAULT\_PARITY\_SHARDS, DEFAULT\_PROPAGATION\_FANOUT, }; ```rust pub use propagation::{ plan_block_propagation, recover_payload_from_shards, BlockPropagationConfig, BlockPropagationPlan, BlockPropagationShard, PeerShardAssignment, PropagationConfigError, PropagationPeer, QuicIngressConfig, DEFAULT_BLOCK_SHARD_BYTES, DEFAULT_MAX_BLOCK_PAYLOAD_BYTES, DEFAULT_PARITY_SHARDS, DEFAULT_PROPAGATION_FANOUT, }; ``` Source line: `33`. ## pub use scoring::\{GossipRateLimitConfig, GossipRateLimiter, PeerScoring}; [#pub-use-scoringgossipratelimitconfig-gossipratelimiter-peerscoring] ```rust pub use scoring::{GossipRateLimitConfig, GossipRateLimiter, PeerScoring}; ``` Source line: `39`. ## pub use topic::GossipTopic; [#pub-use-topicgossiptopic] ```rust pub use topic::GossipTopic; ``` Source line: `40`. ## pub use message::ComputeReceiptMessage; [#pub-use-messagecomputereceiptmessage] ```rust #[cfg(feature = "compute")] pub use message::ComputeReceiptMessage; ``` Source line: `43`. # sigil-network · error URL: https://docs.sigil.ml/reference/rust/sigil-network/error Markdown: https://docs.sigil.ml/reference/rust/sigil-network/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-network/src/error.rs`. SHA-256: `3822616f803d441187535a75e0f15c6a7bc26c263283b557a834b0e7cea6eef6`. 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. ## error::NetworkError [#errornetworkerror] Network-layer errors for the Sigil P2P subsystem. Errors that can occur in the Sigil networking layer. ```rust #[derive(Debug, thiserror::Error)] pub enum NetworkError { /// The specified peer was not found in the registry. #[error("peer not found: {0}")] PeerNotFound(String), /// The specified peer has been banned and cannot communicate. #[error("peer banned: {0}")] PeerBanned(String), /// The peer registry has reached its maximum capacity. #[error("maximum peer count reached")] MaxPeersReached, /// A received message failed validation. #[error("invalid message: {0}")] InvalidMessage(String), /// Peer information failed validation. #[error("invalid peer info: {0}")] InvalidPeerInfo(String), /// Peer admission failed a Sybil or eclipse-resistance gate. #[error("peer admission rejected: {0}")] PeerAdmissionRejected(String), /// A peer exceeded a bounded per-peer or per-topic message rate. #[error("peer rate limited: {peer_id} on {topic}")] RateLimited { /// Peer ID being rate limited. peer_id: String, /// Gossip topic label. topic: String, }, /// The remote peer is running an incompatible protocol version. #[error("protocol mismatch: expected {expected}, got {got}")] ProtocolMismatch { /// The version this node expects. expected: String, /// The version the remote peer advertised. got: String, }, /// The remote peer is on a different chain. #[error("chain mismatch: expected {expected}, got {got}")] ChainMismatch { /// The chain ID this node expects. expected: String, /// The chain ID the remote peer advertised. got: String, }, /// A connection attempt to a peer failed. #[error("connection failed: {0}")] ConnectionFailed(String), /// An operation timed out. #[error("operation timed out")] Timeout, /// Serialization or deserialization failure. #[error("serialization error: {0}")] Serialization(String), } ``` Source line: `5`. ## error::NetworkResult [#errornetworkresult] Convenience alias for network results. ```rust pub type NetworkResult = Result; ``` Source line: `71`. ## error::NetworkError::is\_peer\_fault [#errornetworkerroris_peer_fault] Returns `true` if this error indicates the peer should be penalized. ```rust pub fn is_peer_fault(&self) -> bool; ``` Source line: `75`. # sigil-network URL: https://docs.sigil.ml/reference/rust/sigil-network Markdown: https://docs.sigil.ml/reference/rust/sigil-network.md P2P networking protocol types and peer management for Sigil blockchain P2P networking protocol types and peer management for Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-network` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-network/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_network` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-network = { path = "../sigil-network" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-network/crate) — 17 declarations * [config](/reference/rust/sigil-network/config) — 10 declarations * [error](/reference/rust/sigil-network/error) — 3 declarations * [ingress](/reference/rust/sigil-network/ingress) — 7 declarations * [message](/reference/rust/sigil-network/message) — 21 declarations * [peer](/reference/rust/sigil-network/peer) — 25 declarations * [propagation](/reference/rust/sigil-network/propagation) — 15 declarations * [scoring](/reference/rust/sigil-network/scoring) — 15 declarations * [topic](/reference/rust/sigil-network/topic) — 7 declarations # sigil-network · ingress URL: https://docs.sigil.ml/reference/rust/sigil-network/ingress Markdown: https://docs.sigil.ml/reference/rust/sigil-network/ingress.md Source declarations, signatures and documentation for ingress. Source: `sigil/node/sigil-network/src/ingress.rs`. SHA-256: `1ebca49b39bbb7b401e4f17fae75bab73a61dc8c3ff04533f256cdabca204d56`. 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. ## ingress::DEFAULT\_STAKE\_QUOTA\_UNIT [#ingressdefault_stake_quota_unit] Default stake unit for one additional ingress quota step. ```rust pub const DEFAULT_STAKE_QUOTA_UNIT: u64; ``` Source line: `10`. ## ingress::DEFAULT\_STAKE\_QUOTA\_PER\_UNIT [#ingressdefault_stake_quota_per_unit] Default additional transactions per window per stake unit. ```rust pub const DEFAULT_STAKE_QUOTA_PER_UNIT: u32; ``` Source line: `12`. ## ingress::DEFAULT\_MAX\_SENDER\_QUOTA\_PER\_WINDOW [#ingressdefault_max_sender_quota_per_window] Default hard cap for one sender in a single ingress window. ```rust pub const DEFAULT_MAX_SENDER_QUOTA_PER_WINDOW: u32; ``` Source line: `14`. ## ingress::StakeWeightedIngressConfig [#ingressstakeweightedingressconfig] Deterministic stake-weighted ingress parameters. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StakeWeightedIngressConfig { /// Enable stake-weighted sender quotas. pub enabled: bool, /// micro-MINT stake needed for one quota increment. pub stake_quota_unit: u64, /// Extra accepted txs per window per quota unit. pub quota_per_unit: u32, /// Hard cap for one sender in a single window. pub max_sender_quota_per_window: u32 } ``` Source line: `18`. ## ingress::StakeWeightedIngressConfig::validate [#ingressstakeweightedingressconfigvalidate] Validate arithmetic and quota bounds. ```rust pub fn validate(&self) -> Result<(), IngressConfigError>; ``` Source line: `42`. ## ingress::StakeWeightedIngressConfig::quota\_for\_stake [#ingressstakeweightedingressconfigquota_for_stake] Compute the sender quota for the current admission window. `base_unstaked_quota` is supplied by the caller because the node scales it with target block time. Stake adds priority without ever reducing the legacy unstaked floor. ```rust pub fn quota_for_stake(&self, base_unstaked_quota: u32, stake_micro_mint: u64) -> u32; ``` Source line: `57`. ## ingress::IngressConfigError [#ingressingressconfigerror] Error returned by ingress policy validation. ```rust #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum IngressConfigError { #[error("stake_quota_unit must be > 0 when stake-weighted ingress is enabled")] InvalidStakeUnit, #[error("max_sender_quota_per_window must be > 0 when stake-weighted ingress is enabled")] InvalidMaxQuota, } ``` Source line: `73`. # sigil-network · message URL: https://docs.sigil.ml/reference/rust/sigil-network/message Markdown: https://docs.sigil.ml/reference/rust/sigil-network/message.md Source declarations, signatures and documentation for message. Source: `sigil/node/sigil-network/src/message.rs`. SHA-256: `f75df282b65e8b7d797e48432369556a86e755b1d864a4a5b0d142c74c204677`. 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. ## message::NetworkMessage [#messagenetworkmessage] Top-level network message envelope. Every message on the Sigil P2P network is wrapped in this struct, which carries sender identity, a unique ID, and a timestamp for deduplication and ordering. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NetworkMessage { /// Unique message identifier (UUID v4 recommended). pub id: String, /// OAS DID of the sender. pub sender_did: String, /// Unix timestamp (seconds) when the message was created. pub timestamp: u64, /// The type-tagged payload. pub payload: MessagePayload } ``` Source line: `18`. ## message::NetworkMessage::content\_hash [#messagenetworkmessagecontent_hash] Compute a content hash of this message for deduplication. ```rust pub fn content_hash(&self) -> Result; ``` Source line: `31`. ## message::MessagePayload [#messagemessagepayload] Message payloads organized by gossipsub topic or request/response pair. ```rust #[allow(clippy::large_enum_variant)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "kind", content = "data")] pub enum MessagePayload { // -- Gossipsub ---------------------------------------------------------- /// A newly produced block announcement. NewBlock(BlockAnnouncement), /// One erasure shard of a newly produced block. BlockShard(BlockShardAnnouncement), /// A new transaction entering the mempool. NewTransaction(TransactionAnnouncement), /// A pre-vote from the consensus layer. PreVote(PreVoteMessage), /// A pre-commit from the consensus layer. PreCommit(PreCommitMessage), /// A compute receipt announcement (feature-gated). #[cfg(feature = "compute")] ComputeReceipt(ComputeReceiptMessage), // -- Request / Response ------------------------------------------------- /// Request a range of blocks for sync. BlockRequest(BlockSyncRequest), /// Response containing a batch of blocks. BlockResponse(BlockSyncResponse), /// Request a slice of the state trie. StateRequest(StateSyncRequest), /// Response containing state key-value pairs. StateResponse(StateSyncResponse), /// Request peer metadata. PeerInfoRequest(PeerInfoRequest), /// Response with peer metadata. PeerInfoResponse(PeerInfoResponse), // -- Tower Coordination ------------------------------------------------- /// A newly produced Tower block announcement. TowerBlock(TowerBlockAnnouncement), /// A Tower Committee vote on a proposal (slashing, param change, etc.). TowerCommitteeVote(TowerCommitteeVoteMessage), /// Slashing evidence submitted to the Tower chain. TowerSlashingEvidence(TowerSlashingEvidenceMessage), /// A Casper FFG finality vote. TowerFinalityVote(TowerFinalityVoteMessage), /// A Tower Casper FFG attestation from an execution-chain validator. /// /// Broadcast on [`GossipTopic::TowerAttestations`] at every epoch /// boundary by any validator that is a member of the Tower committee. /// Recipients verify the signature, persist the vote via /// `commit_tower_tx`, and apply the Casper FFG rules to advance /// [`sigil_tower::finality::FinalityState`]. TowerAttestation(TowerAttestationMessage), // -- CZAC Cross-Zone Communication -------------------------------------- /// CZAC channel operation message (open, close, heartbeat). CzacChannelOp(CzacChannelOpMessage), } ``` Source line: `45`. ## message::BlockAnnouncement [#messageblockannouncement] Announces a newly produced block along with the proposer's signature. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockAnnouncement { /// The full block. pub block: Block, /// Ed25519 signature of the block hash by the proposer. pub proposer_signature: Vec } ``` Source line: `104`. ## message::BlockShardAnnouncement [#messageblockshardannouncement] Announces one erasure shard for stake-weighted block propagation. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BlockShardAnnouncement { /// Shard metadata and bytes. pub shard: BlockPropagationShard, /// Ed25519 signature of `(block_hash || shard_index || payload_hash)` by /// the proposer. Signature verification is transport-layer specific. pub proposer_signature: Vec } ``` Source line: `113`. ## message::TransactionAnnouncement [#messagetransactionannouncement] Announces a new signed transaction entering the mempool. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TransactionAnnouncement { /// The signed transaction. pub tx: SignedTransaction } ``` Source line: `123`. ## message::PreVoteMessage [#messageprevotemessage] A pre-vote message from the MACA consensus protocol. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PreVoteMessage { /// The block height being voted on. pub height: u64, /// Hash of the block being voted for. pub block_hash: SigilHash, /// OAS DID of the voter. pub voter_did: String, /// Ed25519 signature of (height || block_hash). pub signature: Vec } ``` Source line: `130`. ## message::PreCommitMessage [#messageprecommitmessage] A pre-commit message from the MACA consensus protocol. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PreCommitMessage { /// The block height being committed. pub height: u64, /// Hash of the block being committed. pub block_hash: SigilHash, /// OAS DID of the voter. pub voter_did: String, /// Ed25519 signature of (height || block_hash). pub signature: Vec } ``` Source line: `143`. ## message::ComputeReceiptMessage [#messagecomputereceiptmessage] Announces a compute receipt for the decentralized compute marketplace. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ComputeReceiptMessage { /// Hash of the full receipt. pub receipt_hash: SigilHash, /// OAS DID of the compute provider. pub provider_did: String, /// OAS DID of the compute consumer. pub consumer_did: String } ``` Source line: `157`. ## message::BlockSyncRequest [#messageblocksyncrequest] Request a contiguous range of blocks starting at `start_height`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BlockSyncRequest { /// First block height to fetch (inclusive). pub start_height: u64, /// Maximum number of blocks to return. pub max_blocks: u32 } ``` Source line: `172`. ## message::BlockSyncResponse [#messageblocksyncresponse] Response containing a batch of blocks for sync. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockSyncResponse { /// The requested blocks in ascending height order. pub blocks: Vec } ``` Source line: `181`. ## message::StateSyncRequest [#messagestatesyncrequest] Request a slice of the state trie within a partition. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StateSyncRequest { /// State partition identifier (e.g. "accounts", "zones"). pub partition: String, /// Key to start scanning from (lexicographic order). pub start_key: Vec, /// Maximum number of entries to return. pub limit: u32 } ``` Source line: `188`. ## message::StateSyncResponse [#messagestatesyncresponse] Response containing state key-value pairs. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StateSyncResponse { /// Key-value pairs from the state trie. pub entries: Vec<(Vec, Vec)>, /// `true` if there are more entries beyond this batch. pub has_more: bool } ``` Source line: `199`. ## message::PeerInfoRequest [#messagepeerinforequest] Request basic information about a peer. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PeerInfoRequest { } ``` Source line: `208`. ## message::PeerInfoResponse [#messagepeerinforesponse] Response with peer metadata used during handshake and sync decisions. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PeerInfoResponse { /// The peer's unique identifier. pub peer_id: String, /// Chain ID the peer is on. pub chain_id: String, /// The peer's current block height. pub current_height: u64, /// The peer's current epoch. pub current_epoch: u64, /// OAS DID if the peer is a registered validator. pub validator_did: Option, /// Protocol version the peer is running. pub protocol_version: String } ``` Source line: `212`. ## message::TowerBlockAnnouncement [#messagetowerblockannouncement] Announces a newly produced Tower block. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerBlockAnnouncement { /// Tower slot number. pub slot: u64, /// Tower epoch. pub epoch: u64, /// Block hash. pub block_hash: SigilHash, /// Proposer's OAS DID. pub proposer_did: String, /// Ed25519 signature by the proposer. pub proposer_signature: Vec } ``` Source line: `233`. ## message::TowerCommitteeVoteMessage [#messagetowercommitteevotemessage] A vote from a Tower Committee member. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerCommitteeVoteMessage { /// Proposal ID being voted on. pub proposal_id: String, /// Voter's OAS DID (must be Tower Committee member). pub voter_did: String, /// Approve or reject. pub approve: bool, /// Ed25519 signature. pub signature: Vec } ``` Source line: `248`. ## message::TowerSlashingEvidenceMessage [#messagetowerslashingevidencemessage] Slashing evidence broadcast. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerSlashingEvidenceMessage { /// Evidence type: "double_sign", "downtime", "invalid_block", "invalid_vote". pub evidence_type: String, /// Accused validator DID. pub accused_did: String, /// Slot of the alleged offense. pub offense_slot: u64, /// Hash of the serialized evidence payload. pub evidence_hash: SigilHash, /// Submitter's DID. pub submitter_did: String } ``` Source line: `261`. ## message::TowerFinalityVoteMessage [#messagetowerfinalityvotemessage] A Casper FFG finality vote broadcast. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerFinalityVoteMessage { /// Source epoch (previously justified). pub source_epoch: u64, /// Target epoch. pub target_epoch: u64, /// Block hash at target epoch boundary. pub target_block_hash: SigilHash, /// Voter's OAS DID. pub voter_did: String, /// Ed25519 signature over (source_epoch || target_epoch || target_block_hash). pub signature: Vec } ``` Source line: `276`. ## message::TowerAttestationMessage [#messagetowerattestationmessage] A Tower Casper FFG attestation broadcast by an execution-chain validator. Validators that are Tower committee members emit this message at every epoch boundary. The `source_epoch` must be the currently justified epoch; `target_epoch` is the new epoch. `signature` covers the canonical attestation bytes: `source_epoch || target_epoch || target_block_hash`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerAttestationMessage { /// Source epoch (must be a justified checkpoint). pub source_epoch: u64, /// Target epoch being attested (must be source_epoch + 1 for finalization). pub target_epoch: u64, /// Hash of the execution block at the target epoch boundary. pub target_block_hash: SigilHash, /// Stake weight of this attestation (micro-MINT). pub stake: u64, /// OAS DID of the attesting validator. pub validator_did: String, /// Ed25519 signature over `source_epoch_be8 || target_epoch_be8 || target_block_hash_bytes`. pub signature: Vec } ``` Source line: `296`. ## message::CzacChannelOpMessage [#messageczacchannelopmessage] CZAC channel operation broadcast. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CzacChannelOpMessage { /// Channel ID. pub channel_id: String, /// Operation type: "open", "close", "heartbeat", "dispute". pub operation: String, /// Sender's OAS DID. pub sender_did: String, /// Target zone. pub target_zone: String, /// Sequence number for ordering. pub sequence: u64, /// Optional payload hash. pub payload_hash: Option } ``` Source line: `317`. # sigil-network · peer URL: https://docs.sigil.ml/reference/rust/sigil-network/peer Markdown: https://docs.sigil.ml/reference/rust/sigil-network/peer.md Source declarations, signatures and documentation for peer. Source: `sigil/node/sigil-network/src/peer.rs`. SHA-256: `aa93cbb6f94e66934fc17b6b8ddf663a2c8ae134bda4b776ebe821ab233d89bf`. 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. ## peer::PeerInfo [#peerpeerinfo] Metadata and state for a single known peer. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PeerInfo { /// Unique peer identifier (e.g. libp2p PeerId). pub peer_id: String, /// OAS DID of the peer, if known. pub did: Option, /// Chain ID the peer is operating on. pub chain_id: String, /// The peer's latest reported block height. pub current_height: u64, /// The peer's latest reported epoch. pub current_epoch: u64, /// Protocol version the peer advertised. pub protocol_version: String, /// Whether this peer is a registered validator. pub is_validator: bool, /// Reputation score in `[0.0, 1.0]`. pub reputation_score: f64, /// Unix timestamp of last successful communication. pub last_seen: u64, /// Current connection state. pub connection_state: ConnectionState } ``` Source line: `23`. ## peer::ConnectionState [#peerconnectionstate] Connection state of a peer. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ConnectionState { /// Actively connected and exchanging messages. Connected, /// Not currently connected. Disconnected, /// Connection attempt in progress. Connecting, /// Peer has been banned due to misbehaviour. Banned, } ``` Source line: `48`. ## peer::ConnectionState::is\_active [#peerconnectionstateis_active] Returns `true` if the peer is in a live connection state. ```rust pub fn is_active(&self) -> bool; ``` Source line: `61`. ## peer::PeerAdmission [#peerpeeradmission] Proof class a peer presents at admission time. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum PeerAdmission { /// Staked validator DID with a recent chain attestation. StakedValidator { did: String, attested_epoch: u64 }, /// Operator allowlisted by launch/bootstrap configuration. AllowlistedBootstrap { operator_id: String }, /// Unstaked peer proof-of-work nonce. ProofOfWork { nonce: u64 }, } ``` Source line: `68`. ## peer::PeerDiversity [#peerpeerdiversity] Eclipse-resistance metadata for a peer. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PeerDiversity { pub asn: u32, pub geo_region: String, pub cloud_provider: String, pub lineage_group: String } ``` Source line: `79`. ## peer::PeerSecurityConfig [#peerpeersecurityconfig] Peer admission and diversity policy. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PeerSecurityConfig { /// Enforce Sybil proof checks in [`PeerRegistry::add_peer_with_admission`]. pub enforce_admission: bool, /// Current epoch for freshness checks. pub current_epoch: u64, /// Maximum age for validator attestations. pub max_attestation_age_epochs: u64, /// Minimum leading-zero PoW bits for unstaked peers. pub min_pow_leading_zero_bits: u32, /// Allowlisted bootstrap operator identifiers. pub allowlisted_bootstrap_operators: HashSet, /// Enforce ASN/region/cloud diversity once enough peers are present. pub enforce_diversity: bool, /// Minimum distinct ASNs in the connected set. pub min_asns: usize, /// Minimum distinct geo regions in the connected set. pub min_geo_regions: usize, /// Minimum distinct cloud providers in the connected set. pub min_cloud_providers: usize, /// Maximum fraction of peers sharing one lineage group. pub max_lineage_fraction: f64 } ``` Source line: `88`. ## peer::PeerRegistry [#peerpeerregistry] Registry managing known peers and their metadata. The registry enforces a maximum peer count and provides query methods for sync target selection and validator discovery. ```rust #[derive(Debug)] pub struct PeerRegistry { } ``` Source line: `212`. ## peer::PeerRegistry::new [#peerpeerregistrynew] Create a new registry with the given maximum peer count. ```rust pub fn new(max_peers: usize) -> Self; ``` Source line: `233`. ## peer::PeerRegistry::with\_security [#peerpeerregistrywith_security] Create a new registry with explicit security policy. ```rust pub fn with_security(max_peers: usize, security: PeerSecurityConfig) -> Self; ``` Source line: `238`. ## peer::PeerRegistry::peer\_count [#peerpeerregistrypeer_count] Number of peers currently in the registry. ```rust pub fn peer_count(&self) -> usize; ``` Source line: `249`. ## peer::PeerRegistry::add\_peer [#peerpeerregistryadd_peer] Add a new peer to the registry. Returns an error if the registry is full or if a peer with the same ID already exists (use [`update_peer`](Self::update_peer) to modify existing peers). ```rust pub fn add_peer(&mut self, info: PeerInfo) -> NetworkResult<()>; ``` Source line: `258`. ## peer::PeerRegistry::add\_peer\_with\_admission [#peerpeerregistryadd_peer_with_admission] Add a peer after validating its admission proof and diversity metadata. ```rust pub fn add_peer_with_admission( &mut self, info: PeerInfo, admission: PeerAdmission, diversity: Option, ) -> NetworkResult<()>; ``` Source line: `263`. ## peer::PeerRegistry::remove\_peer [#peerpeerregistryremove_peer] Remove a peer from the registry by ID. Returns the removed \[`PeerInfo`] or an error if not found. ```rust pub fn remove_peer(&mut self, peer_id: &str) -> NetworkResult; ``` Source line: `357`. ## peer::PeerRegistry::get\_peer [#peerpeerregistryget_peer] Look up a peer by ID. ```rust pub fn get_peer(&self, peer_id: &str) -> Option<&PeerInfo>; ``` Source line: `366`. ## peer::PeerRegistry::get\_peer\_mut [#peerpeerregistryget_peer_mut] Get mutable access to a peer's info. ```rust pub fn get_peer_mut(&mut self, peer_id: &str) -> Option<&mut PeerInfo>; ``` Source line: `371`. ## peer::PeerRegistry::get\_scoring [#peerpeerregistryget_scoring] Get a peer's scoring state. ```rust pub fn get_scoring(&self, peer_id: &str) -> Option<&PeerScoring>; ``` Source line: `376`. ## peer::PeerRegistry::get\_scoring\_mut [#peerpeerregistryget_scoring_mut] Get mutable access to a peer's scoring state. ```rust pub fn get_scoring_mut(&mut self, peer_id: &str) -> Option<&mut PeerScoring>; ``` Source line: `381`. ## peer::PeerRegistry::update\_peer [#peerpeerregistryupdate_peer] Update an existing peer's metadata. The `updater` closure receives a mutable reference to the peer info. Returns an error if the peer is not found. ```rust pub fn update_peer(&mut self, peer_id: &str, updater: F) -> NetworkResult<()> where F: FnOnce(&mut PeerInfo),; ``` Source line: `389`. ## peer::PeerRegistry::connected\_peers [#peerpeerregistryconnected_peers] Iterate over all currently connected peers. ```rust pub fn connected_peers(&self) -> impl Iterator; ``` Source line: `402`. ## peer::PeerRegistry::validator\_peers [#peerpeerregistryvalidator_peers] Iterate over all peers that are registered validators. ```rust pub fn validator_peers(&self) -> impl Iterator; ``` Source line: `409`. ## peer::PeerRegistry::best\_peers\_for\_sync [#peerpeerregistrybest_peers_for_sync] Return peers sorted by height (descending), suitable for block sync. Only connected peers with a non-banned state are returned. ```rust pub fn best_peers_for_sync(&self) -> Vec<&PeerInfo>; ``` Source line: `416`. ## peer::PeerRegistry::should\_ban [#peerpeerregistryshould_ban] Determine whether a peer should be banned based on reputation and scoring state. ```rust pub fn should_ban(&self, peer_id: &str) -> bool; ``` Source line: `431`. ## peer::PeerRegistry::ban\_peer [#peerpeerregistryban_peer] Ban a peer, setting its connection state to \[`ConnectionState::Banned`]. ```rust pub fn ban_peer(&mut self, peer_id: &str) -> NetworkResult<()>; ``` Source line: `448`. ## peer::PeerRegistry::peer\_ids [#peerpeerregistrypeer_ids] Returns all peer IDs currently in the registry. ```rust pub fn peer_ids(&self) -> Vec; ``` Source line: `455`. ## peer::PeerRegistry::decay\_all\_scores [#peerpeerregistrydecay_all_scores] Apply score decay across all peers. ```rust pub fn decay_all_scores(&mut self, factor: f64); ``` Source line: `460`. # sigil-network · propagation URL: https://docs.sigil.ml/reference/rust/sigil-network/propagation Markdown: https://docs.sigil.ml/reference/rust/sigil-network/propagation.md Source declarations, signatures and documentation for propagation. Source: `sigil/node/sigil-network/src/propagation.rs`. SHA-256: `8dac13c5581f4e2aef5e7d0031392e4a4cfde473b23b72339e91595bc1554cc7`. 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. ## propagation::DEFAULT\_BLOCK\_SHARD\_BYTES [#propagationdefault_block_shard_bytes] Default block shard payload size. ```rust pub const DEFAULT_BLOCK_SHARD_BYTES: usize; ``` Source line: `11`. ## propagation::DEFAULT\_PROPAGATION\_FANOUT [#propagationdefault_propagation_fanout] Default number of peers each shard is initially forwarded to. ```rust pub const DEFAULT_PROPAGATION_FANOUT: usize; ``` Source line: `13`. ## propagation::DEFAULT\_PARITY\_SHARDS [#propagationdefault_parity_shards] Default parity shard count. One XOR parity shard recovers any one missing data shard in a propagation group. ```rust pub const DEFAULT_PARITY_SHARDS: usize; ``` Source line: `16`. ## propagation::DEFAULT\_MAX\_BLOCK\_PAYLOAD\_BYTES [#propagationdefault_max_block_payload_bytes] Default maximum serialized block payload accepted by the propagation layer. ```rust pub const DEFAULT_MAX_BLOCK_PAYLOAD_BYTES: usize; ``` Source line: `18`. ## propagation::QuicIngressConfig [#propagationquicingressconfig] QUIC ingress transport settings. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct QuicIngressConfig { /// Enable QUIC listener startup in the transport layer. pub enabled: bool, /// UDP socket address for QUIC ingress. pub listen_addr: String, /// Maximum concurrently handshaking or established ingress streams. pub max_concurrent_streams: u32, /// Maximum bytes accepted for a single transaction envelope. pub max_transaction_bytes: u32 } ``` Source line: `22`. ## propagation::BlockPropagationConfig [#propagationblockpropagationconfig] Block propagation parameters for the Turbine-equivalent fanout path. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BlockPropagationConfig { /// Enable sharded block propagation. pub enabled: bool, /// Payload bytes per data shard. pub shard_bytes: usize, /// Number of parity shards emitted per block. pub parity_shards: usize, /// Initial peer fanout per shard. pub fanout: usize, /// Maximum serialized block payload accepted for propagation. pub max_payload_bytes: usize } ``` Source line: `46`. ## propagation::QuicIngressConfig::validate [#propagationquicingressconfigvalidate] ```rust pub fn validate(&self) -> Result<(), PropagationConfigError>; ``` Source line: `72`. ## propagation::BlockPropagationConfig::validate [#propagationblockpropagationconfigvalidate] ```rust pub fn validate(&self) -> Result<(), PropagationConfigError>; ``` Source line: `93`. ## propagation::PropagationConfigError [#propagationpropagationconfigerror] Errors raised by ingress/propagation policy validation or planning. ```rust #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum PropagationConfigError { #[error("invalid QUIC ingress config: {0}")] InvalidQuicIngress(String), #[error("invalid block propagation config: {0}")] InvalidBlockPropagation(String), #[error("serialized block payload too large: {actual} bytes exceeds {max} bytes")] PayloadTooLarge { actual: usize, max: usize }, #[error("block serialization failed: {0}")] Serialization(String), #[error("not enough shards to recover payload")] NotEnoughShards, } ``` Source line: `115`. ## propagation::PropagationPeer [#propagationpropagationpeer] Peer metadata used for deterministic propagation fanout. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PropagationPeer { pub peer_id: String, pub did: Option, pub stake: u64 } ``` Source line: `130`. ## propagation::BlockPropagationShard [#propagationblockpropagationshard] One data or parity shard of a serialized block payload. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BlockPropagationShard { pub block_hash: SigilHash, pub block_height: u64, pub shard_index: usize, pub data_shards: usize, pub parity_shards: usize, pub original_payload_len: usize, pub payload_hash: SigilHash, pub bytes: Vec, pub parity: bool } ``` Source line: `138`. ## propagation::PeerShardAssignment [#propagationpeershardassignment] Deterministic assignment of one shard to one peer. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PeerShardAssignment { pub peer_id: String, pub shard_index: usize, pub parity: bool } ``` Source line: `152`. ## propagation::BlockPropagationPlan [#propagationblockpropagationplan] Complete transport-independent propagation plan. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BlockPropagationPlan { pub block_hash: SigilHash, pub block_height: u64, pub payload_hash: SigilHash, pub shards: Vec, pub assignments: Vec } ``` Source line: `160`. ## propagation::plan\_block\_propagation [#propagationplan_block_propagation] Build deterministic shards and peer assignments for a block. ```rust pub fn plan_block_propagation( block: &Block, peers: &[PropagationPeer], config: &BlockPropagationConfig, ) -> Result; ``` Source line: `169`. ## propagation::recover\_payload\_from\_shards [#propagationrecover_payload_from_shards] Recover the original serialized block payload from data shards and, if one data shard is missing, one XOR parity shard. ```rust pub fn recover_payload_from_shards( shards: &[BlockPropagationShard], ) -> Result, PropagationConfigError>; ``` Source line: `269`. # sigil-network · scoring URL: https://docs.sigil.ml/reference/rust/sigil-network/scoring Markdown: https://docs.sigil.ml/reference/rust/sigil-network/scoring.md Source declarations, signatures and documentation for scoring. Source: `sigil/node/sigil-network/src/scoring.rs`. SHA-256: `bc855b75485303729177aa3d046d562b905c3eaa5456c5556812b05b744ce16d`. 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. ## scoring::PeerScoring [#scoringpeerscoring] Peer scoring state combining gossipsub behaviour and OATS reputation. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PeerScoring { /// Base score that all peers start with. pub base_score: f64, /// Accumulated score from delivering valid messages. pub message_delivery_score: f64, /// Accumulated score from being the first to deliver messages. pub first_delivery_score: f64, /// Accumulated penalty for delivering invalid messages. pub invalid_message_penalty: f64, /// Bonus score derived from the peer's OATS reputation. pub oats_reputation_bonus: f64 } ``` Source line: `30`. ## scoring::GossipRateLimitConfig [#scoringgossipratelimitconfig] Message-rate limits applied before forwarding or processing gossip. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GossipRateLimitConfig { /// Max messages per peer per one-second window. pub per_peer_per_sec: u32, /// Max messages per source IP per one-second window. pub per_ip_per_sec: u32, /// Max messages per `(peer, topic)` per one-second window. pub per_topic_per_sec: u32 } ``` Source line: `45`. ## scoring::GossipRateLimiter [#scoringgossipratelimiter] Deterministic per-peer and per-topic gossip flood limiter. ```rust #[derive(Debug, Clone)] pub struct GossipRateLimiter { } ``` Source line: `87`. ## scoring::GossipRateLimiter::new [#scoringgossipratelimiternew] ```rust pub fn new(config: GossipRateLimitConfig) -> Self; ``` Source line: `95`. ## scoring::GossipRateLimiter::record [#scoringgossipratelimiterrecord] Record one inbound message and return an error if it exceeds a cap. `now_unix_secs` is supplied by the caller to keep tests deterministic and avoid binding this crate to a specific async runtime clock. ```rust pub fn record( &mut self, peer_id: &str, topic: GossipTopic, now_unix_secs: u64, ) -> NetworkResult<()>; ``` Source line: `108`. ## scoring::GossipRateLimiter::record\_from\_ip [#scoringgossipratelimiterrecord_from_ip] Record one inbound message and rate-limit by both peer ID and source IP. ```rust pub fn record_from_ip( &mut self, peer_id: &str, source_ip: Option<&str>, topic: GossipTopic, now_unix_secs: u64, ) -> NetworkResult<()>; ``` Source line: `118`. ## scoring::PeerScoring::new [#scoringpeerscoringnew] Create a new scoring instance with default base score. ```rust pub fn new() -> Self; ``` Source line: `181`. ## scoring::PeerScoring::with\_base\_score [#scoringpeerscoringwith_base_score] Create a scoring instance with a custom base score. ```rust pub fn with_base_score(base_score: f64) -> Self; ``` Source line: `186`. ## scoring::PeerScoring::compute\_score [#scoringpeerscoringcompute_score] Compute the aggregate score for this peer. The formula is: `base + delivery + first_delivery - invalid_penalty + oats_bonus` ```rust pub fn compute_score(&self) -> f64; ``` Source line: `197`. ## scoring::PeerScoring::record\_valid\_message [#scoringpeerscoringrecord_valid_message] Record that this peer delivered a valid message. ```rust pub fn record_valid_message(&mut self); ``` Source line: `204`. ## scoring::PeerScoring::record\_invalid\_message [#scoringpeerscoringrecord_invalid_message] Record that this peer delivered an invalid message (penalize). ```rust pub fn record_invalid_message(&mut self); ``` Source line: `209`. ## scoring::PeerScoring::record\_first\_delivery [#scoringpeerscoringrecord_first_delivery] Record that this peer was the first to deliver a message. ```rust pub fn record_first_delivery(&mut self); ``` Source line: `214`. ## scoring::PeerScoring::set\_oats\_reputation [#scoringpeerscoringset_oats_reputation] Update the OATS reputation bonus from the on-chain reputation score. The `score` parameter should be in the range `[0.0, 1.0]` and is scaled to a bonus range of `[0.0, 50.0]`. ```rust pub fn set_oats_reputation(&mut self, score: f64); ``` Source line: `222`. ## scoring::PeerScoring::decay [#scoringpeerscoringdecay] Apply time-based decay to volatile score components. `factor` should be in `(0.0, 1.0)` — e.g. `0.95` preserves 95% of accumulated scores per decay tick. ```rust pub fn decay(&mut self, factor: f64); ``` Source line: `230`. ## scoring::PeerScoring::should\_ban [#scoringpeerscoringshould_ban] Returns `true` if this peer's score is below the ban threshold. ```rust pub fn should_ban(&self) -> bool; ``` Source line: `239`. # sigil-network · topic URL: https://docs.sigil.ml/reference/rust/sigil-network/topic Markdown: https://docs.sigil.ml/reference/rust/sigil-network/topic.md Source declarations, signatures and documentation for topic. Source: `sigil/node/sigil-network/src/topic.rs`. SHA-256: `627bd4b7635aaf1b69487be3b07ce08acf1465c4957325fdc68980e7288420a0`. 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. ## topic::GossipTopic [#topicgossiptopic] Gossipsub topics for the Sigil network. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum GossipTopic { /// New finalized blocks. Blocks, /// Pre-vote messages from the consensus layer. PreVotes, /// Pre-commit messages from the consensus layer. PreCommits, /// New unconfirmed transactions (mempool). Transactions, /// Compute receipt announcements (requires `compute` feature). ComputeReceipts, /// Tower coordination chain block announcements. TowerBlocks, /// Tower Committee vote messages. TowerCommitteeVotes, /// Tower slashing evidence submissions. TowerSlashingEvidence, /// Tower Casper FFG finality votes. TowerFinalityVotes, /// Tower Casper FFG attestations from execution-chain validators. /// /// Distinct from [`TowerFinalityVotes`] (Tower chain governance votes): /// these are signed attestations broadcast by execution-chain validators /// at each epoch boundary. The Tower runtime uses them to compute /// justification and finalization via the Casper FFG rules. TowerAttestations, /// CZAC cross-zone channel operation messages. CzacMessages, } ``` Source line: `11`. ## topic::GossipTopic::as\_str [#topicgossiptopicas_str] The canonical topic string used on the wire. ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `43`. ## topic::GossipTopic::from\_topic\_str [#topicgossiptopicfrom_topic_str] Parse a topic string back into a \[`GossipTopic`]. Returns `None` if the string does not match any known topic. ```rust pub fn from_topic_str(s: &str) -> Option; ``` Source line: `62`. ## topic::GossipTopic::all [#topicgossiptopicall] All defined gossipsub topics. ```rust pub fn all() -> Vec; ``` Source line: `80`. ## topic::GossipTopic::validator\_topics [#topicgossiptopicvalidator_topics] Topics that every execution-chain validator must subscribe to. ```rust pub fn validator_topics() -> Vec; ``` Source line: `97`. ## topic::GossipTopic::tower\_topics [#topicgossiptopictower_topics] Topics for Tower coordination chain validators. ```rust pub fn tower_topics() -> Vec; ``` Source line: `108`. ## topic::GossipTopic::light\_topics [#topicgossiptopiclight_topics] The minimal topic set for light/observer nodes. ```rust pub fn light_topics() -> Vec; ``` Source line: `119`. # sigil-nova · assets URL: https://docs.sigil.ml/reference/rust/sigil-nova/assets Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/assets.md Source declarations, signatures and documentation for assets. Source: `sigil/node/sigil-nova/src/assets.rs`. SHA-256: `53990d5b199b86bd83e65645a0c7d361d29974513b75a4eb8b8a585957a29fa6`. 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. ## assets::MAX\_ASSET\_POLYCOUNT [#assetsmax_asset_polycount] Maximum polycount for a single asset. ```rust pub const MAX_ASSET_POLYCOUNT: u32; ``` Source line: `15`. ## assets::MAX\_ASSET\_FILE\_SIZE [#assetsmax_asset_file_size] Maximum file size for an asset (100 MB). ```rust pub const MAX_ASSET_FILE_SIZE: u64; ``` Source line: `18`. ## assets::AssetId [#assetsassetid] Unique asset identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct AssetId(pub String); ``` Source line: `22`. ## assets::AssetType [#assetsassettype] Type of 3D asset. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum AssetType { GltfModel, Texture, Audio, Environment, AvatarTemplate, Furniture, Vehicle, } ``` Source line: `26`. ## assets::ContentRating [#assetscontentrating] Content rating for asset moderation. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ContentRating { Safe, Moderate, Restricted, } ``` Source line: `38`. ## assets::AssetMetadata [#assetsassetmetadata] Metadata for a registered Nova asset. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AssetMetadata { pub id: AssetId, pub asset_type: AssetType, /// DID of this asset in the MARS registry. pub mars_did: String, pub polycount: Option, pub lod_levels: Option, pub bounding_box: Option, pub file_size_bytes: u64, pub format: String, pub creator_did: String, pub created_at: u64, pub content_rating: ContentRating } ``` Source line: `46`. ## assets::AssetRegistry [#assetsassetregistry] On-chain registry of Nova 3D assets. ```rust #[derive(Debug, Clone, Default)] pub struct AssetRegistry { } ``` Source line: `63`. ## assets::AssetRegistry::new [#assetsassetregistrynew] Create an empty asset registry. ```rust pub fn new() -> Self; ``` Source line: `69`. ## assets::AssetRegistry::register\_asset [#assetsassetregistryregister_asset] Register a new asset after validation. ```rust pub fn register_asset(&mut self, metadata: AssetMetadata) -> Result<(), NovaError>; ``` Source line: `74`. ## assets::AssetRegistry::get\_asset [#assetsassetregistryget_asset] Look up an asset by ID. ```rust pub fn get_asset(&self, asset_id: &AssetId) -> Option<&AssetMetadata>; ``` Source line: `84`. ## assets::AssetRegistry::search\_assets [#assetsassetregistrysearch_assets] Search assets by type, creator, and/or maximum polycount. ```rust pub fn search_assets( &self, asset_type: Option, creator: Option<&str>, max_polycount: Option, ) -> Vec<&AssetMetadata>; ``` Source line: `89`. ## assets::AssetRegistry::deregister\_asset [#assetsassetregistryderegister_asset] Deregister an asset, returning the removed metadata. ```rust pub fn deregister_asset(&mut self, asset_id: &AssetId) -> Result; ``` Source line: `121`. ## assets::AssetRegistry::asset\_count [#assetsassetregistryasset_count] Total number of registered assets. ```rust pub fn asset_count(&self) -> usize; ``` Source line: `128`. ## assets::validate\_asset [#assetsvalidate_asset] Validate asset metadata constraints. ```rust pub fn validate_asset(metadata: &AssetMetadata) -> Result<(), NovaError>; ``` Source line: `134`. # sigil-nova · avatar URL: https://docs.sigil.ml/reference/rust/sigil-nova/avatar Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/avatar.md Source declarations, signatures and documentation for avatar. Source: `sigil/node/sigil-nova/src/avatar.rs`. SHA-256: `ee8352dcb2778d7ab2357aa9a7e5094e82d162873ae8e498373b8f521663dbeb`. 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. ## avatar::AvatarId [#avataravatarid] Unique avatar identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct AvatarId(pub String); ``` Source line: `16`. ## avatar::Rotation [#avatarrotation] Euler rotation for avatar orientation. ```rust #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct Rotation { /// Rotation around the Y axis (left-right look). pub yaw: f32, /// Rotation around the X axis (up-down look). pub pitch: f32, /// Rotation around the Z axis (tilt). pub roll: f32 } ``` Source line: `20`. ## avatar::AnimationState [#avataranimationstate] Animation state of an avatar. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum AnimationState { Idle, Walking, Running, Sitting, Gesture(String), Custom(String), } ``` Source line: `31`. ## avatar::PresenceStatus [#avatarpresencestatus] Presence status of an avatar's owner. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum PresenceStatus { Online, Away, Busy, Offline, } ``` Source line: `42`. ## avatar::AvatarRecord [#avataravatarrecord] On-chain record of a spawned avatar. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AvatarRecord { pub id: AvatarId, pub owner_did: String, pub avatar_asset_did: String, pub position: WorldPosition, pub rotation: Rotation, pub animation_state: AnimationState, pub presence: PresenceStatus, pub world_id: WorldId, pub last_updated: u64 } ``` Source line: `51`. ## avatar::AvatarRegistry [#avataravatarregistry] On-chain registry of all spawned avatars. ```rust #[derive(Debug, Clone, Default)] pub struct AvatarRegistry { } ``` Source line: `65`. ## avatar::AvatarRegistry::new [#avataravatarregistrynew] Create an empty avatar registry. ```rust pub fn new() -> Self; ``` Source line: `72`. ## avatar::AvatarRegistry::spawn\_avatar [#avataravatarregistryspawn_avatar] Spawn a new avatar for an agent/human. Each DID may only have one active avatar at a time. ```rust pub fn spawn_avatar( &mut self, owner_did: &str, asset_did: &str, position: WorldPosition, world_id: WorldId, timestamp: u64, ) -> Result; ``` Source line: `79`. ## avatar::AvatarRegistry::update\_position [#avataravatarregistryupdate_position] Update the position and rotation of an avatar. ```rust pub fn update_position( &mut self, avatar_id: &AvatarId, position: WorldPosition, rotation: Rotation, timestamp: u64, ) -> Result<(), NovaError>; ``` Source line: `114`. ## avatar::AvatarRegistry::update\_animation [#avataravatarregistryupdate_animation] Update the animation state of an avatar. ```rust pub fn update_animation( &mut self, avatar_id: &AvatarId, state: AnimationState, timestamp: u64, ) -> Result<(), NovaError>; ``` Source line: `132`. ## avatar::AvatarRegistry::set\_presence [#avataravatarregistryset_presence] Set the presence status of an avatar. ```rust pub fn set_presence( &mut self, avatar_id: &AvatarId, status: PresenceStatus, timestamp: u64, ) -> Result<(), NovaError>; ``` Source line: `148`. ## avatar::AvatarRegistry::despawn\_avatar [#avataravatarregistrydespawn_avatar] Remove an avatar from the world. ```rust pub fn despawn_avatar(&mut self, avatar_id: &AvatarId) -> Result; ``` Source line: `164`. ## avatar::AvatarRegistry::get\_nearby\_avatars [#avataravatarregistryget_nearby_avatars] Find all avatars within a given radius of a position. ```rust pub fn get_nearby_avatars(&self, position: &WorldPosition, radius: f64) -> Vec<&AvatarRecord>; ``` Source line: `174`. ## avatar::AvatarRegistry::get\_avatar\_by\_did [#avataravatarregistryget_avatar_by_did] Look up an avatar by its owner DID. ```rust pub fn get_avatar_by_did(&self, owner_did: &str) -> Option<&AvatarRecord>; ``` Source line: `188`. ## avatar::AvatarRegistry::get\_avatar [#avataravatarregistryget_avatar] Get an avatar by its ID. ```rust pub fn get_avatar(&self, avatar_id: &AvatarId) -> Option<&AvatarRecord>; ``` Source line: `195`. ## avatar::AvatarRegistry::avatar\_count [#avataravatarregistryavatar_count] Total number of spawned avatars. ```rust pub fn avatar_count(&self) -> usize; ``` Source line: `200`. # sigil-nova · building URL: https://docs.sigil.ml/reference/rust/sigil-nova/building Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/building.md Source declarations, signatures and documentation for building. Source: `sigil/node/sigil-nova/src/building.rs`. SHA-256: `cc97049d0646da8c424b58c8a4fd92910051c207eac9b911790a028e01f67280`. 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. ## building::MAX\_POLYCOUNT [#buildingmax_polycount] Maximum polycount for a single building (performance budget). ```rust pub const MAX_POLYCOUNT: u32; ``` Source line: `15`. ## building::BuildingId [#buildingbuildingid] Unique building identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct BuildingId(pub String); ``` Source line: `19`. ## building::BoundingBox [#buildingboundingbox] Axis-aligned bounding box for a building. ```rust #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct BoundingBox { pub min: WorldPosition, pub max: WorldPosition } ``` Source line: `23`. ## building::BuildingManifest [#buildingbuildingmanifest] Manifest describing a building asset before placement. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BuildingManifest { pub id: BuildingId, pub name: String, /// DID of the 3D asset in MARS registry. pub asset_did: String, pub polycount: u32, pub bounding_box: BoundingBox, /// Number of Level-of-Detail levels. pub lod_levels: u8, /// DID of the building creator. pub creator_did: String } ``` Source line: `30`. ## building::BuildingPlacement [#buildingbuildingplacement] A building placed on a specific parcel in the world. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BuildingPlacement { pub manifest: BuildingManifest, pub parcel_id: ParcelId, pub position: WorldPosition, /// Rotation in degrees around the Y axis. pub rotation: f32, pub placed_at: u64, pub permissions: BuildingPermissions } ``` Source line: `45`. ## building::BuildingPermissions [#buildingbuildingpermissions] Access control for a building. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BuildingPermissions { pub owner_did: String, pub can_enter: AccessLevel, pub can_modify: AccessLevel } ``` Source line: `57`. ## building::AccessLevel [#buildingaccesslevel] Access level for building interactions. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum AccessLevel { Public, Members, Owner, Deny, } ``` Source line: `65`. ## building::BuildingRegistry [#buildingbuildingregistry] On-chain registry of deployed buildings. ```rust #[derive(Debug, Clone, Default)] pub struct BuildingRegistry { } ``` Source line: `74`. ## building::BuildingRegistry::new [#buildingbuildingregistrynew] Create an empty building registry. ```rust pub fn new() -> Self; ``` Source line: `80`. ## building::BuildingRegistry::deploy\_building [#buildingbuildingregistrydeploy_building] Deploy a building onto a parcel. Validates polycount limits. The caller must ensure parcel ownership externally before calling this method. ```rust pub fn deploy_building( &mut self, manifest: BuildingManifest, parcel_id: ParcelId, position: WorldPosition, rotation: f32, timestamp: u64, owner_did: &str, ) -> Result; ``` Source line: `88`. ## building::BuildingRegistry::remove\_building [#buildingbuildingregistryremove_building] Remove a building. Only the owner may remove it. ```rust pub fn remove_building( &mut self, building_id: &BuildingId, caller_did: &str, ) -> Result; ``` Source line: `163`. ## building::BuildingRegistry::get\_buildings\_in\_parcel [#buildingbuildingregistryget_buildings_in_parcel] Get all buildings placed in a given chunk. Uses a simple linear scan; production would use a spatial index. ```rust pub fn get_buildings_in_parcel(&self, parcel_id: &ParcelId) -> Vec<&BuildingPlacement>; ``` Source line: `188`. ## building::BuildingRegistry::update\_permissions [#buildingbuildingregistryupdate_permissions] Update the permissions on an existing building. ```rust pub fn update_permissions( &mut self, building_id: &BuildingId, caller_did: &str, new_perms: BuildingPermissions, ) -> Result<(), NovaError>; ``` Source line: `196`. ## building::BuildingRegistry::get\_building [#buildingbuildingregistryget_building] Get a building by ID. ```rust pub fn get_building(&self, building_id: &BuildingId) -> Option<&BuildingPlacement>; ``` Source line: `219`. ## building::BuildingRegistry::building\_count [#buildingbuildingregistrybuilding_count] Total number of deployed buildings. ```rust pub fn building_count(&self) -> usize; ``` Source line: `224`. # sigil-nova · crate URL: https://docs.sigil.ml/reference/rust/sigil-nova/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-nova/src/lib.rs`. SHA-256: `37fd767dca49ccbb3fe38f5d5e85e1542340c9ed43bb6517ea62d3b1a6d30da5`. 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. ## assets [#assets] ```rust pub mod assets; ``` Source line: `8`. ## avatar [#avatar] ```rust pub mod avatar; ``` Source line: `9`. ## building [#building] ```rust pub mod building; ``` Source line: `10`. ## economy [#economy] ```rust pub mod economy; ``` Source line: `11`. ## error [#error] ```rust pub mod error; ``` Source line: `12`. ## parcel [#parcel] ```rust pub mod parcel; ``` Source line: `13`. ## spatial\_zone [#spatial_zone] ```rust pub mod spatial_zone; ``` Source line: `14`. ## streaming [#streaming] ```rust pub mod streaming; ``` Source line: `15`. ## world [#world] ```rust pub mod world; ``` Source line: `16`. # sigil-nova · economy URL: https://docs.sigil.ml/reference/rust/sigil-nova/economy Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/economy.md Source declarations, signatures and documentation for economy. Source: `sigil/node/sigil-nova/src/economy.rs`. SHA-256: `b840e56e48a5496f89cd2dbc7037482aeec6e7aac78f325ba6fd9194e412cb43`. 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. ## economy::AuctionId [#economyauctionid] Unique auction identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct AuctionId(pub String); ``` Source line: `21`. ## economy::AuctionStatus [#economyauctionstatus] Current status of an auction. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum AuctionStatus { Active, Ended, Settled, Cancelled, } ``` Source line: `25`. ## economy::Bid [#economybid] A single bid on an auction. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Bid { pub bidder_did: String, pub amount: u64, pub bid_time: u64 } ``` Source line: `34`. ## economy::Auction [#economyauction] A parcel auction. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Auction { pub id: AuctionId, pub parcel_id: ParcelId, pub seller_did: String, pub min_bid: u64, pub current_bid: Option, pub end_time: u64, pub status: AuctionStatus } ``` Source line: `42`. ## economy::AuctionResult [#economyauctionresult] Result of settling an auction. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AuctionResult { pub auction_id: AuctionId, pub winner_did: Option, pub final_amount: Option } ``` Source line: `54`. ## economy::AuctionHouse [#economyauctionhouse] On-chain auction house. ```rust #[derive(Debug, Clone, Default)] pub struct AuctionHouse { } ``` Source line: `62`. ## economy::AuctionHouse::new [#economyauctionhousenew] Create an empty auction house. ```rust pub fn new() -> Self; ``` Source line: `68`. ## economy::AuctionHouse::create\_auction [#economyauctionhousecreate_auction] Create a new auction for a parcel. ```rust pub fn create_auction( &mut self, parcel_id: ParcelId, seller_did: &str, min_bid: u64, duration_epochs: u64, current_time: u64, ) -> Result; ``` Source line: `73`. ## economy::AuctionHouse::place\_bid [#economyauctionhouseplace_bid] Place a bid on an active auction. The bid must exceed the current bid by at least 5%, or meet the minimum bid if there is no current bid. ```rust pub fn place_bid( &mut self, auction_id: &AuctionId, bidder_did: &str, amount: u64, bid_time: u64, ) -> Result; ``` Source line: `134`. ## economy::AuctionHouse::settle\_auction [#economyauctionhousesettle_auction] Settle a completed auction, returning the result. ```rust pub fn settle_auction(&mut self, auction_id: &AuctionId) -> Result; ``` Source line: `195`. ## economy::AuctionHouse::cancel\_auction [#economyauctionhousecancel_auction] Cancel an auction. Only possible if no bids have been placed. ```rust pub fn cancel_auction( &mut self, auction_id: &AuctionId, caller_did: &str, ) -> Result<(), NovaError>; ``` Source line: `217`. ## economy::AuctionHouse::get\_auction [#economyauctionhouseget_auction] Get an auction by ID. ```rust pub fn get_auction(&self, auction_id: &AuctionId) -> Option<&Auction>; ``` Source line: `247`. ## economy::AuctionHouse::auction\_count [#economyauctionhouseauction_count] Total number of auctions. ```rust pub fn auction_count(&self) -> usize; ``` Source line: `252`. ## economy::RentPayment [#economyrentpayment] A rent payment record. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RentPayment { pub parcel_id: ParcelId, pub tenant_did: String, pub amount: u64, pub period_start: u64, pub period_end: u64 } ``` Source line: `259`. ## economy::calculate\_rent [#economycalculate_rent] Calculate base rent per epoch for a parcel type and region. Base rates per type, with a distance multiplier from origin. ```rust pub fn calculate_rent(parcel_type: &ParcelType, region: &RegionCoord) -> u64; ``` Source line: `270`. ## economy::BuildingCost [#economybuildingcost] Cost breakdown for deploying a building. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct BuildingCost { pub polycount_fee: u64, pub compute_fee: u64, pub storage_fee: u64 } ``` Source line: `287`. ## economy::BuildingCost::total [#economybuildingcosttotal] Total cost. ```rust pub fn total(&self) -> u64; ``` Source line: `295`. ## economy::calculate\_building\_cost [#economycalculate_building_cost] Calculate the cost of deploying a building based on its manifest. Fees are proportional to polycount and LOD levels. ```rust pub fn calculate_building_cost(manifest: &BuildingManifest) -> BuildingCost; ``` Source line: `305`. # sigil-nova · error URL: https://docs.sigil.ml/reference/rust/sigil-nova/error Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-nova/src/error.rs`. SHA-256: `b9888abc6b04ba93f337932d3125b21aeaeab9280c3c212d8635aec81e25dd37`. 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. ## error::NovaError [#errornovaerror] Error types for the Nova metaverse on-chain primitives. Unified error type for all Nova subsystems. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum NovaError { // -- World errors -- #[error("invalid world position: {0}")] InvalidPosition(String), #[error("world not found: {0}")] WorldNotFound(String), // -- Parcel errors -- #[error("parcel already claimed: {0}")] ParcelAlreadyClaimed(String), #[error("parcel not found: {0}")] ParcelNotFound(String), #[error("not parcel owner: caller {caller}, owner {owner}")] NotParcelOwner { caller: String, owner: String }, #[error("invalid parcel id: {0}")] InvalidParcelId(String), // -- Building errors -- #[error("building not found: {0}")] BuildingNotFound(String), #[error("not building owner: caller {caller}, owner {owner}")] NotBuildingOwner { caller: String, owner: String }, #[error("building exceeds parcel bounds: {0}")] BuildingOutOfBounds(String), #[error("polycount limit exceeded: {count} > {limit}")] PolycountExceeded { count: u32, limit: u32 }, #[error("building already exists: {0}")] BuildingAlreadyExists(String), // -- Avatar errors -- #[error("avatar not found: {0}")] AvatarNotFound(String), #[error("avatar already spawned for DID: {0}")] AvatarAlreadySpawned(String), // -- Spatial zone errors -- #[error("zone not found: {0}")] ZoneNotFound(String), #[error("not zone owner: caller {caller}, owner {owner}")] NotZoneOwner { caller: String, owner: String }, #[error("invalid zone boundary: {0}")] InvalidZoneBoundary(String), // -- Asset errors -- #[error("asset not found: {0}")] AssetNotFound(String), #[error("asset already registered: {0}")] AssetAlreadyRegistered(String), #[error("invalid asset: {0}")] InvalidAsset(String), // -- Economy errors -- #[error("auction not found: {0}")] AuctionNotFound(String), #[error("auction not active: {0}")] AuctionNotActive(String), #[error("bid too low: offered {offered}, minimum {minimum}")] BidTooLow { offered: u64, minimum: u64 }, #[error("not auction seller: caller {caller}, seller {seller}")] NotAuctionSeller { caller: String, seller: String }, #[error("auction has bids, cannot cancel")] AuctionHasBids, #[error("auction has expired at time {end_time}, bid placed at {bid_time}")] AuctionExpired { end_time: u64, bid_time: u64 }, #[error("seller cannot bid on own auction")] SelfBidNotAllowed, #[error("invalid building data: {0}")] InvalidBuildingData(String), #[error("invalid auction parameters: {0}")] InvalidAuctionParams(String), // -- Streaming errors -- #[error("stream session not found: {0}")] StreamNotFound(String), #[error("stream already active for agent: {0}")] StreamAlreadyActive(String), #[error("invalid stream state transition: {from} -> {to}")] InvalidStreamTransition { from: String, to: String }, // -- General errors -- #[error("serialization error: {0}")] SerializationError(String), } ``` Source line: `5`. # sigil-nova URL: https://docs.sigil.ml/reference/rust/sigil-nova Markdown: https://docs.sigil.ml/reference/rust/sigil-nova.md Nova metaverse on-chain primitives — spatial state, parcels, buildings, avatars, economy Nova metaverse on-chain primitives — spatial state, parcels, buildings, avatars, economy | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-nova` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-nova/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_nova` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-nova = { path = "../sigil-nova" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-nova/crate) — 9 declarations * [assets](/reference/rust/sigil-nova/assets) — 14 declarations * [avatar](/reference/rust/sigil-nova/avatar) — 16 declarations * [building](/reference/rust/sigil-nova/building) — 15 declarations * [economy](/reference/rust/sigil-nova/economy) — 18 declarations * [error](/reference/rust/sigil-nova/error) — 1 declarations * [parcel](/reference/rust/sigil-nova/parcel) — 12 declarations * [spatial\_zone](/reference/rust/sigil-nova/spatial_zone) — 14 declarations * [streaming](/reference/rust/sigil-nova/streaming) — 15 declarations * [world](/reference/rust/sigil-nova/world) — 12 declarations # sigil-nova · parcel URL: https://docs.sigil.ml/reference/rust/sigil-nova/parcel Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/parcel.md Source declarations, signatures and documentation for parcel. Source: `sigil/node/sigil-nova/src/parcel.rs`. SHA-256: `3729a56942282008c0d008e51511a650fda6efefa6fdaa4b2f79632792eb6bc8`. 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. ## parcel::ParcelId [#parcelparcelid] Unique parcel identifier within a region. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct ParcelId { pub region: RegionCoord, pub local_x: u16, pub local_z: u16 } ``` Source line: `18`. ## parcel::ParcelType [#parcelparceltype] Type of land parcel determining usage rules. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ParcelType { Residential, Commercial, Public, Wilderness, Reserved, } ``` Source line: `26`. ## parcel::ParcelOwnership [#parcelparcelownership] Ownership record for a single parcel. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ParcelOwnership { pub parcel_id: ParcelId, pub owner_did: String, pub parcel_type: ParcelType, pub acquired_at: u64, pub rent_per_epoch: Option } ``` Source line: `36`. ## parcel::ParcelRegistry [#parcelparcelregistry] On-chain registry of all parcels with ownership indexes. ```rust #[derive(Debug, Clone, Default)] pub struct ParcelRegistry { } ``` Source line: `46`. ## parcel::ParcelRegistry::new [#parcelparcelregistrynew] Create an empty parcel registry. ```rust pub fn new() -> Self; ``` Source line: `53`. ## parcel::ParcelRegistry::claim\_parcel [#parcelparcelregistryclaim_parcel] Claim an unowned parcel. ```rust pub fn claim_parcel( &mut self, parcel_id: ParcelId, owner_did: &str, parcel_type: ParcelType, timestamp: u64, ) -> Result; ``` Source line: `58`. ## parcel::ParcelRegistry::transfer\_parcel [#parcelparcelregistrytransfer_parcel] Transfer parcel ownership from one DID to another. ```rust pub fn transfer_parcel( &mut self, parcel_id: ParcelId, from_did: &str, to_did: &str, ) -> Result<(), NovaError>; ``` Source line: `92`. ## parcel::ParcelRegistry::get\_parcels\_by\_owner [#parcelparcelregistryget_parcels_by_owner] Get all parcels owned by a DID. ```rust pub fn get_parcels_by_owner(&self, owner_did: &str) -> Vec<&ParcelOwnership>; ``` Source line: `137`. ## parcel::ParcelRegistry::get\_parcels\_in\_region [#parcelparcelregistryget_parcels_in_region] Get all parcels within a given region. ```rust pub fn get_parcels_in_region(&self, region: &RegionCoord) -> Vec<&ParcelOwnership>; ``` Source line: `145`. ## parcel::ParcelRegistry::is\_available [#parcelparcelregistryis_available] Check whether a parcel is unclaimed. ```rust pub fn is_available(&self, parcel_id: &ParcelId) -> bool; ``` Source line: `153`. ## parcel::ParcelRegistry::parcel\_count [#parcelparcelregistryparcel_count] Total number of claimed parcels. ```rust pub fn parcel_count(&self) -> usize; ``` Source line: `158`. ## parcel::validate\_parcel\_id [#parcelvalidate_parcel_id] Validate that a parcel ID has local coordinates within bounds. ```rust pub fn validate_parcel_id(id: &ParcelId) -> Result; ``` Source line: `164`. # sigil-nova · spatial_zone URL: https://docs.sigil.ml/reference/rust/sigil-nova/spatial_zone Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/spatial_zone.md Source declarations, signatures and documentation for spatial_zone. Source: `sigil/node/sigil-nova/src/spatial_zone.rs`. SHA-256: `6ca893abf32968ea858e27e85e912b9d088428506943168fa5dab7d34ac82f94`. 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. ## spatial\_zone::SpatialZoneId [#spatial_zonespatialzoneid] Unique spatial zone identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SpatialZoneId(pub String); ``` Source line: `17`. ## spatial\_zone::ZoneBoundary [#spatial_zonezoneboundary] Spherical boundary for a spatial zone. ```rust #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct ZoneBoundary { pub center: WorldPosition, pub radius: f64 } ``` Source line: `21`. ## spatial\_zone::SpatialZoneType [#spatial_zonespatialzonetype] Type of spatial zone determining default behavior. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum SpatialZoneType { Organization, Social, Commercial, Arena, Private, } ``` Source line: `28`. ## spatial\_zone::ZonePermissions [#spatial_zonezonepermissions] Permissions governing zone interactions. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ZonePermissions { pub enter: AccessLevel, pub interact: AccessLevel, pub build: AccessLevel } ``` Source line: `38`. ## spatial\_zone::SpatialZone [#spatial_zonespatialzone] A spatial zone owned by an organization in the Nova world. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SpatialZone { pub id: SpatialZoneId, pub org_did: String, pub boundary: ZoneBoundary, pub permissions: ZonePermissions, pub zone_type: SpatialZoneType, pub created_at: u64 } ``` Source line: `46`. ## spatial\_zone::SpatialZoneRegistry [#spatial_zonespatialzoneregistry] On-chain registry of spatial zones. ```rust #[derive(Debug, Clone, Default)] pub struct SpatialZoneRegistry { } ``` Source line: `57`. ## spatial\_zone::SpatialZoneRegistry::new [#spatial_zonespatialzoneregistrynew] Create an empty zone registry. ```rust pub fn new() -> Self; ``` Source line: `63`. ## spatial\_zone::SpatialZoneRegistry::create\_zone [#spatial_zonespatialzoneregistrycreate_zone] Create a new spatial zone. ```rust pub fn create_zone( &mut self, org_did: &str, boundary: ZoneBoundary, zone_type: SpatialZoneType, timestamp: u64, ) -> Result; ``` Source line: `68`. ## spatial\_zone::SpatialZoneRegistry::is\_in\_zone [#spatial_zonespatialzoneregistryis_in_zone] Check if a position falls within a zone. ```rust pub fn is_in_zone(position: &WorldPosition, zone: &SpatialZone) -> bool; ``` Source line: `115`. ## spatial\_zone::SpatialZoneRegistry::get\_zones\_at [#spatial_zonespatialzoneregistryget_zones_at] Get all zones that contain the given position. ```rust pub fn get_zones_at(&self, position: &WorldPosition) -> Vec<&SpatialZone>; ``` Source line: `124`. ## spatial\_zone::SpatialZoneRegistry::update\_zone\_permissions [#spatial_zonespatialzoneregistryupdate_zone_permissions] Update the permissions on a zone. Only the owner may modify. ```rust pub fn update_zone_permissions( &mut self, zone_id: &SpatialZoneId, caller_did: &str, perms: ZonePermissions, ) -> Result<(), NovaError>; ``` Source line: `132`. ## spatial\_zone::SpatialZoneRegistry::delete\_zone [#spatial_zonespatialzoneregistrydelete_zone] Delete a zone, returning the removed zone. ```rust pub fn delete_zone( &mut self, zone_id: &SpatialZoneId, caller_did: &str, ) -> Result; ``` Source line: `155`. ## spatial\_zone::SpatialZoneRegistry::get\_zone [#spatial_zonespatialzoneregistryget_zone] Get a zone by ID. ```rust pub fn get_zone(&self, zone_id: &SpatialZoneId) -> Option<&SpatialZone>; ``` Source line: `178`. ## spatial\_zone::SpatialZoneRegistry::zone\_count [#spatial_zonespatialzoneregistryzone_count] Total number of zones. ```rust pub fn zone_count(&self) -> usize; ``` Source line: `183`. # sigil-nova · streaming URL: https://docs.sigil.ml/reference/rust/sigil-nova/streaming Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/streaming.md Source declarations, signatures and documentation for streaming. Source: `sigil/node/sigil-nova/src/streaming.rs`. SHA-256: `d6a7f867f5121d410bd6e05c86c0f62bbdb3b3f87ff42333915ed71848a73aa1`. 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. ## streaming::SurfaceId [#streamingsurfaceid] In-world screen surface identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SurfaceId(pub String); ``` Source line: `15`. ## streaming::StreamStatus [#streamingstreamstatus] Status of a streaming session. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum StreamStatus { Connecting, Active, Paused, Disconnected, } ``` Source line: `19`. ## streaming::VideoCodec [#streamingvideocodec] Video codec for stream encoding. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum VideoCodec { H264, Vp9, Av1, } ``` Source line: `39`. ## streaming::Resolution [#streamingresolution] Stream resolution and frame rate. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Resolution { pub width: u32, pub height: u32, pub fps: u8 } ``` Source line: `47`. ## streaming::StreamSession [#streamingstreamsession] An active streaming session. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct StreamSession { pub id: String, pub agent_did: String, pub desktop_session_id: String, pub channel_id: String, pub target_surface: SurfaceId, pub status: StreamStatus, pub codec: VideoCodec, pub resolution: Resolution, pub started_at: u64 } ``` Source line: `55`. ## streaming::StreamRegistry [#streamingstreamregistry] On-chain registry of streaming sessions. ```rust #[derive(Debug, Clone, Default)] pub struct StreamRegistry { } ``` Source line: `69`. ## streaming::StreamRegistry::new [#streamingstreamregistrynew] Create an empty stream registry. ```rust pub fn new() -> Self; ``` Source line: `75`. ## streaming::StreamRegistry::start\_stream [#streamingstreamregistrystart_stream] Start a new streaming session. ```rust pub fn start_stream( &mut self, agent_did: &str, desktop_session_id: &str, surface: SurfaceId, codec: VideoCodec, resolution: Resolution, timestamp: u64, ) -> Result; ``` Source line: `80`. ## streaming::StreamRegistry::pause\_stream [#streamingstreamregistrypause_stream] Pause an active stream. ```rust pub fn pause_stream(&mut self, session_id: &str) -> Result<(), NovaError>; ``` Source line: `127`. ## streaming::StreamRegistry::resume\_stream [#streamingstreamregistryresume_stream] Resume a paused stream. ```rust pub fn resume_stream(&mut self, session_id: &str) -> Result<(), NovaError>; ``` Source line: `145`. ## streaming::StreamRegistry::stop\_stream [#streamingstreamregistrystop_stream] Stop a stream and remove it from the registry. ```rust pub fn stop_stream(&mut self, session_id: &str) -> Result; ``` Source line: `163`. ## streaming::StreamRegistry::get\_active\_streams [#streamingstreamregistryget_active_streams] Get all active (non-disconnected) streams. ```rust pub fn get_active_streams(&self) -> Vec<&StreamSession>; ``` Source line: `173`. ## streaming::StreamRegistry::get\_streams\_by\_agent [#streamingstreamregistryget_streams_by_agent] Get all streams belonging to a specific agent. ```rust pub fn get_streams_by_agent(&self, agent_did: &str) -> Vec<&StreamSession>; ``` Source line: `181`. ## streaming::StreamRegistry::get\_stream [#streamingstreamregistryget_stream] Get a stream session by ID. ```rust pub fn get_stream(&self, session_id: &str) -> Option<&StreamSession>; ``` Source line: `189`. ## streaming::StreamRegistry::session\_count [#streamingstreamregistrysession_count] Total number of sessions in the registry. ```rust pub fn session_count(&self) -> usize; ``` Source line: `194`. # sigil-nova · world URL: https://docs.sigil.ml/reference/rust/sigil-nova/world Markdown: https://docs.sigil.ml/reference/rust/sigil-nova/world.md Source declarations, signatures and documentation for world. Source: `sigil/node/sigil-nova/src/world.rs`. SHA-256: `ddfe4c053287d0058f47f79d3dafe6379709db61d79498bfd5d57645a909643d`. 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. ## world::WorldId [#worldworldid] Unique world identifier. ```rust #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct WorldId(pub String); ``` Source line: `14`. ## world::RegionCoord [#worldregioncoord] A 256x256-block region coordinate (top-level spatial partition). ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct RegionCoord { pub x: i32, pub z: i32 } ``` Source line: `18`. ## world::ChunkCoord [#worldchunkcoord] A 16x16x256-block chunk within a region. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct ChunkCoord { pub region: RegionCoord, pub local_x: u8, pub local_z: u8 } ``` Source line: `25`. ## world::WorldPosition [#worldworldposition] A precise 3D position in the world. ```rust #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct WorldPosition { pub x: f64, pub y: f64, pub z: f64 } ``` Source line: `33`. ## world::WorldConfig [#worldworldconfig] Configuration for a Nova world instance. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct WorldConfig { pub id: WorldId, pub name: String, /// Gravity multiplier (1.0 = Earth-like). pub gravity: f32, /// Time scale multiplier (1.0 = real-time). pub time_scale: f32, /// Maximum height in blocks. pub max_height: u32, /// Size of a region in blocks (default 256). pub region_size: u32, /// Size of a chunk in blocks (default 16). pub chunk_size: u32 } ``` Source line: `41`. ## world::WorldState [#worldworldstate] Runtime state of a Nova world. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct WorldState { pub config: WorldConfig, pub active_regions: HashSet, pub total_parcels: u64, pub total_buildings: u64, pub total_avatars: u64 } ``` Source line: `58`. ## world::WorldConfig::new [#worldworldconfignew] Create a default world config with the given id and name. ```rust pub fn new(id: WorldId, name: String) -> Self; ``` Source line: `68`. ## world::WorldState::new [#worldworldstatenew] Create a new world state from a config. ```rust pub fn new(config: WorldConfig) -> Self; ``` Source line: `83`. ## world::position\_to\_chunk [#worldposition_to_chunk] Convert a precise world position to the chunk it falls within. Uses the world's default chunk size (16) and region size (256). ```rust pub fn position_to_chunk(pos: &WorldPosition) -> ChunkCoord; ``` Source line: `97`. ## world::chunk\_to\_region [#worldchunk_to_region] Extract the region coordinate from a chunk. ```rust pub fn chunk_to_region(chunk: &ChunkCoord) -> RegionCoord; ``` Source line: `133`. ## world::distance [#worlddistance] Euclidean distance between two world positions. ```rust pub fn distance(a: &WorldPosition, b: &WorldPosition) -> f64; ``` Source line: `138`. ## world::is\_valid\_position [#worldis_valid_position] Check whether a position is valid within the given world config. A position is valid if `y` is within `[0, max_height]`. ```rust pub fn is_valid_position(pos: &WorldPosition, config: &WorldConfig) -> Result; ``` Source line: `148`. # sigil-rpc · crate URL: https://docs.sigil.ml/reference/rust/sigil-rpc/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-rpc/src/lib.rs`. SHA-256: `ba16876fd64edeb4fedc7b6242421f22e3bf4475319f21d432ff4388cb0ba454`. 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. ## error [#error] ```rust pub mod error; ``` Source line: `9`. ## methods [#methods] ```rust pub mod methods; ``` Source line: `10`. ## nft [#nft] ```rust pub mod nft; ``` Source line: `11`. ## responses [#responses] ```rust pub mod responses; ``` Source line: `12`. ## types [#types] ```rust pub mod types; ``` Source line: `13`. ## pub use error::RpcApiError; [#pub-use-errorrpcapierror] ```rust pub use error::RpcApiError; ``` Source line: `15`. ## pub use methods::RpcMethod; [#pub-use-methodsrpcmethod] ```rust pub use methods::RpcMethod; ``` Source line: `16`. ## pub use nft::\{ [#pub-use-nft] NftEventFilter, RpcDidIdentityIndex, RpcIdentityTokenRef, RpcNftCollection, RpcNftEvent, RpcNftToken, RpcOwnerIndexEntry, RpcTokenId, }; ```rust pub use nft::{ NftEventFilter, RpcDidIdentityIndex, RpcIdentityTokenRef, RpcNftCollection, RpcNftEvent, RpcNftToken, RpcOwnerIndexEntry, RpcTokenId, }; ``` Source line: `17`. ## pub use responses::\{BlockResponse, NodeInfoResponse, SyncStatusResponse, TransactionResponse}; [#pub-use-responsesblockresponse-nodeinforesponse-syncstatusresponse-transactionresponse] ```rust pub use responses::{BlockResponse, NodeInfoResponse, SyncStatusResponse, TransactionResponse}; ``` Source line: `21`. ## pub use types::\{RpcError, RpcRequest, RpcResponse}; [#pub-use-typesrpcerror-rpcrequest-rpcresponse] ```rust pub use types::{RpcError, RpcRequest, RpcResponse}; ``` Source line: `22`. # sigil-rpc · error URL: https://docs.sigil.ml/reference/rust/sigil-rpc/error Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-rpc/src/error.rs`. SHA-256: `1d8165adaaba96ea8c969de7eeb4e0012211d9028dbbb68c371153dcf03b8506`. 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. ## error::RpcApiError [#errorrpcapierror] High-level RPC API errors. Each variant maps to a JSON-RPC error code and can be converted into an \[`RpcError`] for inclusion in a response envelope. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, thiserror::Error)] pub enum RpcApiError { /// The request could not be parsed as valid JSON. #[error("parse error: {0}")] ParseError(String), /// The request JSON is not a valid JSON-RPC 2.0 request object. #[error("invalid request: {0}")] InvalidRequest(String), /// The requested method does not exist. #[error("method not found: {0}")] MethodNotFound(String), /// The parameters for the method are invalid. #[error("invalid params: {0}")] InvalidParams(String), /// An internal server error occurred. #[error("internal error: {0}")] InternalError(String), /// The requested resource was not found (block, tx, validator, etc.). #[error("not found: {0}")] NotFound(String), /// The request requires authentication that was not provided or is invalid. #[error("unauthorized: {0}")] Unauthorized(String), /// The caller has exceeded the rate limit. #[error("rate limited")] RateLimited, } ``` Source line: `24`. ## error::RpcApiError::code [#errorrpcapierrorcode] Returns the standard JSON-RPC error code for this error. ```rust pub fn code(&self) -> i32; ``` Source line: `60`. ## error::RpcApiError::to\_rpc\_error [#errorrpcapierrorto_rpc_error] Convert into a JSON-RPC \[`RpcError`] object. ```rust pub fn to_rpc_error(&self) -> RpcError; ``` Source line: `74`. # sigil-rpc URL: https://docs.sigil.ml/reference/rust/sigil-rpc Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc.md RPC API types and request/response definitions for Sigil blockchain RPC API types and request/response definitions for Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-rpc` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-rpc/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_rpc` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-rpc = { path = "../sigil-rpc" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `tower` | `sigil-core/tower` | | `czac` | `sigil-core/czac` | | `nova` | `sigil-core/nova` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-rpc/crate) — 10 declarations * [error](/reference/rust/sigil-rpc/error) — 3 declarations * [methods](/reference/rust/sigil-rpc/methods) — 5 declarations * [nft](/reference/rust/sigil-rpc/nft) — 8 declarations * [responses](/reference/rust/sigil-rpc/responses) — 18 declarations * [types](/reference/rust/sigil-rpc/types) — 11 declarations # sigil-rpc · methods URL: https://docs.sigil.ml/reference/rust/sigil-rpc/methods Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/methods.md Source declarations, signatures and documentation for methods. Source: `sigil/node/sigil-rpc/src/methods.rs`. SHA-256: `8a7bb993493b5352ba149750fd4fda48478124e431762a94d1581ba35dfdd099`. 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. ## methods::RpcMethod [#methodsrpcmethod] Available RPC methods exposed by a Sigil node. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum RpcMethod { // -- Block queries -- /// Fetch a block by height or hash. GetBlock, /// Fetch the latest finalized block. GetLatestBlock, /// Fetch a contiguous range of blocks. GetBlockRange, // -- Transaction queries -- /// Fetch a transaction by hash. GetTransaction, /// List recent transactions. GetTransactions, /// List recent transactions for a DID. GetAccountTransactions, /// Fetch the receipt for a transaction. GetTransactionReceipt, /// Submit a signed transaction. SendTransaction, /// Submit a signed setup-only sponsored transaction. SendSponsoredSetupTransaction, /// Estimate the deterministic fee for a transaction envelope. EstimateFee, /// Estimate the deterministic fee for a setup-only sponsored transaction. EstimateSponsoredSetupFee, /// Fetch the active setup-only sponsorship policy. GetSponsoredSetupPolicy, /// Fetch a sponsored setup receipt by transaction hash. GetSponsoredSetupReceipt, /// Submit a signed `RegisterContractCode` transaction through the typed /// public deployment endpoint. RegisterContractCode, /// Fetch a deployed contract record by DID. GetContract, /// Fetch a single contract state value by key. GetContractState, /// Fetch contract events with optional filters. GetContractEvents, /// List deployed contracts in an organization zone. ListZoneContracts, /// Fetch an organization zone record. GetZone, /// Perform a read-only contract call preflight. CallContractDryRun, /// Register a Vigils subscription. RegisterVigilSubscription, /// Update a Vigils subscription. UpdateVigilSubscription, /// Cancel a Vigils subscription. CancelVigilSubscription, /// Deposit gas-tank funds for Vigils callbacks. DepositVigilGas, /// Withdraw unused gas-tank funds. WithdrawVigilGas, /// Submit a verified event delivery for a subscription. SubmitEventDelivery, /// Register a staked Vigils ingestor. RegisterIngestor, /// Update a staked Vigils ingestor. UpdateIngestorStake, /// Deregister a Vigils ingestor. DeregisterIngestor, /// Slash a Vigils ingestor with deterministic evidence. SlashIngestor, // -- State queries -- /// Fetch account balance and nonce for a DID. GetBalance, /// Fetch an explorer-ready account summary for a DID. GetAccount, /// List top accounts by balance/stake. GetTopAccounts, /// Read a value from chain state. GetState, /// Get the current state root hash. GetStateRoot, /// Get the next nonce for an account (replay protection). GetAccountNonce, /// Fetch a Vigils subscription by ID. GetVigilSubscription, /// List Vigils subscriptions with pagination. ListVigilSubscriptions, /// Fetch a Vigils delivery-history page. GetVigilDeliveryHistory, /// List registered Vigils ingestors. ListIngestors, /// Fetch a registered Vigils ingestor. GetIngestor, // -- Identity queries -- /// Fetch an OAS identity document by DID. GetIdentity, /// List registered OAS identities. ListIdentities, // -- Staking queries -- /// Fetch a single validator's info. GetValidator, /// Fetch the current active validator set. GetValidatorSet, /// Fetch EOS-style boot, stake-collection, active, and stabilized status. GetNetworkActivationStatus, /// Fetch delegations for a delegator DID. GetDelegations, // -- Governance queries -- /// Fetch a governance proposal by ID. GetProposal, /// List all proposals (optionally filtered by status). ListProposals, // -- Labor marketplace queries -- /// Fetch a labor job posting. GetLaborJob, /// List labor job postings. ListLaborJobs, /// Fetch a labor bid. GetLaborBid, /// List labor bids, optionally for one job. ListLaborBids, /// Fetch a labor contract. GetLaborContract, /// List milestones for a labor contract. GetLaborMilestones, /// Fetch exact escrow accounting for a labor contract. GetLaborEscrow, /// Fetch a labor dispute. GetLaborDispute, /// Fetch an open bounty offer. GetLaborOffer, /// List open bounty offers. ListLaborOffers, /// Fetch a bounty claim. GetLaborClaim, /// List bounty claims. ListLaborClaims, /// Fetch labor offer/claim audit events. GetLaborOfferEvents, /// Fetch jobs, bids, contracts, and disputes tied to an account DID. GetAccountLaborHistory, // -- Crucible training queries -- /// Fetch a Crucible training run. GetTrainingRun, /// List Crucible training runs. ListTrainingRuns, /// Fetch a committed rollout batch for a training run. GetTrainingRolloutBatch, /// Fetch or list published training weight anchors. GetTrainingWeights, /// List reward attestations for a training run. GetTrainingRewards, /// List slashing records for a training run. GetTrainingSlashes, /// List Crucible audit events. GetTrainingEvents, // -- Compute queries (feature-gated) -- /// Fetch a compute provider's registration. #[cfg(feature = "compute")] GetProvider, /// List all registered compute providers. #[cfg(feature = "compute")] ListProviders, /// Fetch a compute provider's reputation score. #[cfg(feature = "compute")] GetProviderReputation, /// Fetch the escrow balance for an organization. #[cfg(feature = "compute")] GetEscrowBalance, /// Fetch a compute job by ID. #[cfg(feature = "compute")] GetComputeJob, /// List compute jobs with optional filters. #[cfg(feature = "compute")] ListComputeJobs, /// Fetch a settled compute receipt. #[cfg(feature = "compute")] GetComputeReceipt, /// Fetch proof metadata for a compute receipt. #[cfg(feature = "compute")] GetComputeProof, /// Verify a Lumen inference attestation transcript. #[cfg(feature = "compute")] VerifyLumenAttestation, /// Fetch a compute challenge by ID. #[cfg(feature = "compute")] GetComputeChallenge, /// List compute challenges for a receipt. #[cfg(feature = "compute")] ListComputeChallenges, /// Fetch compute audit events. #[cfg(feature = "compute")] GetComputeAuditTrail, /// Fetch a MACA work claim by work ID. #[cfg(feature = "compute")] GetMacaWorkClaim, /// List MACA validation records by work ID. #[cfg(feature = "compute")] ListMacaValidationRecords, /// Deterministically select a compute provider. #[cfg(feature = "compute")] SelectComputeProvider, /// Fetch a registered MACA validator agent. #[cfg(feature = "compute")] GetValidatorAgent, /// Fetch a MACA epoch by ID. #[cfg(feature = "compute")] GetMacaEpoch, /// List MACA epochs. #[cfg(feature = "compute")] ListMacaEpochs, /// Fetch a MACA quorum proof. #[cfg(feature = "compute")] GetMacaQuorumProof, /// List MACA quorum proofs for an epoch. #[cfg(feature = "compute")] ListMacaQuorumProofs, // -- Network info -- /// Get local node information. GetNodeInfo, /// Lightweight probe for the local node's current block height. GetHeight, /// Fetch local mempool size/capacity. GetMempoolStatus, /// List connected peers. GetPeers, /// Get the current sync status. GetSyncStatus, /// Get the node's production storage backend and migration status. GetStorageStatus, /// Normalize and validate an off-chain artifact commitment. GetArtifactCommitment, /// Verify bytes against a Weave/Sigil artifact commitment. VerifyArtifact, /// Publish a hex-encoded payload into the local Weft store. WeftPublish, /// Publish a local file into the local Weft store. WeftPublishFile, /// Fetch a verified Weft payload as hex bytes. WeftFetch, /// Fetch a verified Weft payload and write it to a local file. WeftFetchFile, /// Inspect local Weft serving status. WeftStatus, /// List registered storage pinning providers. ListStorageProviders, /// Fetch one storage pinning provider. GetStorageProvider, /// Fetch one storage pin request. GetStoragePinRequest, /// List storage pin requests for an owner DID. ListStoragePinRequestsByOwner, /// Fetch one storage pin contract. GetStoragePinContract, /// List storage pin contracts for a provider DID. ListStoragePinContractsByProvider, /// Fetch one storage pin receipt. GetStoragePinReceipt, /// Fetch one storage challenge. GetStorageChallenge, /// Fetch one evidence anchor record by deterministic anchor ID. GetEvidenceAnchor, /// List evidence anchor records for a content digest. ListEvidenceAnchorsByDigest, // -- MARS proxy -- /// Fetch a MARS registry entry by DID. MarsGetEntry, /// Discover MARS entries matching a query. MarsDiscover, // -- Tower coordination chain queries (feature-gated) -- /// Fetch a Tower coordination chain block by slot number or hash. #[cfg(feature = "tower")] GetTowerBlock, /// Fetch Tower slot information (committee, block producer, status). #[cfg(feature = "tower")] GetTowerSlot, /// Fetch a validator's full Tower registry record. #[cfg(feature = "tower")] GetTowerValidator, /// Fetch the committee assignment for a given slot. #[cfg(feature = "tower")] GetCommittee, /// Get the current finality status (latest justified/finalized epochs). #[cfg(feature = "tower")] GetFinalityStatus, // -- GAL (Global Anchor Layer) queries (feature-gated) -- /// Fetch a GAL entry (HMR anchor, shard assignment, etc.) by DID. /// Deprecated: prefer the typed `GetGalHmr` / `GetGalMhr` / `GetGalEnr` /// methods. #[cfg(feature = "tower")] GetGalEntry, /// Fetch the shard assignment for a given DID or namespace. Deprecated: /// prefer the typed `GetGalShard` method. #[cfg(feature = "tower")] GetShardAssignment, /// Fetch the current shard topology map. Deprecated: prefer the typed /// `GetGalShardTopology` method. #[cfg(feature = "tower")] GetTopologyMap, /// Get a Merkle inclusion proof for a GAL entry. #[cfg(feature = "tower")] GetGalProof, // -- GAL typed queries (feature-gated) -- /// Fetch the typed `HmrAnchor` for a DID. #[cfg(feature = "tower")] GetGalHmr, /// Fetch the typed `MhrAnchor` for a DID. #[cfg(feature = "tower")] GetGalMhr, /// Fetch the typed `EnrAnchor` for a DID. #[cfg(feature = "tower")] GetGalEnr, /// Fetch the typed `OrgLineageRoot` for an org DID. #[cfg(feature = "tower")] GetGalOrgRoot, /// Fetch the typed `ShardAssignment` for a subject DID. #[cfg(feature = "tower")] GetGalShard, /// Fetch the revocation status for a DID. **Resolvers MUST call this /// first on every resolution** — the revocation-first invariant. #[cfg(feature = "tower")] CheckGalRevocation, /// Fetch the full typed shard topology snapshot. #[cfg(feature = "tower")] GetGalShardTopology, // -- NFT queries -- /// Fetch an NFT collection by its collection ID. GetNftCollection, /// Fetch a single NFT token within a collection. GetNftToken, /// List all NFTs (across collections) owned by a DID, with pagination. GetOwnerNfts, /// Fetch the DID-identity index for a subject DID. GetDidIdentityNft, /// List NFT lifecycle events with optional filters. GetNftEvents, // -- DEX queries -- /// Fetch a native DEX pool by deterministic pool id. GetDexPool, /// List native DEX pools. ListDexPools, /// Quote an exact-input swap. QuoteDexSwapExactIn, /// Quote an exact-output swap. QuoteDexSwapExactOut, /// Fetch one LP position. GetDexPosition, /// List LP positions by owner and/or pool. ListDexPositions, /// List recent native DEX events. GetDexEvents, /// List distinct token pairs that currently have pools. ListDexPairs, /// Fetch a launch-live custom token class. GetTokenClass, /// Fetch a launch-live custom token balance for one DID. GetTokenBalance, // -- Username queries -- /// Resolve a canonical `@username` to its on-chain record. ResolveUsername, /// Look up a DID's primary `@username` (reverse-lookup). LookupUsername, /// List all usernames owned by a DID. ListUsernamesForOwner, /// Search usernames by ASCII prefix, with limit. SearchUsernames, /// Fetch a premium-name auction by canonical name. GetUsernameAuction, /// List all open premium-name auctions. ListOpenUsernameAuctions, // -- Sigil Mail + Sigil Name System queries -- /// Resolve a `.sigil` route or mailbox ID into mail delivery metadata. ResolveMail, /// Fetch a mailbox capability record. GetMailbox, /// List mailboxes owned by a DID. ListMailboxesByOwner, /// Fetch the current or versioned mailbox receive policy. GetMailPolicy, /// List public mailbox keys, optionally filtered by purpose. GetMailKeys, /// Fetch a delivery commitment by ID. GetMailDelivery, /// List delivery commitments indexed by recipient mailbox. ListMailDeliveriesByRecipient, /// List delivery commitments indexed by sender route. ListMailDeliveriesBySender, /// Fetch a mailbox permission grant. GetMailDelegation, /// List mailbox permission grants. ListMailDelegations, /// Fetch an abuse report. GetMailAbuseReport, /// Resolve a `.sigil` name and all resolver records. ResolveName, /// Fetch resolver records for a `.sigil` name. GetNameRecords, /// Resolve website/content records for a `.sigil` name. ResolveWebsite, // -- Nova metaverse queries (feature-gated) -- /// Fetch a Nova land parcel by ID or coordinates. #[cfg(feature = "nova")] GetParcel, /// Fetch a deployed building by ID. #[cfg(feature = "nova")] GetBuilding, /// Fetch an avatar's current state (position, animation, presence). #[cfg(feature = "nova")] GetAvatar, /// Get the world configuration for a given world ID. #[cfg(feature = "nova")] GetWorldConfig, /// List all parcels within a Nova region. #[cfg(feature = "nova")] ListParcelsInRegion, /// Get the current status of a Nova land auction. #[cfg(feature = "nova")] GetAuctionStatus, } ``` Source line: `11`. ## methods::RpcMethod::as\_str [#methodsrpcmethodas_str] Returns the canonical JSON-RPC method string. ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `445`. ## methods::RpcMethod::from\_method\_str [#methodsrpcmethodfrom_method_str] Parse a method string into an `RpcMethod`. Returns `None` for unknown method names. ```rust pub fn from_method_str(s: &str) -> Option; ``` Source line: `675`. ## methods::RpcMethod::requires\_auth [#methodsrpcmethodrequires_auth] Returns `true` for methods that mutate state and therefore require an Arsenal ACT (Authorization Capability Token). ```rust pub fn requires_auth(&self) -> bool; ``` Source line: `907`. ## methods::RpcMethod::is\_query [#methodsrpcmethodis_query] Returns `true` for read-only query methods. ```rust pub fn is_query(&self) -> bool; ``` Source line: `930`. # sigil-rpc · nft URL: https://docs.sigil.ml/reference/rust/sigil-rpc/nft Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/nft.md Source declarations, signatures and documentation for nft. Source: `sigil/node/sigil-rpc/src/nft.rs`. SHA-256: `585a677974ec6ed1554791571a2e5efef4afc8517e063b79f0fa2719c6c90f70`. 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. ## nft::RpcTokenId [#nftrpctokenid] A `u128` token identifier serialized as a decimal string on the JSON wire. JavaScript cannot represent u128 as a Number without precision loss, so all token IDs in RPC responses are sent as strings (e.g. `"340282366920938"`). ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct RpcTokenId(pub u128); ``` Source line: `29`. ## nft::RpcNftCollection [#nftrpcnftcollection] Wire representation of an NFT collection for `sigil_getNftCollection`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcNftCollection { pub collection_id: String, pub name: String, pub symbol: String, pub kind: NftKind, pub issuer_did: String, pub controller_did: String, pub policy: CollectionPolicy, #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, pub created_height: u64, /// Cumulative mint count serialized as a string (u128 safety). pub total_minted: String, /// Cumulative burn count serialized as a string (u128 safety). pub total_burned: String } ``` Source line: `69`. ## nft::RpcNftToken [#nftrpcnfttoken] Wire representation of a single NFT token for `sigil_getNftToken`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcNftToken { pub collection_id: String, /// Token ID as a decimal string (u128-safe). pub token_id: RpcTokenId, pub owner_did: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, /// BLAKE3 hash as hex string, if present. #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option, pub locked: bool, pub burn_auth: BurnAuth, #[serde(default, skip_serializing_if = "Option::is_none")] pub identity: Option, pub minted_height: u64, pub last_metadata_update_height: u64 } ``` Source line: `110`. ## nft::RpcOwnerIndexEntry [#nftrpcownerindexentry] Wire representation of one (collection, token list) entry for `sigil_getOwnerNfts`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcOwnerIndexEntry { pub collection_id: String, pub owner_did: String, /// All token IDs held by this owner in this collection — decimal strings. pub token_ids: Vec } ``` Source line: `152`. ## nft::RpcDidIdentityIndex [#nftrpcdididentityindex] Wire representation of the DID-identity index for `sigil_getDidIdentityNft`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcDidIdentityIndex { pub subject_did: String, /// All `(collection_id, token_id)` pairs bound to this DID. pub identity_tokens: Vec } ``` Source line: `175`. ## nft::RpcIdentityTokenRef [#nftrpcidentitytokenref] A single `(collection_id, token_id)` pair in a DID-identity index entry. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcIdentityTokenRef { pub collection_id: String, /// Token ID as a decimal string. pub token_id: RpcTokenId } ``` Source line: `183`. ## nft::RpcNftEvent [#nftrpcnftevent] Wire representation of a single NFT lifecycle event for `sigil_getNftEvents`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcNftEvent { pub kind: NftEventKind, pub collection_id: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub token_id: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub from_did: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub to_did: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_uri: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub metadata_hash: Option, pub block_height: u64, /// Transaction hash as hex string. pub tx_hash: String } ``` Source line: `211`. ## nft::NftEventFilter [#nftnfteventfilter] Query parameters for `sigil_getNftEvents`. All fields are optional; omitting a field means "no filter on that dimension". `limit` defaults to 50 when absent; `offset` defaults to 0. ```rust #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] pub struct NftEventFilter { /// Filter by collection ID. Field name `collection_id` matches the Explorer /// client and the rest of the NFT RPC surface. #[serde(default, skip_serializing_if = "Option::is_none")] pub collection_id: Option, /// Filter by owner / participant DID. #[serde(default, skip_serializing_if = "Option::is_none")] pub owner_did: Option, /// Filter by event kind. #[serde(default, skip_serializing_if = "Option::is_none")] pub kind: Option, /// Maximum number of events to return (default: 50). #[serde(default, skip_serializing_if = "Option::is_none")] pub limit: Option, /// Number of events to skip (default: 0). #[serde(default, skip_serializing_if = "Option::is_none")] pub offset: Option } ``` Source line: `254`. # sigil-rpc · responses URL: https://docs.sigil.ml/reference/rust/sigil-rpc/responses Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/responses.md Source declarations, signatures and documentation for responses. Source: `sigil/node/sigil-rpc/src/responses.rs`. SHA-256: `bb4b88ed78249589845f31db4538e9ecae9f9754a2dcbf2bb38ce86ced005ab0`. 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. ## responses::BlockResponse [#responsesblockresponse] Response for `sigil_getBlock`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockResponse { /// The full block data. pub block: Block, /// Hex-encoded block hash. pub hash: String } ``` Source line: `12`. ## responses::TransactionResponse [#responsestransactionresponse] Response for `sigil_getTransaction`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TransactionResponse { /// The signed transaction. pub tx: SignedTransaction, /// Block height at which the transaction was included, if finalized. pub block_height: Option, /// Whether this transaction has been finalized. pub confirmed: bool } ``` Source line: `21`. ## responses::NodeInfoResponse [#responsesnodeinforesponse] Response for `sigil_getNodeInfo`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NodeInfoResponse { /// The chain identifier. pub chain_id: String, /// Protocol version. pub protocol_version: String, /// Current block height. pub current_height: u64, /// Current epoch number. pub current_epoch: u64, /// Node operating mode (e.g. `"validator"`, `"rpc"`, `"archive"`). pub node_mode: String, /// Number of connected peers. pub peer_count: usize } ``` Source line: `32`. ## responses::SyncStatusResponse [#responsessyncstatusresponse] Response for `sigil_getSyncStatus`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SyncStatusResponse { /// Whether the node is currently syncing. pub syncing: bool, /// The node's current block height. pub current_height: u64, /// The target height (highest known from peers). pub target_height: u64, /// Number of peers the node has synced headers from. pub peers_synced: usize } ``` Source line: `49`. ## responses::StateResponse [#responsesstateresponse] Response for `sigil_getState`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StateResponse { /// The state partition queried. pub partition: String, /// The key queried. pub key: String, /// The value, if found (hex-encoded bytes). pub value: Option, /// Block height at which the state was read. pub at_height: u64 } ``` Source line: `62`. ## responses::ValidatorResponse [#responsesvalidatorresponse] Response for `sigil_getValidator`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ValidatorResponse { /// Validator DID. pub did: String, /// Current stake in micro-MINT. pub stake: u64, /// Validator mode. pub mode: String, /// Whether the validator is in the active set. pub active: bool } ``` Source line: `75`. ## responses::ValidatorSetResponse [#responsesvalidatorsetresponse] Response for `sigil_getValidatorSet`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ValidatorSetResponse { /// The epoch this validator set applies to. pub epoch: u64, /// Total count of active validators. pub total: usize, /// The validators. pub validators: Vec } ``` Source line: `88`. ## responses::ProposalResponse [#responsesproposalresponse] Response for `sigil_getProposal`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProposalResponse { /// Proposal ID. pub id: String, /// Proposal title. pub title: String, /// Proposal description. pub description: String, /// Proposal type. pub proposal_type: String, /// Current status (e.g. `"voting"`, `"passed"`, `"rejected"`, `"executed"`). pub status: String, /// Payload data. pub payload: serde_json::Value } ``` Source line: `99`. ## responses::SendTransactionResponse [#responsessendtransactionresponse] Response for `sigil_sendTransaction`. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SendTransactionResponse { /// Hex-encoded transaction hash. pub tx_hash: String, /// Whether the transaction was accepted into the mempool. pub accepted: bool } ``` Source line: `116`. ## responses::TransactionReceiptResponse [#responsestransactionreceiptresponse] Response for `sigil_getTransactionReceipt`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TransactionReceiptResponse { /// The transaction receipt. pub receipt: sigil_core::Receipt } ``` Source line: `125`. ## responses::MarsEntryResponse [#responsesmarsentryresponse] Response for `mars_getEntry`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MarsEntryResponse { /// The entry DID. pub did: String, /// The entry data as JSON. pub data: serde_json::Value, /// Block height at which the entry was anchored. pub anchored_at: u64 } ``` Source line: `132`. ## responses::GalHmrResponse [#responsesgalhmrresponse] Response for `gal_getHmr`. `None` when no anchor exists for the DID. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalHmrResponse { pub anchor: Option } ``` Source line: `148`. ## responses::GalMhrResponse [#responsesgalmhrresponse] Response for `gal_getMhr`. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalMhrResponse { pub anchor: Option } ``` Source line: `155`. ## responses::GalEnrResponse [#responsesgalenrresponse] Response for `gal_getEnr`. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalEnrResponse { pub anchor: Option } ``` Source line: `162`. ## responses::GalOrgRootResponse [#responsesgalorgrootresponse] Response for `gal_getOrgRoot`. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalOrgRootResponse { pub root: Option } ``` Source line: `169`. ## responses::GalShardResponse [#responsesgalshardresponse] Response for `gal_getShard` (typed shard summary). The `topology` field carries any relevant topology entries describing the shard's lineage (split/merge/migrate history) — empty when the shard is freshly added. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalShardResponse { pub assignment: Option, pub topology: Vec } ``` Source line: `178`. ## responses::GalRevocationResponse [#responsesgalrevocationresponse] Response for `gal_checkRevocation`. Wraps the canonical `RevocationStatus` shape — resolvers MUST call this first. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalRevocationResponse { #[serde(flatten)] pub status: sigil_core::RevocationStatus } ``` Source line: `187`. ## responses::GalShardTopologyResponse [#responsesgalshardtopologyresponse] Response for `gal_getShardTopology`. ```rust #[cfg(feature = "tower")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalShardTopologyResponse { pub entries: Vec } ``` Source line: `195`. # sigil-rpc · types URL: https://docs.sigil.ml/reference/rust/sigil-rpc/types Markdown: https://docs.sigil.ml/reference/rust/sigil-rpc/types.md Source declarations, signatures and documentation for types. Source: `sigil/node/sigil-rpc/src/types.rs`. SHA-256: `b8c5f361d783d97df11a2fbf839a128280b94a537c6554f1e484577f813d5a33`. 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. ## types::JSONRPC\_VERSION [#typesjsonrpc_version] The JSON-RPC protocol version we support. ```rust pub const JSONRPC_VERSION: &str; ``` Source line: `6`. ## types::RpcRequest [#typesrpcrequest] A JSON-RPC 2.0 request envelope. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcRequest { /// Protocol version -- always `"2.0"`. pub jsonrpc: String, /// The RPC method name (e.g. `"sigil_getBlock"`). pub method: String, /// Method parameters as arbitrary JSON. pub params: serde_json::Value, /// Caller-provided request identifier (number or string). pub id: serde_json::Value } ``` Source line: `10`. ## types::RpcRequest::new [#typesrpcrequestnew] Create a new request with the standard `"2.0"` version. ```rust pub fn new(method: &str, params: serde_json::Value, id: serde_json::Value) -> Self; ``` Source line: `23`. ## types::RpcRequest::is\_valid\_version [#typesrpcrequestis_valid_version] Returns `true` if the `jsonrpc` field is the supported version. ```rust pub fn is_valid_version(&self) -> bool; ``` Source line: `33`. ## types::RpcResponse [#typesrpcresponse] A JSON-RPC 2.0 response envelope. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcResponse { /// Protocol version -- always `"2.0"`. pub jsonrpc: String, /// The result payload (present on success). #[serde(skip_serializing_if = "Option::is_none")] pub result: Option, /// The error payload (present on failure). #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, /// The request identifier echoed back. pub id: serde_json::Value } ``` Source line: `40`. ## types::RpcResponse::success [#typesrpcresponsesuccess] Build a success response. ```rust pub fn success(result: serde_json::Value, id: serde_json::Value) -> Self; ``` Source line: `55`. ## types::RpcResponse::error [#typesrpcresponseerror] Build an error response. ```rust pub fn error(error: RpcError, id: serde_json::Value) -> Self; ``` Source line: `65`. ## types::RpcResponse::is\_error [#typesrpcresponseis_error] Returns `true` when the response carries an error. ```rust pub fn is_error(&self) -> bool; ``` Source line: `75`. ## types::RpcError [#typesrpcerror] A JSON-RPC 2.0 error object. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RpcError { /// Numeric error code (see JSON-RPC 2.0 spec and [`crate::error::RpcApiError`]). pub code: i32, /// Short human-readable error message. pub message: String, /// Optional structured error data. #[serde(skip_serializing_if = "Option::is_none")] pub data: Option } ``` Source line: `82`. ## types::RpcError::new [#typesrpcerrornew] Create a new error without additional data. ```rust pub fn new(code: i32, message: impl Into) -> Self; ``` Source line: `94`. ## types::RpcError::with\_data [#typesrpcerrorwith_data] Attach additional structured data. ```rust pub fn with_data(mut self, data: serde_json::Value) -> Self; ``` Source line: `103`. # sigil-sdk · builder URL: https://docs.sigil.ml/reference/rust/sigil-sdk/builder Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/builder.md Source declarations, signatures and documentation for builder. Source: `sigil/node/sigil-sdk/src/builder.rs`. SHA-256: `379aa782af61eef3c41239de2ed9306df19c7f29975ba0aaf3ce6f6b71d8af73`. 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. ## builder::sign\_transaction [#buildersign_transaction] Sign an unsigned \[`Transaction`] with an Ed25519 signing key. Produces a \[`SignedTransaction`] containing a real 64-byte Ed25519 signature over `BLAKE3(TX_DOMAIN_TAG || serde_json::to_vec(&tx))` and the corresponding 32-byte compressed verifying key. This is the canonical way to prepare a transaction for submission to a Sigil node via `sigil_sendTransaction`. # Errors [#errors] Returns \[`SdkError::TransactionBuildError`] if the transaction cannot be serialized for signing. # Example [#example] ```rust use ed25519_dalek::SigningKey; use sigil_sdk::builder::{TransactionBuilder, sign_transaction}; let key = SigningKey::generate(&mut rand::rngs::OsRng); let tx = TransactionBuilder::new("sigil-mainnet-1", "did:oas:prod:hmr:alice") .nonce(1) .unstake(5_000); let signed = sign_transaction(tx, &key).expect("sign"); ``` ```rust pub fn sign_transaction( tx: Transaction, signing_key: &SigningKey, ) -> Result; ``` Source line: `46`. ## builder::TransactionBuilder [#buildertransactionbuilder] A fluent builder for constructing unsigned Sigil transactions. ```rust #[derive(Debug, Clone)] pub struct TransactionBuilder { } ``` Source line: `62`. ## builder::TransactionBuilder::new [#buildertransactionbuildernew] Create a new builder for the given chain and sender. ```rust pub fn new(chain_id: &str, sender_did: &str) -> Self; ``` Source line: `72`. ## builder::TransactionBuilder::nonce [#buildertransactionbuildernonce] Set the transaction nonce. ```rust pub fn nonce(mut self, n: u64) -> Self; ``` Source line: `83`. ## builder::TransactionBuilder::gas\_limit [#buildertransactionbuildergas_limit] Set the gas limit. ```rust pub fn gas_limit(mut self, g: u64) -> Self; ``` Source line: `89`. ## builder::TransactionBuilder::gas\_price [#buildertransactionbuildergas_price] Set the gas price in micro-MINT. ```rust pub fn gas_price(mut self, p: u64) -> Self; ``` Source line: `95`. ## builder::TransactionBuilder::register\_identity [#buildertransactionbuilderregister_identity] Build an identity registration transaction. ```rust pub fn register_identity( self, did: &str, document: serde_json::Value, conformance_level: &str, ) -> Transaction; ``` Source line: `103`. ## builder::TransactionBuilder::stake [#buildertransactionbuilderstake] Build a stake transaction. # Errors [#errors-1] Returns \[`SdkError::TransactionBuildError`] if the mode string is not `"producer"` or `"validator"`. ```rust pub fn stake(self, amount: u64, mode: &str) -> Result; ``` Source line: `124`. ## builder::TransactionBuilder::unstake [#buildertransactionbuilderunstake] Build an unstake transaction. ```rust pub fn unstake(self, amount: u64) -> Transaction; ``` Source line: `141`. ## builder::TransactionBuilder::delegate [#buildertransactionbuilderdelegate] Build a delegation transaction. ```rust pub fn delegate(self, validator_did: &str, amount: u64) -> Transaction; ``` Source line: `146`. ## builder::TransactionBuilder::undelegate [#buildertransactionbuilderundelegate] Build an undelegation transaction. ```rust pub fn undelegate(self, validator_did: &str, shares: u64) -> Transaction; ``` Source line: `154`. ## builder::TransactionBuilder::claim\_rewards [#buildertransactionbuilderclaim_rewards] Build a claim-rewards transaction. ```rust pub fn claim_rewards(self) -> Transaction; ``` Source line: `162`. ## builder::TransactionBuilder::propose [#buildertransactionbuilderpropose] Build a governance proposal transaction. ```rust pub fn propose( self, title: &str, description: &str, proposal_type: ProposalType, payload: serde_json::Value, deposit: u64, ) -> Transaction; ``` Source line: `172`. ## builder::TransactionBuilder::vote [#buildertransactionbuildervote] Build a governance vote transaction. # Errors [#errors-2] Returns \[`SdkError::TransactionBuildError`] if the choice string is not one of `"yes"`, `"no"`, `"abstain"`, or `"no_with_veto"`. ```rust pub fn vote(self, proposal_id: &str, choice: &str) -> Result; ``` Source line: `195`. ## builder::TransactionBuilder::register\_contract\_code [#buildertransactionbuilderregister_contract_code] Build a public contract-code registration transaction. ```rust pub fn register_contract_code( self, code: Vec, license_metadata: ContractLicenseMetadata, ) -> Transaction; ``` Source line: `218`. ## builder::TransactionBuilder::deploy\_contract [#buildertransactionbuilderdeploy_contract] Build a deployment transaction for code that was previously registered by `RegisterContractCode` or installed at genesis. ```rust pub fn deploy_contract( self, contract_did: &str, controller_did: &str, code_hash: &str, zone_id: Option, ) -> Transaction; ``` Source line: `235`. ## builder::TransactionBuilder::sponsored\_setup [#buildertransactionbuildersponsored_setup] Build a setup-only sponsored transaction envelope. The builder sender is the sponsor DID and pays the fee. The inner `setup_tx_type` must be one of the allowlisted setup actions enforced by the node executor. ```rust pub fn sponsored_setup( self, subject_did: &str, setup_scope: SponsoredSetupScope, idempotency_key: &str, setup_tx_type: TransactionType, subject_public_key: Vec, subject_signature: Vec, ) -> Transaction; ``` Source line: `269`. ## builder::TransactionBuilder::initial\_device\_anchor [#buildertransactionbuilderinitial_device_anchor] Build a setup-only initial device anchor transaction. ```rust pub fn initial_device_anchor(self, data: InitialDeviceAnchorData) -> Transaction; ``` Source line: `291`. # sigil-sdk · client URL: https://docs.sigil.ml/reference/rust/sigil-sdk/client Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/client.md Source declarations, signatures and documentation for client. Source: `sigil/node/sigil-sdk/src/client.rs`. SHA-256: `0236a8490bc14cb2caf01d04a28127291afa5f70eb4952a41cf853fcb972b252`. 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. ## client::SigilClientConfig [#clientsigilclientconfig] Configuration for connecting to a Sigil node. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SigilClientConfig { /// RPC endpoint URL (e.g. `"http://localhost:12618"`). pub rpc_url: String, /// The chain ID to target. pub chain_id: String, /// Request timeout in seconds. pub timeout_secs: u64, /// Optional bearer token for authenticated endpoints. #[serde(skip_serializing_if = "Option::is_none")] pub auth_token: Option } ``` Source line: `10`. ## client::SigilClientConfig::mainnet [#clientsigilclientconfigmainnet] Create a config targeting the Sigil mainnet. ```rust pub fn mainnet(rpc_url: &str) -> Self; ``` Source line: `24`. ## client::SigilClientConfig::testnet [#clientsigilclientconfigtestnet] Create a config targeting the Sigil testnet. ```rust pub fn testnet(rpc_url: &str) -> Self; ``` Source line: `34`. ## client::SigilClientConfig::devnet [#clientsigilclientconfigdevnet] Create a config targeting a local devnet. ```rust pub fn devnet(rpc_url: &str) -> Self; ``` Source line: `44`. ## client::SigilClientConfig::with\_timeout [#clientsigilclientconfigwith_timeout] Override the request timeout. ```rust pub fn with_timeout(mut self, secs: u64) -> Self; ``` Source line: `54`. ## client::SigilClientConfig::with\_auth\_token [#clientsigilclientconfigwith_auth_token] Set an authentication token. ```rust pub fn with_auth_token(mut self, token: impl Into) -> Self; ``` Source line: `60`. # sigil-sdk · crate URL: https://docs.sigil.ml/reference/rust/sigil-sdk/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-sdk/src/lib.rs`. SHA-256: `47f04f730028ba969bea67397680283fb966ef198d424cd49747e5e0f2b4b4ac`. 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. ## builder [#builder] ```rust pub mod builder; ``` Source line: `10`. ## client [#client] ```rust pub mod client; ``` Source line: `11`. ## error [#error] ```rust pub mod error; ``` Source line: `12`. ## mail [#mail] ```rust pub mod mail; ``` Source line: `13`. ## nft [#nft] ```rust pub mod nft; ``` Source line: `14`. ## resolver [#resolver] ```rust pub mod resolver; ``` Source line: `15`. ## sns [#sns] ```rust pub mod sns; ``` Source line: `16`. ## storage\_market [#storage_market] ```rust pub mod storage_market; ``` Source line: `17`. ## evidence [#evidence] ```rust #[cfg(feature = "evidence")] pub mod evidence; ``` Source line: `20`. ## evidence\_http [#evidence_http] ```rust #[cfg(feature = "evidence-http")] pub mod evidence_http; ``` Source line: `22`. ## gal\_adapter [#gal_adapter] ```rust #[cfg(feature = "gal")] pub mod gal_adapter; ``` Source line: `25`. ## sign\_in [#sign_in] ```rust #[cfg(feature = "gal")] pub mod sign_in; ``` Source line: `27`. ## gal\_http [#gal_http] ```rust #[cfg(feature = "gal-http")] pub mod gal_http; ``` Source line: `30`. ## pub use builder::\{sign\_transaction, TransactionBuilder}; [#pub-use-buildersign_transaction-transactionbuilder] ```rust pub use builder::{sign_transaction, TransactionBuilder}; ``` Source line: `32`. ## pub use client::SigilClientConfig; [#pub-use-clientsigilclientconfig] ```rust pub use client::SigilClientConfig; ``` Source line: `33`. ## pub use error::SdkError; [#pub-use-errorsdkerror] ```rust pub use error::SdkError; ``` Source line: `34`. ## pub use mail::\{ [#pub-use-mail] allow\_all\_policy, delivery\_commitment, derive\_mailbox\_id, preflight\_delivery\_commitment, public\_mail\_key\_record, }; ```rust pub use mail::{ allow_all_policy, delivery_commitment, derive_mailbox_id, preflight_delivery_commitment, public_mail_key_record, }; ``` Source line: `35`. ## pub use resolver::\{ResolvedDocument, SigilResolver}; [#pub-use-resolverresolveddocument-sigilresolver] ```rust pub use resolver::{ResolvedDocument, SigilResolver}; ``` Source line: `39`. ## pub use sns::\{ [#pub-use-sns] compute\_namehash, mailbox\_record, normalize\_name, weave\_mailbox\_record, website\_record, }; ```rust pub use sns::{ compute_namehash, mailbox_record, normalize_name, weave_mailbox_record, website_record, }; ``` Source line: `40`. ## pub use storage\_market::\{ [#pub-use-storage_market] derive\_storage\_challenge\_id, derive\_storage\_contract\_id, derive\_storage\_pin\_request\_id, preflight\_storage\_pin\_request, preflight\_storage\_receipt, }; ```rust pub use storage_market::{ derive_storage_challenge_id, derive_storage_contract_id, derive_storage_pin_request_id, preflight_storage_pin_request, preflight_storage_receipt, }; ``` Source line: `43`. ## pub use evidence::\{ [#pub-use-evidence] anchor\_digest\_tx, digest\_artifact, AnchorParams, AnchorProof, AnchorSubmission, ConfirmPolicy, EvidenceAnchorClient, EvidenceError, EvidenceTransport, }; ```rust #[cfg(feature = "evidence")] pub use evidence::{ anchor_digest_tx, digest_artifact, AnchorParams, AnchorProof, AnchorSubmission, ConfirmPolicy, EvidenceAnchorClient, EvidenceError, EvidenceTransport, }; ``` Source line: `49`. ## pub use evidence\_http::\{HttpEvidenceTransport, HttpEvidenceTransportConfig}; [#pub-use-evidence_httphttpevidencetransport-httpevidencetransportconfig] ```rust #[cfg(feature = "evidence-http")] pub use evidence_http::{HttpEvidenceTransport, HttpEvidenceTransportConfig}; ``` Source line: `54`. ## pub use gal\_adapter::\{FinalizedBlockFuture, FinalizedBlockSource, MarsToOasGalSource}; [#pub-use-gal_adapterfinalizedblockfuture-finalizedblocksource-marstooasgalsource] ```rust #[cfg(feature = "gal")] pub use gal_adapter::{FinalizedBlockFuture, FinalizedBlockSource, MarsToOasGalSource}; ``` Source line: `57`. ## pub use sign\_in::\{ [#pub-use-sign_in] build\_sign\_in\_transcript, canonical\_sign\_in\_message, verify\_sign\_in\_response, verify\_sign\_in\_response\_with\_store, InMemorySignInChallengeStore, SignInChallenge, SignInChallengeInput, SignInChallengeStore, SignInRootKind, SignInVerifyError, SignInVerifyOptions, SignedSignInResponse, VerifiedSignIn, }; ```rust #[cfg(feature = "gal")] pub use sign_in::{ build_sign_in_transcript, canonical_sign_in_message, verify_sign_in_response, verify_sign_in_response_with_store, InMemorySignInChallengeStore, SignInChallenge, SignInChallengeInput, SignInChallengeStore, SignInRootKind, SignInVerifyError, SignInVerifyOptions, SignedSignInResponse, VerifiedSignIn, }; ``` Source line: `59`. ## pub use gal\_http::\{HttpSigilAnchorClient, HttpSigilAnchorClientConfig}; [#pub-use-gal_httphttpsigilanchorclient-httpsigilanchorclientconfig] ```rust #[cfg(feature = "gal-http")] pub use gal_http::{HttpSigilAnchorClient, HttpSigilAnchorClientConfig}; ``` Source line: `67`. # sigil-sdk · error URL: https://docs.sigil.ml/reference/rust/sigil-sdk/error Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-sdk/src/error.rs`. SHA-256: `d5b20314c8ac4c5c1c1f46a7383474e5cec5f40c4da6f8b30ae14d37101e6f76`. 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. ## error::SdkError [#errorsdkerror] Errors that can occur when using the Sigil SDK. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, thiserror::Error)] pub enum SdkError { /// Failed to connect to the Sigil node. #[error("connection failed: {0}")] ConnectionFailed(String), /// The RPC node returned an error. #[error("rpc error: {0}")] RpcError(String), /// Error while building a transaction. #[error("transaction build error: {0}")] TransactionBuildError(String), /// DID resolution failed. #[error("resolution failed: {0}")] ResolutionFailed(String), /// Authentication/authorization failure. #[error("unauthorized: {0}")] Unauthorized(String), /// Request timed out. #[error("request timed out")] Timeout, } ``` Source line: `7`. # sigil-sdk · evidence URL: https://docs.sigil.ml/reference/rust/sigil-sdk/evidence Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/evidence.md Source declarations, signatures and documentation for evidence. Source: `sigil/node/sigil-sdk/src/evidence.rs`. SHA-256: `883a73943ae57bfa7f79d201349498b104f8c971e070540c8d1a6f1ac63eee47`. 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. Module condition: ```rust #[cfg(feature = "evidence")] ``` ## evidence::EvidenceError [#evidenceevidenceerror] Fail-closed errors for the evidence anchoring client. ```rust #[cfg(feature = "evidence")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, thiserror::Error)] pub enum EvidenceError { /// The digest or payload failed validation before submission. #[error("invalid anchor payload: {0}")] InvalidPayload(String), /// Network transport failure (connect, read, HTTP status). #[error("transport error: {0}")] Transport(String), /// The node returned a JSON-RPC error. #[error("rpc error {code}: {message}")] Rpc { /// JSON-RPC error code. code: i64, /// Server-provided message. message: String, }, /// The node returned a structurally unexpected response. #[error("malformed response: {0}")] MalformedResponse(String), /// The transaction was included but execution failed. #[error("anchor transaction failed on-chain: {0}")] ExecutionFailed(String), /// Inclusion was not observed within the confirmation budget. #[error("confirmation timed out after {0:?}")] ConfirmTimeout(Duration), /// No anchor exists for the queried digest. #[error("no evidence anchor found for digest {0}")] NotFound(String), } ``` Source line: `39`. ## evidence::AnchorParams [#evidenceanchorparams] Parameters for anchoring a digest on-chain. ```rust #[cfg(feature = "evidence")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnchorParams { /// Lowercase hex BLAKE3 digest (64 chars) of the artifact. pub digest: String, /// Classification label, e.g. `"one.harness-archive.v1"`. pub label: String, /// Optional content-addressed URI for retrieval. pub uri: Option, /// Small JSON metadata object. pub metadata: serde_json::Value, /// Client nonce for deterministic anchor IDs / duplicate rejection. pub client_nonce: String } ``` Source line: `86`. ## evidence::AnchorParams::from\_digest\_bytes [#evidenceanchorparamsfrom_digest_bytes] Create params for a raw 32-byte BLAKE3 digest. ```rust #[cfg(feature = "evidence")] pub fn from_digest_bytes( digest: [u8; 32], label: impl Into, client_nonce: impl Into, ) -> Self; ``` Source line: `101`. ## evidence::AnchorParams::with\_uri [#evidenceanchorparamswith_uri] Attach a content URI. ```rust #[cfg(feature = "evidence")] pub fn with_uri(mut self, uri: impl Into) -> Self; ``` Source line: `116`. ## evidence::AnchorParams::with\_metadata [#evidenceanchorparamswith_metadata] Attach metadata. ```rust #[cfg(feature = "evidence")] pub fn with_metadata(mut self, metadata: serde_json::Value) -> Self; ``` Source line: `122`. ## evidence::AnchorParams::anchor\_id [#evidenceanchorparamsanchor_id] The deterministic anchor ID for (chain, sender, digest, nonce). ```rust #[cfg(feature = "evidence")] pub fn anchor_id(&self, chain_id: &str, anchor_did: &str) -> Result; ``` Source line: `128`. ## evidence::anchor\_digest\_tx [#evidenceanchor_digest_tx] Build an unsigned `EvidenceAnchor` transaction from validated params. # Errors [#errors] Returns \[`EvidenceError::InvalidPayload`] if the digest is not 64 lowercase hex chars, the label/nonce bounds are exceeded, or the metadata exceeds the on-chain size cap. ```rust #[cfg(feature = "evidence")] pub fn anchor_digest_tx( builder: TransactionBuilder, params: &AnchorParams, ) -> Result; ``` Source line: `151`. ## evidence::digest\_artifact [#evidencedigest_artifact] Compute the BLAKE3 digest of artifact bytes in the canonical lowercase hex form expected by \[`AnchorParams`]. ```rust #[cfg(feature = "evidence")] pub fn digest_artifact(bytes: &[u8]) -> String; ``` Source line: `163`. ## evidence::AnchorSubmission [#evidenceanchorsubmission] Outcome of a successful anchor submission (pre-inclusion). ```rust #[cfg(feature = "evidence")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnchorSubmission { /// Hash of the submitted anchor transaction. pub tx_hash: String, /// Deterministic anchor ID the record will have once included. pub anchor_id: String } ``` Source line: `169`. ## evidence::AnchorProof [#evidenceanchorproof] A confirmed on-chain anchor — the verification artifact returned by `confirm_inclusion` / `verify_anchor`. ```rust #[cfg(feature = "evidence")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnchorProof { /// Deterministic anchor ID (`evidence:anchor:`). pub anchor_id: String, /// Anchored digest (lowercase hex BLAKE3). pub digest: String, /// Classification label. pub label: String, /// DID that anchored the digest. pub anchor_did: String, /// Hash of the anchor transaction. pub tx_hash: String, /// Block height at which the anchor executed. pub block_height: u64 } ``` Source line: `179`. ## evidence::ConfirmPolicy [#evidenceconfirmpolicy] Polling policy for inclusion confirmation. ```rust #[cfg(feature = "evidence")] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ConfirmPolicy { /// Interval between `sigil_getTransaction` polls. pub poll_interval: Duration, /// Maximum total wait before [`EvidenceError::ConfirmTimeout`]. pub timeout: Duration } ``` Source line: `209`. ## evidence::EvidenceTransport [#evidenceevidencetransport] JSON-RPC transport used by \[`EvidenceAnchorClient`]. Implementations must apply their own per-request timeout. Return `Ok(None)` for a JSON-RPC `null` result. ```rust #[cfg(feature = "evidence")] #[async_trait] pub trait EvidenceTransport: Send + Sync { /// Issue a JSON-RPC 2.0 call and return the `result` field. async fn rpc_call( &self, method: &str, params: serde_json::Value, ) -> Result, EvidenceError>; } ``` Source line: `230`. ## evidence::EvidenceAnchorClient [#evidenceevidenceanchorclient] Thin async client for the evidence anchoring path. Generic over \[`EvidenceTransport`] so tests can substitute a mock node; the reqwest-backed transport lives in `evidence_http` behind the `evidence-http` feature. ```rust #[cfg(feature = "evidence")] pub struct EvidenceAnchorClient { } ``` Source line: `244`. ## evidence::EvidenceAnchorClient\::new [#evidenceevidenceanchorclienttnew] Create a client for a chain and anchorer identity. ```rust #[cfg(feature = "evidence")] pub fn new(transport: T, chain_id: impl Into, sender_did: impl Into) -> Self; ``` Source line: `252`. ## evidence::EvidenceAnchorClient\::chain\_id [#evidenceevidenceanchorclienttchain_id] The chain this client anchors to. ```rust #[cfg(feature = "evidence")] pub fn chain_id(&self) -> &str; ``` Source line: `261`. ## evidence::EvidenceAnchorClient\::sender\_did [#evidenceevidenceanchorclienttsender_did] The DID this client anchors as. ```rust #[cfg(feature = "evidence")] pub fn sender_did(&self) -> &str; ``` Source line: `266`. ## evidence::EvidenceAnchorClient\::submit\_anchor [#evidenceevidenceanchorclienttsubmit_anchor] Submit a signed anchor transaction built with \[`anchor_digest_tx`]. Returns the transaction hash and deterministic anchor ID. Inclusion is not guaranteed yet — call \[`Self::confirm_inclusion`]. ```rust #[cfg(feature = "evidence")] pub async fn submit_anchor( &self, signed: &SignedTransaction, params: &AnchorParams, ) -> Result; ``` Source line: `274`. ## evidence::EvidenceAnchorClient\::confirm\_inclusion [#evidenceevidenceanchorclienttconfirm_inclusion] Confirm that a submitted anchor transaction is included and executed successfully. Polls `sigil_getTransaction` until the transaction appears or the confirmation budget elapses. ```rust #[cfg(feature = "evidence")] pub async fn confirm_inclusion( &self, submission: &AnchorSubmission, policy: ConfirmPolicy, ) -> Result; ``` Source line: `296`. ## evidence::EvidenceAnchorClient\::verify\_anchor [#evidenceevidenceanchorclienttverify_anchor] Verify anchors for a digest by reading the on-chain evidence index (`sigil_listEvidenceAnchorsByDigest`). Returns every anchor record for the digest, oldest semantics preserved by anchor ID ordering. ```rust #[cfg(feature = "evidence")] pub async fn verify_anchor(&self, digest: &str) -> Result, EvidenceError>; ``` Source line: `331`. ## evidence::EvidenceAnchorClient\::get\_anchor [#evidenceevidenceanchorclienttget_anchor] Fetch a single anchor by its deterministic anchor ID. ```rust #[cfg(feature = "evidence")] pub async fn get_anchor(&self, anchor_id: &str) -> Result, EvidenceError>; ``` Source line: `349`. # sigil-sdk · evidence_http URL: https://docs.sigil.ml/reference/rust/sigil-sdk/evidence_http Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/evidence_http.md Source declarations, signatures and documentation for evidence_http. Source: `sigil/node/sigil-sdk/src/evidence_http.rs`. SHA-256: `935e807b07e664c7fa02ade5faba8f1f0a3d67043845ef64d40ce5a0490e95be`. 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. Module condition: ```rust #[cfg(feature = "evidence-http")] ``` ## evidence\_http::HttpEvidenceTransportConfig [#evidence_httphttpevidencetransportconfig] Configuration for the HTTP evidence transport. ```rust #[cfg(feature = "evidence-http")] #[derive(Debug, Clone)] pub struct HttpEvidenceTransportConfig { /// JSON-RPC endpoint (e.g. `"http://localhost:12618"`). pub rpc_url: String, /// Per-request timeout. pub timeout: Duration, /// Optional bearer token for authenticated endpoints. pub auth_token: Option } ``` Source line: `21`. ## evidence\_http::HttpEvidenceTransportConfig::new [#evidence_httphttpevidencetransportconfignew] Build a config targeting a JSON-RPC URL with the default timeout and no auth token. ```rust #[cfg(feature = "evidence-http")] pub fn new(rpc_url: impl Into) -> Self; ``` Source line: `33`. ## evidence\_http::HttpEvidenceTransportConfig::with\_timeout [#evidence_httphttpevidencetransportconfigwith_timeout] Override the per-request timeout. ```rust #[cfg(feature = "evidence-http")] pub fn with_timeout(mut self, timeout: Duration) -> Self; ``` Source line: `43`. ## evidence\_http::HttpEvidenceTransportConfig::with\_auth\_token [#evidence_httphttpevidencetransportconfigwith_auth_token] Set a bearer token for authenticated endpoints. ```rust #[cfg(feature = "evidence-http")] pub fn with_auth_token(mut self, token: impl Into) -> Self; ``` Source line: `49`. ## evidence\_http::HttpEvidenceTransport [#evidence_httphttpevidencetransport] Reqwest-backed \[`EvidenceTransport`]. ```rust #[cfg(feature = "evidence-http")] pub struct HttpEvidenceTransport { } ``` Source line: `64`. ## evidence\_http::HttpEvidenceTransport::new [#evidence_httphttpevidencetransportnew] Construct a new transport. Returns an error if the HTTP client cannot be initialized (e.g. TLS configuration failure). ```rust #[cfg(feature = "evidence-http")] pub fn new(config: HttpEvidenceTransportConfig) -> Result; ``` Source line: `73`. # sigil-sdk · gal_adapter URL: https://docs.sigil.ml/reference/rust/sigil-sdk/gal_adapter Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/gal_adapter.md Source declarations, signatures and documentation for gal_adapter. Source: `sigil/node/sigil-sdk/src/gal_adapter.rs`. SHA-256: `112592422588ed8ce1147b668a9d5d3dc34b8a217c66db583c02b3227ab3a4b4`. 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. Module condition: ```rust #[cfg(feature = "gal")] ``` ## gal\_adapter::FinalizedBlockFuture [#gal_adapterfinalizedblockfuture] Future returned by \[`FinalizedBlockSource::Dynamic`] closures. ```rust #[cfg(feature = "gal")] pub type FinalizedBlockFuture<'a> = Pin> + Send + 'a>>; ``` Source line: `24`. ## gal\_adapter::MarsToOasGalSource [#gal_adaptermarstooasgalsource] Wraps any `mars_protocol::SigilAnchorClient` and exposes it as an `oas_resolve::LineageAnchor`. Resolvers built on top of this adapter transparently pick up production Sigil RPC, the in-memory mock, or any other `SigilAnchorClient` implementation. ```rust #[cfg(feature = "gal")] pub struct MarsToOasGalSource { } ``` Source line: `31`. ## gal\_adapter::FinalizedBlockSource [#gal_adapterfinalizedblocksource] How the adapter discovers the current finalized block. This avoids a hard dependency on a specific RPC method name; callers either supply a live closure (production: query `sigil_getLatestBlock` and return its height) or pin a fixed value (tests). ```rust #[cfg(feature = "gal")] pub enum FinalizedBlockSource { /// Use a fixed value. Useful for tests and for staging environments /// that already pin a head. Fixed(u64), /// Resolve the value lazily on every call. The closure is async to /// allow it to perform a Sigil RPC `sigil_getLatestBlock` call. Dynamic(Arc FinalizedBlockFuture<'static> + Send + Sync>), } ``` Source line: `40`. ## gal\_adapter::MarsToOasGalSource::with\_fixed\_block [#gal_adaptermarstooasgalsourcewith_fixed_block] Build an adapter with a static finalized-block height. Useful for tests and for environments where the head height is supplied out-of-band. ```rust #[cfg(feature = "gal")] pub fn with_fixed_block(client: Arc, block: u64) -> Self; ``` Source line: `53`. ## gal\_adapter::MarsToOasGalSource::with\_dynamic\_block [#gal_adaptermarstooasgalsourcewith_dynamic_block] Build an adapter with a dynamic finalized-block source. ```rust #[cfg(feature = "gal")] pub fn with_dynamic_block( client: Arc, source: FinalizedBlockSource, ) -> Self; ``` Source line: `61`. # sigil-sdk · gal_http URL: https://docs.sigil.ml/reference/rust/sigil-sdk/gal_http Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/gal_http.md Source declarations, signatures and documentation for gal_http. Source: `sigil/node/sigil-sdk/src/gal_http.rs`. SHA-256: `53980e7e43e59a9fb8df324a56cf4920e0a42aab587982249155e094c9463a25`. 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. Module condition: ```rust #[cfg(feature = "gal-http")] ``` ## gal\_http::HttpSigilAnchorClientConfig [#gal_httphttpsigilanchorclientconfig] Configuration for the HTTP anchor client. ```rust #[cfg(feature = "gal-http")] #[derive(Debug, Clone)] pub struct HttpSigilAnchorClientConfig { /// JSON-RPC endpoint (e.g. `"http://localhost:12618"`). pub rpc_url: String, /// Request timeout. Defaults to 10 seconds. pub timeout: Duration, /// Optional bearer token for authenticated endpoints. pub auth_token: Option } ``` Source line: `22`. ## gal\_http::HttpSigilAnchorClientConfig::new [#gal_httphttpsigilanchorclientconfignew] Build a config targeting a JSON-RPC URL with the default 10-second timeout and no auth token. ```rust #[cfg(feature = "gal-http")] pub fn new(rpc_url: impl Into) -> Self; ``` Source line: `34`. ## gal\_http::HttpSigilAnchorClientConfig::with\_timeout [#gal_httphttpsigilanchorclientconfigwith_timeout] Override the request timeout. ```rust #[cfg(feature = "gal-http")] pub fn with_timeout(mut self, timeout: Duration) -> Self; ``` Source line: `44`. ## gal\_http::HttpSigilAnchorClientConfig::with\_auth\_token [#gal_httphttpsigilanchorclientconfigwith_auth_token] Set a bearer token for authenticated endpoints. ```rust #[cfg(feature = "gal-http")] pub fn with_auth_token(mut self, token: impl Into) -> Self; ``` Source line: `50`. ## gal\_http::HttpSigilAnchorClient [#gal_httphttpsigilanchorclient] Reqwest-backed `SigilAnchorClient` impl. ```rust #[cfg(feature = "gal-http")] pub struct HttpSigilAnchorClient { } ``` Source line: `65`. ## gal\_http::HttpSigilAnchorClient::new [#gal_httphttpsigilanchorclientnew] Construct a new client. Returns an error if the underlying HTTP client cannot be initialized (e.g., TLS configuration failure). ```rust #[cfg(feature = "gal-http")] pub fn new(config: HttpSigilAnchorClientConfig) -> Result; ``` Source line: `74`. # sigil-sdk URL: https://docs.sigil.ml/reference/rust/sigil-sdk Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk.md High-level SDK for the Sigil blockchain High-level SDK for the Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-sdk` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-sdk/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_sdk` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-sdk = { path = "../sigil-sdk" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------------- | ------------------------------------------------------------------------------------------------------ | | `default` | No additional feature dependencies | | `compute` | `sigil-core/compute` | | `evidence` | `dep:async-trait`, `dep:tokio` | | `evidence-http` | `evidence`, `dep:reqwest` | | `gal` | `sigil-core/tower`, `dep:async-trait`, `dep:blake3`, `dep:hex`, `dep:mars-protocol`, `dep:oas-resolve` | | `gal-http` | `gal`, `dep:reqwest` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-sdk/crate) — 25 declarations * [builder](/reference/rust/sigil-sdk/builder) — 18 declarations * [client](/reference/rust/sigil-sdk/client) — 6 declarations * [error](/reference/rust/sigil-sdk/error) — 1 declarations * [mail](/reference/rust/sigil-sdk/mail) — 10 declarations * [nft](/reference/rust/sigil-sdk/nft) — 6 declarations * [resolver](/reference/rust/sigil-sdk/resolver) — 4 declarations * [sns](/reference/rust/sigil-sdk/sns) — 16 declarations * [storage\_market](/reference/rust/sigil-sdk/storage_market) — 13 declarations * [evidence](/reference/rust/sigil-sdk/evidence) — 20 declarations * [evidence\_http](/reference/rust/sigil-sdk/evidence_http) — 6 declarations * [gal\_adapter](/reference/rust/sigil-sdk/gal_adapter) — 5 declarations * [sign\_in](/reference/rust/sigil-sdk/sign_in) — 28 declarations * [gal\_http](/reference/rust/sigil-sdk/gal_http) — 6 declarations # sigil-sdk · mail URL: https://docs.sigil.ml/reference/rust/sigil-sdk/mail Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/mail.md Source declarations, signatures and documentation for mail. Source: `sigil/node/sigil-sdk/src/mail.rs`. SHA-256: `755d120a271ab72894f4d39d32daa9ad985a948ce4dc67a5e3af042ef3d1e5aa`. 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. ## mail::derive\_mailbox\_id [#mailderive_mailbox_id] Build a deterministic mailbox id from the chain, subject DID, and blinded mailbox salt commitment. ```rust pub fn derive_mailbox_id( chain_id: &str, subject_did: &str, mailbox_salt_commitment: &str, ) -> Result; ``` Source line: `22`. ## mail::allow\_all\_policy [#mailallow_all_policy] Build the standard launch v1 allow-all receive policy. ```rust pub fn allow_all_policy( chain_id: &str, mailbox_id: &str, version: u64, created_at_height: u64, ) -> Result; ``` Source line: `32`. ## mail::public\_mail\_key\_record [#mailpublic_mail_key_record] Build an active public mail key record from a lowercase hex public key. ```rust #[allow(clippy::too_many_arguments)] pub fn public_mail_key_record( chain_id: &str, mailbox_id: &str, purpose: MailKeyPurpose, algorithm: &str, public_key_hex: &str, device_commitment: &str, version: u64, published_at_height: u64, expires_at_height: Option, ) -> Result; ``` Source line: `63`. ## mail::delivery\_commitment [#maildelivery_commitment] Build a content-blind delivery commitment. `encrypted_weave_ref_commitment` and `ciphertext_content_hash` must be 32-byte lowercase hex commitments, never plaintext paths or headers. ```rust #[allow(clippy::too_many_arguments)] pub fn delivery_commitment( chain_id: &str, sender_route: SenderRoute, recipient_mailbox_id: &str, encrypted_weave_ref_commitment: &str, ciphertext_content_hash: &str, recipient_key_id: &str, recipient_key_version: u64, policy_version: u64, client_nonce: &str, required_fee: u128, locked_stake: u128, ) -> Result; ``` Source line: `108`. ## mail::preflight\_delivery\_commitment [#mailpreflight_delivery_commitment] ```rust pub fn preflight_delivery_commitment(record: &DeliveryCommitmentRecord) -> Result<(), SdkError>; ``` Source line: `153`. ## mail::TransactionBuilder::mail\_create\_mailbox [#mailtransactionbuildermail_create_mailbox] Build `MailCreateMailbox`. ```rust #[allow(clippy::too_many_arguments)] pub fn mail_create_mailbox( self, mailbox_id: &str, subject_did: &str, controller_policy: ControlPolicy, wallet_address: Option<&str>, mailbox_salt_commitment: &str, mailbox_storage_commitment: Option<&str>, client_nonce: &str, ) -> Transaction; ``` Source line: `168`. ## mail::TransactionBuilder::mail\_update\_receive\_policy [#mailtransactionbuildermail_update_receive_policy] Build `MailUpdateReceivePolicy`. ```rust pub fn mail_update_receive_policy( self, mailbox_id: &str, policy: MailboxPolicyRecord, expected_sequence: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `190`. ## mail::TransactionBuilder::mail\_publish\_key [#mailtransactionbuildermail_publish_key] Build `MailPublishKey`. ```rust pub fn mail_publish_key( self, mailbox_id: &str, key: MailPublicKeyRecord, expected_sequence: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `208`. ## mail::TransactionBuilder::mail\_publish\_delivery\_commitment [#mailtransactionbuildermail_publish_delivery_commitment] Build `MailPublishDeliveryCommitment`. ```rust pub fn mail_publish_delivery_commitment( self, commitment: DeliveryCommitmentRecord, sender_signature_hex: Option<&str>, client_nonce: &str, ) -> Transaction; ``` Source line: `224`. ## mail::TransactionBuilder::mail\_grant\_permission [#mailtransactionbuildermail_grant_permission] Build `MailGrantPermission`. ```rust pub fn mail_grant_permission( self, grant: MailDelegationGrant, client_nonce: &str, ) -> Transaction; ``` Source line: `242`. # sigil-sdk · nft URL: https://docs.sigil.ml/reference/rust/sigil-sdk/nft Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/nft.md Source declarations, signatures and documentation for nft. Source: `sigil/node/sigil-sdk/src/nft.rs`. SHA-256: `ad901fe315da1c546036b38df4ee4d7a4043c5f53177a93822fd3f1f9e4fac5e`. 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. ## nft::TransactionBuilder::create\_nft\_collection [#nfttransactionbuildercreate_nft_collection] Build a `CreateNftCollection` transaction. The `sender_did` on the builder must match `issuer_did` (enforced by the executor, not here). ```rust #[allow(clippy::too_many_arguments)] pub fn create_nft_collection( self, collection_id: &str, name: &str, symbol: &str, kind: NftKind, issuer_did: &str, controller_did: &str, policy: CollectionPolicy, metadata_uri: Option<&str>, ) -> Transaction; ``` Source line: `36`. ## nft::TransactionBuilder::mint\_nft [#nfttransactionbuildermint_nft] Build a `MintNft` transaction. ```rust #[allow(clippy::too_many_arguments)] pub fn mint_nft( self, collection_id: &str, token_id: u128, recipient_did: &str, metadata_uri: Option<&str>, metadata_hash: Option, locked: Option, burn_auth: Option, identity: Option, ) -> Transaction; ``` Source line: `67`. ## nft::TransactionBuilder::transfer\_nft [#nfttransactionbuildertransfer_nft] Build a `TransferNft` transaction. ```rust pub fn transfer_nft( self, collection_id: &str, token_id: u128, from_did: &str, to_did: &str, ) -> Transaction; ``` Source line: `91`. ## nft::TransactionBuilder::burn\_nft [#nfttransactionbuilderburn_nft] Build a `BurnNft` transaction. ```rust pub fn burn_nft(self, collection_id: &str, token_id: u128, authorized_by: &str) -> Transaction; ``` Source line: `107`. ## nft::TransactionBuilder::set\_nft\_metadata [#nfttransactionbuilderset_nft_metadata] Build a `SetNftMetadata` transaction (ERC-4906 inspired). At least one of `metadata_uri` or `metadata_hash` should be supplied; the executor rejects transactions where both are `None`. ```rust pub fn set_nft_metadata( self, collection_id: &str, token_id: u128, metadata_uri: Option<&str>, metadata_hash: Option, ) -> Transaction; ``` Source line: `119`. ## nft::TransactionBuilder::verify\_identity\_nft [#nfttransactionbuilderverify_identity_nft] Build a `VerifyIdentityNft` transaction. ```rust pub fn verify_identity_nft( self, collection_id: &str, token_id: u128, verifier_did: &str, new_verification_level: u8, note: Option<&str>, ) -> Transaction; ``` Source line: `135`. # sigil-sdk · resolver URL: https://docs.sigil.ml/reference/rust/sigil-sdk/resolver Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/resolver.md 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 [#resolversigilresolver] Resolves OAS documents from Sigil chain state. ```rust #[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 [#resolversigilresolvernew] Create a new resolver targeting the given node. ```rust pub fn new(rpc_url: &str, chain_id: &str) -> Self; ``` Source line: `21`. ## resolver::SigilResolver::resolve\_did [#resolversigilresolverresolve_did] Resolve an OAS document by DID. ```rust pub fn resolve_did(&self, did: &str) -> Result; ``` Source line: `29`. ## resolver::ResolvedDocument [#resolverresolveddocument] A resolved OAS document with on-chain anchoring metadata. ```rust #[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`. # sigil-sdk · sign_in URL: https://docs.sigil.ml/reference/rust/sigil-sdk/sign_in Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/sign_in.md Source declarations, signatures and documentation for sign_in. Source: `sigil/node/sigil-sdk/src/sign_in.rs`. SHA-256: `d8fdb78f0b0ae7ab23d8998b49e4c5852eabe56f5a3c44f0e4578f3b9f2414bc`. 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. Module condition: ```rust #[cfg(feature = "gal")] ``` ## sign\_in::SIGN\_IN\_KIND [#sign_insign_in_kind] ```rust #[cfg(feature = "gal")] pub const SIGN_IN_KIND: &str; ``` Source line: `18`. ## sign\_in::SIGN\_MESSAGE\_METHOD [#sign_insign_message_method] ```rust #[cfg(feature = "gal")] pub const SIGN_MESSAGE_METHOD: &str; ``` Source line: `19`. ## sign\_in::SIGN\_MESSAGE\_TRANSCRIPT\_VERSION [#sign_insign_message_transcript_version] ```rust #[cfg(feature = "gal")] pub const SIGN_MESSAGE_TRANSCRIPT_VERSION: u8; ``` Source line: `20`. ## sign\_in::DEFAULT\_MAX\_SIGN\_IN\_CHALLENGE\_TTL\_MS [#sign_indefault_max_sign_in_challenge_ttl_ms] ```rust #[cfg(feature = "gal")] pub const DEFAULT_MAX_SIGN_IN_CHALLENGE_TTL_MS: i64; ``` Source line: `21`. ## sign\_in::MAX\_SIGN\_IN\_MESSAGE\_BYTES [#sign_inmax_sign_in_message_bytes] ```rust #[cfg(feature = "gal")] pub const MAX_SIGN_IN_MESSAGE_BYTES: usize; ``` Source line: `22`. ## sign\_in::MAX\_SIGN\_IN\_TRANSCRIPT\_BYTES [#sign_inmax_sign_in_transcript_bytes] ```rust #[cfg(feature = "gal")] pub const MAX_SIGN_IN_TRANSCRIPT_BYTES: usize; ``` Source line: `23`. ## sign\_in::MAX\_SIGN\_IN\_URL\_BYTES [#sign_inmax_sign_in_url_bytes] ```rust #[cfg(feature = "gal")] pub const MAX_SIGN_IN_URL_BYTES: usize; ``` Source line: `24`. ## sign\_in::MAX\_SIGN\_IN\_FIELD\_BYTES [#sign_inmax_sign_in_field_bytes] ```rust #[cfg(feature = "gal")] pub const MAX_SIGN_IN_FIELD_BYTES: usize; ``` Source line: `25`. ## sign\_in::MAX\_SIGN\_IN\_DID\_BYTES [#sign_inmax_sign_in_did_bytes] ```rust #[cfg(feature = "gal")] pub const MAX_SIGN_IN_DID_BYTES: usize; ``` Source line: `26`. ## sign\_in::SignInChallenge [#sign_insigninchallenge] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SignInChallenge { pub kind: String, pub version: u8, pub origin: String, pub audience: String, pub chain_id: String, pub nonce: String, pub request_id: String, pub hmr_did: String, #[serde(skip_serializing_if = "Option::is_none")] pub root_did: Option, pub issued_at_ms: i64, pub expires_at_ms: i64 } ``` Source line: `30`. ## sign\_in::SignInChallengeInput [#sign_insigninchallengeinput] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq)] pub struct SignInChallengeInput { pub origin: String, pub audience: String, pub chain_id: String, pub nonce: String, pub request_id: String, pub hmr_did: String, pub root_did: Option, pub issued_at_ms: i64, pub expires_at_ms: i64 } ``` Source line: `46`. ## sign\_in::SignInChallenge::new [#sign_insigninchallengenew] ```rust #[cfg(feature = "gal")] pub fn new(input: SignInChallengeInput) -> Self; ``` Source line: `59`. ## sign\_in::SignInChallenge::canonical\_message [#sign_insigninchallengecanonical_message] ```rust #[cfg(feature = "gal")] pub fn canonical_message(&self) -> Result; ``` Source line: `75`. ## sign\_in::SignedSignInResponse [#sign_insignedsigninresponse] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SignedSignInResponse { pub kind: String, pub origin: String, pub chain_id: String, pub signer_did: String, pub message: String, pub signature: String, pub signer_public_key: String, pub digest: String, pub transcript: String } ``` Source line: `82`. ## sign\_in::SignInVerifyOptions [#sign_insigninverifyoptions] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq)] pub struct SignInVerifyOptions { pub expected_origin: String, pub expected_chain_id: String, pub expected_nonce: String, pub expected_request_id: Option, pub expected_audience: String, pub now_ms: i64, pub max_clock_skew_ms: i64, pub max_challenge_ttl_ms: i64 } ``` Source line: `95`. ## sign\_in::SignInVerifyOptions::new [#sign_insigninverifyoptionsnew] ```rust #[cfg(feature = "gal")] pub fn new( expected_origin: impl Into, expected_chain_id: impl Into, expected_nonce: impl Into, expected_audience: impl Into, now_ms: i64, ) -> Self; ``` Source line: `107`. ## sign\_in::SignInVerifyOptions::with\_expected\_request\_id [#sign_insigninverifyoptionswith_expected_request_id] ```rust #[cfg(feature = "gal")] pub fn with_expected_request_id(mut self, expected_request_id: impl Into) -> Self; ``` Source line: `126`. ## sign\_in::SignInVerifyOptions::with\_max\_challenge\_ttl\_ms [#sign_insigninverifyoptionswith_max_challenge_ttl_ms] ```rust #[cfg(feature = "gal")] pub fn with_max_challenge_ttl_ms(mut self, max_challenge_ttl_ms: i64) -> Self; ``` Source line: `131`. ## sign\_in::SignInRootKind [#sign_insigninrootkind] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq)] pub enum SignInRootKind { Hmr, Mhr, Enr, } ``` Source line: `138`. ## sign\_in::VerifiedSignIn [#sign_inverifiedsignin] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, PartialEq, Eq)] pub struct VerifiedSignIn { pub hmr_did: String, pub root_did: String, pub root_kind: SignInRootKind, pub signer_public_key: String, pub chain_id: String, pub origin: String, pub audience: String, pub nonce: String, pub request_id: String, pub expires_at_ms: i64 } ``` Source line: `145`. ## sign\_in::SignInVerifyError [#sign_insigninverifyerror] ```rust #[cfg(feature = "gal")] #[derive(Debug, Error)] pub enum SignInVerifyError { #[error("malformed sign-in payload: {0}")] Malformed(String), #[error("transcript mismatch")] TranscriptMismatch, #[error("digest mismatch")] DigestMismatch, #[error("invalid signature")] InvalidSignature, #[error("challenge mismatch: {0}")] ChallengeMismatch(String), #[error("challenge already consumed or missing: {0}")] ChallengeConsumedOrMissing(String), #[error("challenge store error: {0}")] ChallengeStore(String), #[error("challenge expired")] Expired, #[error("challenge issued too far in the future")] IssuedInFuture, #[error("GAL lookup failed: {0}")] GalLookup(String), #[error("GAL root missing: {0}")] GalRootMissing(String), #[error("GAL root inactive: {0}")] GalRootInactive(String), #[error("GAL root revoked: {0}")] GalRootRevoked(String), #[error("HMR controller public key does not match signer")] HmrControllerMismatch, #[error("root policy does not authorize signer HMR")] RootPolicyMismatch, } ``` Source line: `159`. ## sign\_in::SignInChallengeStore [#sign_insigninchallengestore] ```rust #[cfg(feature = "gal")] pub trait SignInChallengeStore { fn insert_challenge(&self, challenge: SignInChallenge) -> Result<(), SignInVerifyError>; fn take_challenge( &self, request_id: &str, ) -> Result, SignInVerifyError>; } ``` Source line: `192`. ## sign\_in::InMemorySignInChallengeStore [#sign_ininmemorysigninchallengestore] ```rust #[cfg(feature = "gal")] #[derive(Debug, Clone, Default)] pub struct InMemorySignInChallengeStore { } ``` Source line: `201`. ## sign\_in::InMemorySignInChallengeStore::new [#sign_ininmemorysigninchallengestorenew] ```rust #[cfg(feature = "gal")] pub fn new() -> Self; ``` Source line: `206`. ## sign\_in::canonical\_sign\_in\_message [#sign_incanonical_sign_in_message] ```rust #[cfg(feature = "gal")] pub fn canonical_sign_in_message(challenge: &SignInChallenge) -> Result; ``` Source line: `237`. ## sign\_in::build\_sign\_in\_transcript [#sign_inbuild_sign_in_transcript] ```rust #[cfg(feature = "gal")] pub fn build_sign_in_transcript( origin: &str, chain_id: &str, signer_did: &str, message: &str, ) -> Result; ``` Source line: `243`. ## sign\_in::verify\_sign\_in\_response\_with\_store [#sign_inverify_sign_in_response_with_store] ```rust #[cfg(feature = "gal")] pub async fn verify_sign_in_response_with_store( client: &C, response: &SignedSignInResponse, store: &S, now_ms: i64, ) -> Result where C: SigilAnchorClient + ?Sized, S: SignInChallengeStore + ?Sized,; ``` Source line: `260`. ## sign\_in::verify\_sign\_in\_response [#sign_inverify_sign_in_response] ```rust #[cfg(feature = "gal")] pub async fn verify_sign_in_response( client: &C, response: &SignedSignInResponse, options: &SignInVerifyOptions, ) -> Result; ``` Source line: `304`. # sigil-sdk · sns URL: https://docs.sigil.ml/reference/rust/sigil-sdk/sns Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/sns.md Source declarations, signatures and documentation for sns. Source: `sigil/node/sigil-sdk/src/sns.rs`. SHA-256: `ca7197ae934dd9bb2e402b6cc5c49129e7dafbcc53ce6568e0fd06af76b0ba00`. 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. ## sns::normalize\_name [#snsnormalize_name] Normalize and validate an ASCII `.sigil` name. ```rust pub fn normalize_name(name: &str) -> Result; ``` Source line: `15`. ## sns::compute\_namehash [#snscompute_namehash] Compute the canonical SNS namehash. ```rust pub fn compute_namehash(name: &str) -> Result; ``` Source line: `20`. ## sns::compute\_auction\_id [#snscompute_auction_id] ```rust pub fn compute_auction_id(name: &str) -> Result; ``` Source line: `24`. ## sns::compute\_name\_registration\_commitment [#snscompute_name_registration_commitment] ```rust pub fn compute_name_registration_commitment( chain_id: &str, name: &str, owner_did: &str, salt: &str, reveal_nonce: &str, ) -> Result; ``` Source line: `28`. ## sns::compute\_sealed\_bid\_commitment [#snscompute_sealed_bid_commitment] ```rust pub fn compute_sealed_bid_commitment( chain_id: &str, auction_id: &str, name: &str, bidder_did: &str, bid_amount: u128, salt: &str, ) -> Result; ``` Source line: `39`. ## sns::mailbox\_record [#snsmailbox_record] Build a mailbox resolver record for a `.sigil` name. ```rust pub fn mailbox_record( name: &str, mailbox_id: &str, controller_did: &str, revision: u64, ) -> Result; ``` Source line: `52`. ## sns::weave\_mailbox\_record [#snsweave_mailbox_record] Build a Weave mailbox reference record. The value must be an encrypted target commitment or content-addressed private mailbox reference, not a plaintext mailbox path. ```rust pub fn weave_mailbox_record( name: &str, weave_ref_commitment: &str, controller_did: &str, revision: u64, ) -> Result; ``` Source line: `75`. ## sns::website\_record [#snswebsite_record] Build a public website/content record. ```rust pub fn website_record( name: &str, public_content_ref: &str, controller_did: &str, revision: u64, ) -> Result; ``` Source line: `96`. ## sns::TransactionBuilder::sns\_register\_name [#snstransactionbuildersns_register_name] Build `RegisterName`. ```rust pub fn sns_register_name( self, name: &str, owner_did: &str, years: u8, salt: &str, reveal_nonce: &str, client_nonce: &str, ) -> Transaction; ``` Source line: `118`. ## sns::TransactionBuilder::sns\_renew\_name [#snstransactionbuildersns_renew_name] Build `RenewName`. ```rust pub fn sns_renew_name( self, name: &str, years: u8, expected_revision: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `138`. ## sns::TransactionBuilder::sns\_set\_name\_records [#snstransactionbuildersns_set_name_records] Build `SetNameRecords`. ```rust pub fn sns_set_name_records( self, name: &str, records: Vec, expected_revision: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `154`. ## sns::TransactionBuilder::sns\_delete\_name\_records [#snstransactionbuildersns_delete_name_records] Build `DeleteNameRecords`. ```rust pub fn sns_delete_name_records( self, name: &str, kinds: Vec, expected_revision: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `170`. ## sns::TransactionBuilder::sns\_commit\_name\_registration [#snstransactionbuildersns_commit_name_registration] Build `CommitNameRegistration`. ```rust pub fn sns_commit_name_registration( self, commitment: &str, bidder_did: &str, deposit: u128, reveal_after_height: u64, expires_at_height: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `186`. ## sns::TransactionBuilder::sns\_commit\_sealed\_name\_bid [#snstransactionbuildersns_commit_sealed_name_bid] Build `CommitSealedNameBid`. ```rust pub fn sns_commit_sealed_name_bid( self, auction_id: &str, commitment: &str, bidder_did: &str, deposit: u128, client_nonce: &str, ) -> Transaction; ``` Source line: `208`. ## sns::TransactionBuilder::sns\_reveal\_sealed\_name\_bid [#snstransactionbuildersns_reveal_sealed_name_bid] Build `RevealSealedNameBid`. ```rust pub fn sns_reveal_sealed_name_bid( self, auction_id: &str, name: &str, bid_amount: u128, salt: &str, bidder_did: &str, client_nonce: &str, ) -> Transaction; ``` Source line: `228`. ## sns::TransactionBuilder::sns\_finalize\_sealed\_name\_auction [#snstransactionbuildersns_finalize_sealed_name_auction] Build `FinalizeSealedNameAuction`. ```rust pub fn sns_finalize_sealed_name_auction( self, auction_id: &str, name: &str, winner_did: &str, expected_bid: u128, years: u8, client_nonce: &str, ) -> Transaction; ``` Source line: `250`. # sigil-sdk · storage_market URL: https://docs.sigil.ml/reference/rust/sigil-sdk/storage_market Markdown: https://docs.sigil.ml/reference/rust/sigil-sdk/storage_market.md Source declarations, signatures and documentation for storage_market. Source: `sigil/node/sigil-sdk/src/storage_market.rs`. SHA-256: `59a1e22010659d410ddf0751d42050395dcfc34c3ce9487a7a02584c09bab5be`. 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. ## storage\_market::derive\_storage\_pin\_request\_id [#storage_marketderive_storage_pin_request_id] Derive the canonical storage pin request id before submitting a request. ```rust pub fn derive_storage_pin_request_id( chain_id: &str, owner_did: &str, artifact: &ArtifactCommitment, duration_epochs: u64, replication_factor: u16, client_nonce: &str, ) -> Result; ``` Source line: `19`. ## storage\_market::derive\_storage\_contract\_id [#storage_marketderive_storage_contract_id] Derive the canonical storage contract id for a provider accepting a request. ```rust pub fn derive_storage_contract_id( chain_id: &str, request_id: &str, provider_did: &str, ) -> Result; ``` Source line: `39`. ## storage\_market::derive\_storage\_challenge\_id [#storage_marketderive_storage_challenge_id] Derive the canonical storage challenge id before submitting a challenge. ```rust pub fn derive_storage_challenge_id( chain_id: &str, contract_id: &str, opened_at_height: u64, client_nonce: &str, ) -> Result; ``` Source line: `49`. ## storage\_market::preflight\_storage\_pin\_request [#storage_marketpreflight_storage_pin_request] Preflight a pin request without reading chain state. ```rust pub fn preflight_storage_pin_request(data: &StoragePinRequestData) -> Result<(), SdkError>; ``` Source line: `60`. ## storage\_market::preflight\_storage\_receipt [#storage_marketpreflight_storage_receipt] Preflight a provider receipt without reading chain state. ```rust pub fn preflight_storage_receipt(receipt: &StoragePinReceipt) -> Result<(), SdkError>; ``` Source line: `93`. ## storage\_market::TransactionBuilder::storage\_provider\_register [#storage_markettransactionbuilderstorage_provider_register] Build `StorageProviderRegister`. ```rust #[allow(clippy::too_many_arguments)] pub fn storage_provider_register( self, provider_did: &str, capacity_gib: u64, regions: Vec, price_per_gib_epoch: u64, retrieval_price_per_gib: u64, replication_guarantee: u16, stake: u64, provider_pubkey: Vec, client_nonce: &str, ) -> Transaction; ``` Source line: `115`. ## storage\_market::TransactionBuilder::storage\_provider\_update [#storage_markettransactionbuilderstorage_provider_update] Build `StorageProviderUpdate`. ```rust #[allow(clippy::too_many_arguments)] pub fn storage_provider_update( self, provider_did: &str, capacity_gib: Option, regions: Option>, price_per_gib_epoch: Option, retrieval_price_per_gib: Option, replication_guarantee: Option, provider_pubkey: Option>, client_nonce: &str, ) -> Transaction; ``` Source line: `144`. ## storage\_market::TransactionBuilder::storage\_provider\_exit [#storage_markettransactionbuilderstorage_provider_exit] Build `StorageProviderExit`. ```rust pub fn storage_provider_exit(self, provider_did: &str, client_nonce: &str) -> Transaction; ``` Source line: `170`. ## storage\_market::TransactionBuilder::storage\_pin\_request [#storage_markettransactionbuilderstorage_pin_request] Build `StoragePinRequest`. ```rust #[allow(clippy::too_many_arguments)] pub fn storage_pin_request( self, owner_did: &str, artifact: ArtifactCommitment, duration_epochs: u64, replication_factor: u16, max_price_per_gib_epoch: u64, escrowed_amount: u64, expires_at_height: Option, client_nonce: &str, ) -> Result; ``` Source line: `181`. ## storage\_market::TransactionBuilder::storage\_pin\_accept [#storage_markettransactionbuilderstorage_pin_accept] Build `StoragePinAccept`. ```rust pub fn storage_pin_accept( self, request_id: &str, provider_did: &str, accepted_price_per_gib_epoch: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `207`. ## storage\_market::TransactionBuilder::storage\_receipt\_settle [#storage_markettransactionbuilderstorage_receipt_settle] Build `StorageReceiptSettle`. ```rust pub fn storage_receipt_settle( self, receipt: StoragePinReceipt, ) -> Result; ``` Source line: `223`. ## storage\_market::TransactionBuilder::storage\_challenge [#storage_markettransactionbuilderstorage_challenge] Build `StorageChallenge`. ```rust pub fn storage_challenge( self, contract_id: &str, challenger_did: &str, sample_indices: Vec, response_window_blocks: u64, client_nonce: &str, ) -> Transaction; ``` Source line: `234`. ## storage\_market::TransactionBuilder::storage\_challenge\_resolve [#storage_markettransactionbuilderstorage_challenge_resolve] Build `StorageChallengeResolve`. ```rust pub fn storage_challenge_resolve( self, challenge_id: &str, proof: StorageChallengeProof, ) -> Transaction; ``` Source line: `252`. # sigil-node · admission URL: https://docs.sigil.ml/reference/rust/sigil-node/admission Markdown: https://docs.sigil.ml/reference/rust/sigil-node/admission.md Source declarations, signatures and documentation for admission. Source: `sigil/node/sigil-node/src/admission.rs`. SHA-256: `538ddd68a7841720c7bb7a69dc963e026f45d41371f3525cb0ff087d5b3b115a`. 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. ## admission::AdmissionRejectReason [#admissionadmissionrejectreason] Stable, bounded transaction rejection reasons shared across RPC, mempool, consensus, and executor prechecks. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum AdmissionRejectReason { ChainId, Signature, SignerPolicy, Replay, Nonce, GasBounds, Hash, } ``` Source line: `14`. ## admission::NoncePolicy [#admissionnoncepolicy] How a state-backed admission call should compare the submitted nonce to the current account nonce. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum NoncePolicy { /// Require `tx.nonce == state_nonce`; used by the executor and proposal /// validation because they are final safety boundaries. Exact, /// Require `tx.nonce >= state_nonce`; used by RPC/mempool admission so a /// sender can queue future nonces while stale nonces still fail closed. AtLeastCurrent, /// Skip nonce lookup. This is only for stateless transports/tests. Skip, } ``` Source line: `27`. ## admission::PrecheckContext [#admissionprecheckcontext] Shared admission/precheck configuration. ```rust #[derive(Debug, Clone, Copy)] pub struct PrecheckContext<'a> { } ``` Source line: `40`. ## admission::PrecheckContext\<'a>::new [#admissionprecheckcontextanew] ```rust pub fn new(expected_chain_id: &'a str) -> Self; ``` Source line: `49`. ## admission::PrecheckContext\<'a>::unbound [#admissionprecheckcontextaunbound] ```rust pub fn unbound() -> Self; ``` Source line: `59`. ## admission::PrecheckContext\<'a>::with\_tx\_index [#admissionprecheckcontextawith_tx_index] ```rust pub fn with_tx_index(mut self, tx_index: u32) -> Self; ``` Source line: `69`. ## admission::PrecheckContext\<'a>::with\_max\_tx\_gas [#admissionprecheckcontextawith_max_tx_gas] ```rust pub fn with_max_tx_gas(mut self, max_tx_gas: u64) -> Self; ``` Source line: `74`. ## admission::PrecheckContext\<'a>::with\_min\_gas\_price [#admissionprecheckcontextawith_min_gas_price] ```rust pub fn with_min_gas_price(mut self, min_gas_price: u64) -> Self; ``` Source line: `79`. ## admission::PrecheckContext\<'a>::with\_nonce\_policy [#admissionprecheckcontextawith_nonce_policy] ```rust pub fn with_nonce_policy(mut self, nonce_policy: NoncePolicy) -> Self; ``` Source line: `84`. ## admission::AdmissionReject [#admissionadmissionreject] Detailed rejection object. The public `reason` is stable; the message keeps enough context for logs and JSON-RPC errors without leaking signature-oracle detail. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct AdmissionReject { } ``` Source line: `94`. ## admission::AdmissionReject::reason [#admissionadmissionrejectreason-1] ```rust pub fn reason(&self) -> AdmissionRejectReason; ``` Source line: `107`. ## admission::AdmissionReject::public\_message [#admissionadmissionrejectpublic_message] ```rust pub fn public_message(&self) -> &str; ``` Source line: `111`. ## admission::AdmissionReject::rpc\_error\_code [#admissionadmissionrejectrpc_error_code] ```rust pub fn rpc_error_code(&self) -> i32; ``` Source line: `115`. ## admission::AdmissionReject::into\_node\_error [#admissionadmissionrejectinto_node_error] ```rust pub fn into_node_error(self, partial_receipts: Vec) -> NodeError; ``` Source line: `122`. ## admission::precheck\_transaction [#admissionprecheck_transaction] Run the shared transaction admission checks. Passing `state` enables replay and nonce checks according to `ctx.nonce_policy`; passing `None` still checks chain ID, signature, signer policy, hashability, and gas bounds. ```rust pub fn precheck_transaction( tx: &SignedTransaction, state: Option<&dyn ExecutionState>, ctx: PrecheckContext<'_>, ) -> Result; ``` Source line: `398`. # sigil-node · bootstrap URL: https://docs.sigil.ml/reference/rust/sigil-node/bootstrap Markdown: https://docs.sigil.ml/reference/rust/sigil-node/bootstrap.md Source declarations, signatures and documentation for bootstrap. Source: `sigil/node/sigil-node/src/bootstrap.rs`. SHA-256: `fa906252ae8d8694d78527fe3e0afe8073601c6401cd2d64772a6fd8ec940ba0`. 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. ## bootstrap::is\_mainnet [#bootstrapis_mainnet] Returns `true` when `chain_id` identifies a mainnet deployment. The canonical convention is that every production chain ID begins with the prefix `"sigil-mainnet-"` (e.g. `"sigil-mainnet-1"`). Any other prefix — `"sigil-testnet-"`, `"sigil-devnet-"`, `"sigil-canary-"`, etc. — is treated as a non-production network where auto-generation is still permitted. Add new production chain IDs to the `MAINNET_PREFIXES` list below rather than changing the calling convention. ```rust pub fn is_mainnet(chain_id: &str) -> bool; ``` Source line: `40`. ## bootstrap::KeySource [#bootstrapkeysource] Describes how validator keys were obtained during this bootstrap run. `main.rs` logs this so operators and monitoring can immediately distinguish the three possible key origins. A mainnet node will never log any variant other than `PreProvisioned`. Implements `Default` (→ `None`) so that serde's `#[serde(skip)]` on `BootstrapResult::key_source` can reconstruct the field during deserialization without requiring `KeySource` to be serialized itself. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum KeySource { /// Keys were read from a pre-existing file (default path or /// `--validator-key-path`). This is the only source permitted on mainnet. PreProvisioned, /// Keys were freshly generated from a deterministic DID-derived seed. /// Only allowed on non-mainnet chains. A `tracing::warn` is emitted. TestnetAutoGenerated, /// No validator DID was supplied — this node is running in a non-validator /// mode (RPC, Archive, Light, Observer). #[default] None, } ``` Source line: `59`. ## bootstrap::ValidatorKeys [#bootstrapvalidatorkeys] Validator key material stored on disk. On mainnet these keys **must** be generated by a hardware security module or secure enclave and written to the data directory before node startup. See `docs/operator/validator-key-provisioning.md`. On testnet/devnet/canary networks the node may auto-generate deterministic keys from the validator DID for convenience, but a loud warning is emitted. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ValidatorKeys { /// Ed25519 consensus public key (hex-encoded, 64 hex chars = 32 bytes). pub consensus_pubkey: String, /// Ed25519 consensus secret key (hex-encoded, 128 hex chars = 64 bytes). /// NEVER log or transmit this value. pub consensus_secret: String, /// P2P network public key (hex-encoded). pub network_pubkey: String, /// P2P network secret key (hex-encoded). /// NEVER log or transmit this value. pub network_secret: String, /// OAS DID associated with this key set. pub validator_did: String, /// Tower attestation gossip listen address (e.g. "0.0.0.0:26660"). /// /// Sourced from `--tower-addr` CLI flag and stored here so /// `BlockEngine::new` can access it without needing `NodeConfig`. #[serde(default = "default_tower_addr")] pub tower_addr: String, /// Geographic region label for Tower committee diversity. /// /// Sourced from `--tower-region` CLI flag and stored here so /// `BlockEngine::new` can log the region when starting the Tower runtime. #[serde(default)] pub tower_region: Option } ``` Source line: `139`. ## bootstrap::InitialState [#bootstrapinitialstate] Initial state snapshot derived from the genesis configuration. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InitialState { /// Genesis state root hash (BLAKE3 of the serialized genesis config). pub state_root: SigilHash, /// Chain ID from the genesis config. pub chain_id: String, /// Genesis timestamp. pub genesis_time: u64, /// Number of initial validators. pub validator_count: usize, /// Total staked amount at genesis. pub total_stake: u64, /// Total initial balance supply. pub total_balance: u64, /// Protocol version at genesis. pub protocol_version: String } ``` Source line: `172`. ## bootstrap::SeedNode [#bootstrapseednode] Seed node entry for P2P bootstrap. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SeedNode { /// Multiaddr-style address (e.g., "/ip4/1.2.3.4/tcp/26656/p2p/PEER_ID"). pub address: String, /// Optional human-readable label. pub label: Option } ``` Source line: `191`. ## bootstrap::BootstrapResult [#bootstrapbootstrapresult] Bootstrap result containing all artifacts from node initialization. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BootstrapResult { /// Path to the data directory that was initialized. pub data_dir: String, /// The initial state derived from genesis. pub initial_state: InitialState, /// Validator keys if this node is a validator (None for RPC/observer nodes). pub validator_keys: Option, /// Whether the data directory was freshly created vs already existed. pub freshly_created: bool, /// How the validator keys were obtained. Used for startup logging and /// monitoring. On mainnet this must always be `KeySource::PreProvisioned`. #[serde(skip)] pub key_source: KeySource } ``` Source line: `200`. ## bootstrap::init\_data\_directory [#bootstrapinit_data_directory] Initialize the data directory structure for a Sigil node. Creates the following subdirectories under `data_dir`: * `akashakv/` — production block/index/query storage * `state/` — state trie storage * `keys/` — validator key material * `snapshots/` — state snapshots * `logs/` — structured logs * `wal/` — write-ahead log Returns `true` if the directory was freshly created, `false` if it already existed. ```rust pub fn init_data_directory(data_dir: &Path) -> Result; ``` Source line: `227`. ## bootstrap::derive\_initial\_state [#bootstrapderive_initial_state] Derive the initial state from a genesis configuration. This computes the state root, tallies initial stakes and balances, and returns a summary of the genesis state. ```rust pub fn derive_initial_state(genesis: &GenesisConfig) -> Result; ``` Source line: `294`. ## bootstrap::validate\_cli\_chain\_id\_matches\_genesis [#bootstrapvalidate_cli_chain_id_matches_genesis] Verify that the CLI-selected chain ID matches the loaded genesis. Startup must fail before any subsystem accepts, gossips, or executes transactions if the operator-selected chain ID is not the genesis chain ID. ```rust pub fn validate_cli_chain_id_matches_genesis( config_chain_id: &str, genesis: &GenesisConfig, ) -> Result<(), NodeError>; ``` Source line: `316`. ## bootstrap::validate\_expected\_genesis\_hash [#bootstrapvalidate_expected_genesis_hash] Verify an operator-supplied genesis hash before startup continues. Mainnet nodes must be started with an independently supplied hash so a bad ConfigMap mount or stale local file cannot silently select a different genesis. Non-mainnet nodes may omit the hash for developer ergonomics. ```rust pub fn validate_expected_genesis_hash( expected_hash: Option<&str>, genesis: &GenesisConfig, ) -> Result<(), NodeError>; ``` Source line: `334`. ## bootstrap::validate\_mainnet\_compute\_quorum [#bootstrapvalidate_mainnet_compute_quorum] ```rust #[cfg(feature = "compute")] pub fn validate_mainnet_compute_quorum(genesis: &GenesisConfig) -> Result<(), NodeError>; ``` Source line: `369`. ## bootstrap::generate\_testnet\_validator\_keys [#bootstrapgenerate_testnet_validator_keys] Generate deterministic validator keys for **testnet use only**. Derives real Ed25519 keypairs from a deterministic seed (BLAKE3 hash of the DID). This ensures the same DID always produces the same keypair, enabling reproducible testnet setups. **WARNING — NOT FOR PRODUCTION**: The derivation seed is computed from a public DID string, making it fully predictable to anyone who knows the DID. This function is **never called on mainnet** — \[`bootstrap_node`] enforces the fail-closed policy. Do not bypass that policy. For mainnet use an HSM-generated key or an offline-generated key file provisioned before node startup. ```rust pub fn generate_testnet_validator_keys(validator_did: &str) -> ValidatorKeys; ``` Source line: `415`. ## bootstrap::write\_validator\_keys [#bootstrapwrite_validator_keys] Write validator keys to the keys directory. The keys are stored as `keys/validator_keys.json` under the data directory. File permissions should be restricted to owner-only in production. ```rust pub fn write_validator_keys(data_dir: &Path, keys: &ValidatorKeys) -> Result; ``` Source line: `445`. ## bootstrap::read\_validator\_keys\_from [#bootstrapread_validator_keys_from] Read validator keys from a specific file path. Returns `None` if the file does not exist. ```rust pub fn read_validator_keys_from(path: &Path) -> Result, NodeError>; ``` Source line: `471`. ## bootstrap::read\_validator\_keys [#bootstrapread_validator_keys] Read validator keys from the default location inside `data_dir`. Returns `None` if the key file does not exist. ```rust pub fn read_validator_keys(data_dir: &Path) -> Result, NodeError>; ``` Source line: `496`. ## bootstrap::write\_initial\_state [#bootstrapwrite_initial_state] Write the initial state snapshot to the state directory. ```rust pub fn write_initial_state(data_dir: &Path, state: &InitialState) -> Result; ``` Source line: `502`. ## bootstrap::parse\_seed\_nodes [#bootstrapparse_seed_nodes] Parse a seed nodes file into a list of `SeedNode` entries. The file format is one address per line. Lines starting with `#` are comments. Empty lines are ignored. Lines may optionally end with ` # label` to provide a human-readable label. ```rust pub fn parse_seed_nodes(content: &str) -> Vec; ``` Source line: `530`. ## bootstrap::bootstrap\_node [#bootstrapbootstrap_node] Full bootstrap procedure: initialize data dir, derive state, load or (testnet-only) auto-generate keys, and write everything to disk. # Arguments [#arguments] * `data_dir` — Root data directory for this node. * `genesis` — The validated genesis configuration. * `validator_did` — If set, this node acts as a validator for the given DID. * `validator_key_path` — When `Some`, read keys from this explicit path instead of `/keys/validator_keys.json`. Useful for HSM-backed FUSE mounts or sealed volumes. # Mainnet fail-closed policy [#mainnet-fail-closed-policy] When `genesis.chain_id` starts with `"sigil-mainnet-"`: * If `validator_did` is `Some` and no key file exists at the expected path, the function returns \[`NodeError::ProductionKeyMissing`] and the node refuses to start. * Auto-generation via \[`generate_testnet_validator_keys`] is **never called** on mainnet regardless of any flags. # Testnet / devnet behaviour [#testnet--devnet-behaviour] On non-mainnet chains, if no key file is found the node auto-generates deterministic keys and writes them to `/keys/validator_keys.json`. A `tracing::warn` is always emitted so the auto-generated origin is visible in logs and monitoring. ```rust pub fn bootstrap_node( data_dir: &Path, genesis: &GenesisConfig, validator_did: Option<&str>, validator_key_path: Option<&Path>, ) -> Result; ``` Source line: `583`. # sigil-node · compute_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/compute_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/compute_durable.md Source declarations, signatures and documentation for compute_durable. Source: `sigil/node/sigil-node/src/compute_durable.rs`. SHA-256: `437021897c9eb2d2d32ce2847faeec14accea136edca2bf1de537c06e0707126`. 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. Module condition: ```rust #[cfg(feature = "compute")] ``` ## compute\_durable::PREFIX\_VIGIL\_SUB [#compute_durableprefix_vigil_sub] Reserved durable-state prefix for Vigils subscriptions. ```rust #[cfg(feature = "compute")] pub const PREFIX_VIGIL_SUB: &[u8]; ``` Source line: `78`. ## compute\_durable::PREFIX\_VIGIL\_INGESTOR [#compute_durableprefix_vigil_ingestor] Reserved durable-state prefix for Vigils ingestors. ```rust #[cfg(feature = "compute")] pub const PREFIX_VIGIL_INGESTOR: &[u8]; ``` Source line: `80`. ## compute\_durable::PREFIX\_VIGIL\_DELIVERY [#compute_durableprefix_vigil_delivery] Reserved durable-state prefix for Vigils delivery records. ```rust #[cfg(feature = "compute")] pub const PREFIX_VIGIL_DELIVERY: &[u8]; ``` Source line: `82`. ## compute\_durable::PREFIX\_VIGIL\_CALLBACK [#compute_durableprefix_vigil_callback] Reserved durable-state prefix for scheduled Vigils callbacks. ```rust #[cfg(feature = "compute")] pub const PREFIX_VIGIL_CALLBACK: &[u8]; ``` Source line: `84`. ## compute\_durable::DurableComputeStore [#compute_durabledurablecomputestore] Durable compute marketplace store backed by AkashaKV. ```rust #[cfg(feature = "compute")] pub struct DurableComputeStore { } ``` Source line: `176`. ## compute\_durable::DurableComputeStore::open [#compute_durabledurablecomputestoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the compute marketplace. ```rust #[cfg(feature = "compute")] pub fn open(path: &Path) -> Result; ``` Source line: `190`. ## compute\_durable::DurableComputeStore::put\_provider [#compute_durabledurablecomputestoreput_provider] ```rust #[cfg(feature = "compute")] pub fn put_provider(&self, p: &ComputeProvider) -> Result<(), NodeError>; ``` Source line: `279`. ## compute\_durable::DurableComputeStore::get\_provider [#compute_durabledurablecomputestoreget_provider] ```rust #[cfg(feature = "compute")] pub fn get_provider(&self, did: &str) -> Result, NodeError>; ``` Source line: `285`. ## compute\_durable::DurableComputeStore::list\_providers [#compute_durabledurablecomputestorelist_providers] ```rust #[cfg(feature = "compute")] pub fn list_providers(&self) -> Result, NodeError>; ``` Source line: `293`. ## compute\_durable::DurableComputeStore::put\_escrow [#compute_durabledurablecomputestoreput_escrow] ```rust #[cfg(feature = "compute")] pub fn put_escrow(&self, e: &ComputeEscrow) -> Result<(), NodeError>; ``` Source line: `305`. ## compute\_durable::DurableComputeStore::get\_escrow [#compute_durabledurablecomputestoreget_escrow] ```rust #[cfg(feature = "compute")] pub fn get_escrow(&self, owner: &str) -> Result, NodeError>; ``` Source line: `311`. ## compute\_durable::DurableComputeStore::list\_escrows [#compute_durabledurablecomputestorelist_escrows] ```rust #[cfg(feature = "compute")] pub fn list_escrows(&self) -> Result, NodeError>; ``` Source line: `319`. ## compute\_durable::DurableComputeStore::put\_job [#compute_durabledurablecomputestoreput_job] ```rust #[cfg(feature = "compute")] pub fn put_job(&self, j: &ComputeJob) -> Result<(), NodeError>; ``` Source line: `331`. ## compute\_durable::DurableComputeStore::get\_job [#compute_durabledurablecomputestoreget_job] ```rust #[cfg(feature = "compute")] pub fn get_job(&self, id: &str) -> Result, NodeError>; ``` Source line: `337`. ## compute\_durable::DurableComputeStore::list\_jobs [#compute_durabledurablecomputestorelist_jobs] ```rust #[cfg(feature = "compute")] pub fn list_jobs(&self, filter: &JobIndexFilter) -> Result, NodeError>; ``` Source line: `345`. ## compute\_durable::DurableComputeStore::put\_receipt [#compute_durabledurablecomputestoreput_receipt] ```rust #[cfg(feature = "compute")] pub fn put_receipt(&self, r: &ComputeReceiptRecord) -> Result<(), NodeError>; ``` Source line: `369`. ## compute\_durable::DurableComputeStore::get\_receipt [#compute_durabledurablecomputestoreget_receipt] ```rust #[cfg(feature = "compute")] pub fn get_receipt(&self, id: &str) -> Result, NodeError>; ``` Source line: `382`. ## compute\_durable::DurableComputeStore::list\_receipts [#compute_durabledurablecomputestorelist_receipts] ```rust #[cfg(feature = "compute")] pub fn list_receipts(&self) -> Result, NodeError>; ``` Source line: `390`. ## compute\_durable::DurableComputeStore::list\_settled\_ids [#compute_durabledurablecomputestorelist_settled_ids] ```rust #[cfg(feature = "compute")] pub fn list_settled_ids(&self) -> Result, NodeError>; ``` Source line: `400`. ## compute\_durable::DurableComputeStore::is\_settled [#compute_durabledurablecomputestoreis_settled] ```rust #[cfg(feature = "compute")] pub fn is_settled(&self, id: &str) -> Result; ``` Source line: `411`. ## compute\_durable::DurableComputeStore::is\_tuple\_settled [#compute_durabledurablecomputestoreis_tuple_settled] ```rust #[cfg(feature = "compute")] pub fn is_tuple_settled( &self, receipt_id: &str, job_id: &str, task_id: Option<&str>, ) -> Result; ``` Source line: `415`. ## compute\_durable::DurableComputeStore::put\_challenge [#compute_durabledurablecomputestoreput_challenge] ```rust #[cfg(feature = "compute")] pub fn put_challenge(&self, c: &ComputeChallenge) -> Result<(), NodeError>; ``` Source line: `427`. ## compute\_durable::DurableComputeStore::get\_challenge [#compute_durabledurablecomputestoreget_challenge] ```rust #[cfg(feature = "compute")] pub fn get_challenge(&self, id: &str) -> Result, NodeError>; ``` Source line: `438`. ## compute\_durable::DurableComputeStore::list\_challenges [#compute_durabledurablecomputestorelist_challenges] ```rust #[cfg(feature = "compute")] pub fn list_challenges(&self) -> Result, NodeError>; ``` Source line: `446`. ## compute\_durable::DurableComputeStore::list\_challenges\_by\_receipt [#compute_durabledurablecomputestorelist_challenges_by_receipt] ```rust #[cfg(feature = "compute")] pub fn list_challenges_by_receipt( &self, receipt_id: &str, ) -> Result, NodeError>; ``` Source line: `456`. ## compute\_durable::DurableComputeStore::append\_audit [#compute_durabledurablecomputestoreappend_audit] ```rust #[cfg(feature = "compute")] pub fn append_audit(&self, mut event: ComputeAuditEvent) -> Result; ``` Source line: `480`. ## compute\_durable::DurableComputeStore::list\_audit [#compute_durabledurablecomputestorelist_audit] ```rust #[cfg(feature = "compute")] pub fn list_audit(&self, query: &AuditQuery) -> Result, NodeError>; ``` Source line: `499`. ## compute\_durable::DurableComputeStore::append\_reputation [#compute_durabledurablecomputestoreappend_reputation] ```rust #[cfg(feature = "compute")] pub fn append_reputation(&self, sig: &ComputeReputationSignal) -> Result<(), NodeError>; ``` Source line: `526`. ## compute\_durable::DurableComputeStore::list\_reputation [#compute_durabledurablecomputestorelist_reputation] ```rust #[cfg(feature = "compute")] pub fn list_reputation( &self, provider_did: &str, ) -> Result, NodeError>; ``` Source line: `537`. ## compute\_durable::DurableComputeStore::list\_all\_reputation [#compute_durabledurablecomputestorelist_all_reputation] ```rust #[cfg(feature = "compute")] pub fn list_all_reputation( &self, ) -> Result>, NodeError>; ``` Source line: `552`. ## compute\_durable::DurableComputeStore::put\_maca\_claim [#compute_durabledurablecomputestoreput_maca_claim] ```rust #[cfg(feature = "compute")] pub fn put_maca_claim(&self, c: &MacaWorkClaim) -> Result<(), NodeError>; ``` Source line: `570`. ## compute\_durable::DurableComputeStore::get\_maca\_claim [#compute_durabledurablecomputestoreget_maca_claim] ```rust #[cfg(feature = "compute")] pub fn get_maca_claim(&self, work_id: &SigilHash) -> Result, NodeError>; ``` Source line: `575`. ## compute\_durable::DurableComputeStore::list\_maca\_claims [#compute_durabledurablecomputestorelist_maca_claims] ```rust #[cfg(feature = "compute")] pub fn list_maca_claims(&self) -> Result, NodeError>; ``` Source line: `583`. ## compute\_durable::DurableComputeStore::put\_maca\_validation [#compute_durabledurablecomputestoreput_maca_validation] ```rust #[cfg(feature = "compute")] pub fn put_maca_validation(&self, record: &MacaValidationRecord) -> Result<(), NodeError>; ``` Source line: `593`. ## compute\_durable::DurableComputeStore::list\_maca\_validations [#compute_durabledurablecomputestorelist_maca_validations] ```rust #[cfg(feature = "compute")] pub fn list_maca_validations( &self, work_id: &SigilHash, ) -> Result, NodeError>; ``` Source line: `603`. ## compute\_durable::DurableComputeStore::list\_all\_maca\_validations [#compute_durabledurablecomputestorelist_all_maca_validations] ```rust #[cfg(feature = "compute")] pub fn list_all_maca_validations(&self) -> Result, NodeError>; ``` Source line: `618`. ## compute\_durable::DurableComputeStore::put\_balance [#compute_durabledurablecomputestoreput_balance] ```rust #[cfg(feature = "compute")] pub fn put_balance(&self, did: &str, amount: u64) -> Result<(), NodeError>; ``` Source line: `645`. ## compute\_durable::DurableComputeStore::get\_balance [#compute_durabledurablecomputestoreget_balance] ```rust #[cfg(feature = "compute")] pub fn get_balance(&self, did: &str) -> Result, NodeError>; ``` Source line: `649`. ## compute\_durable::DurableComputeStore::list\_balances [#compute_durabledurablecomputestorelist_balances] ```rust #[cfg(feature = "compute")] pub fn list_balances(&self) -> Result, NodeError>; ``` Source line: `660`. ## compute\_durable::DurableComputeStore::put\_identity [#compute_durabledurablecomputestoreput_identity] ```rust #[cfg(feature = "compute")] pub fn put_identity(&self, did: &str, document: &serde_json::Value) -> Result<(), NodeError>; ``` Source line: `677`. ## compute\_durable::DurableComputeStore::get\_identity [#compute_durabledurablecomputestoreget_identity] ```rust #[cfg(feature = "compute")] pub fn get_identity(&self, did: &str) -> Result, NodeError>; ``` Source line: `681`. ## compute\_durable::DurableComputeStore::list\_identities [#compute_durabledurablecomputestorelist_identities] ```rust #[cfg(feature = "compute")] pub fn list_identities(&self) -> Result, NodeError>; ``` Source line: `700`. ## compute\_durable::DurableComputeStore::put\_vigil\_subscription [#compute_durabledurablecomputestoreput_vigil_subscription] ```rust #[cfg(feature = "compute")] pub fn put_vigil_subscription( &self, subscription: &sigil_core::vigil::VigilSubscription, ) -> Result<(), NodeError>; ``` Source line: `719`. ## compute\_durable::DurableComputeStore::get\_vigil\_subscription [#compute_durabledurablecomputestoreget_vigil_subscription] ```rust #[cfg(feature = "compute")] pub fn get_vigil_subscription( &self, subscription_id: &SigilHash, ) -> Result, NodeError>; ``` Source line: `729`. ## compute\_durable::DurableComputeStore::list\_vigil\_subscriptions [#compute_durabledurablecomputestorelist_vigil_subscriptions] ```rust #[cfg(feature = "compute")] pub fn list_vigil_subscriptions( &self, subscriber_did: Option<&str>, limit: u32, ) -> Result, NodeError>; ``` Source line: `739`. ## compute\_durable::DurableComputeStore::put\_vigil\_ingestor [#compute_durabledurablecomputestoreput_vigil_ingestor] ```rust #[cfg(feature = "compute")] pub fn put_vigil_ingestor( &self, ingestor: &sigil_core::vigil::Ingestor, ) -> Result<(), NodeError>; ``` Source line: `756`. ## compute\_durable::DurableComputeStore::get\_vigil\_ingestor [#compute_durabledurablecomputestoreget_vigil_ingestor] ```rust #[cfg(feature = "compute")] pub fn get_vigil_ingestor( &self, ingestor_did: &str, ) -> Result, NodeError>; ``` Source line: `766`. ## compute\_durable::DurableComputeStore::list\_vigil\_ingestors [#compute_durabledurablecomputestorelist_vigil_ingestors] ```rust #[cfg(feature = "compute")] pub fn list_vigil_ingestors(&self) -> Result, NodeError>; ``` Source line: `776`. ## compute\_durable::DurableComputeStore::put\_vigil\_delivery [#compute_durabledurablecomputestoreput_vigil_delivery] ```rust #[cfg(feature = "compute")] pub fn put_vigil_delivery( &self, record: &sigil_core::vigil::VigilDeliveryRecord, ) -> Result<(), NodeError>; ``` Source line: `785`. ## compute\_durable::DurableComputeStore::has\_vigil\_delivery [#compute_durabledurablecomputestorehas_vigil_delivery] ```rust #[cfg(feature = "compute")] pub fn has_vigil_delivery( &self, subscription_id: &SigilHash, event_id: &SigilHash, ) -> Result; ``` Source line: `799`. ## compute\_durable::DurableComputeStore::list\_vigil\_delivery\_history [#compute_durabledurablecomputestorelist_vigil_delivery_history] ```rust #[cfg(feature = "compute")] pub fn list_vigil_delivery_history( &self, subscription_id: &SigilHash, limit: u32, ) -> Result, NodeError>; ``` Source line: `811`. ## compute\_durable::DurableComputeStore::list\_all\_vigil\_deliveries [#compute_durabledurablecomputestorelist_all_vigil_deliveries] ```rust #[cfg(feature = "compute")] pub fn list_all_vigil_deliveries( &self, ) -> Result, NodeError>; ``` Source line: `832`. ## compute\_durable::DurableComputeStore::schedule\_vigil\_callback [#compute_durabledurablecomputestoreschedule_vigil_callback] ```rust #[cfg(feature = "compute")] pub fn schedule_vigil_callback( &self, callback: &sigil_core::vigil::ScheduledVigilCallback, ) -> Result<(), NodeError>; ``` Source line: `858`. ## compute\_durable::DurableComputeStore::list\_vigil\_callbacks [#compute_durabledurablecomputestorelist_vigil_callbacks] ```rust #[cfg(feature = "compute")] pub fn list_vigil_callbacks( &self, ) -> Result, NodeError>; ``` Source line: `865`. ## compute\_durable::DurableComputeStore::drain\_vigil\_callbacks\_for\_height [#compute_durabledurablecomputestoredrain_vigil_callbacks_for_height] ```rust #[cfg(feature = "compute")] pub fn drain_vigil_callbacks_for_height( &self, height: u64, limit: u32, ) -> Result, NodeError>; ``` Source line: `881`. ## compute\_durable::DurableComputeStore::put\_validator\_record [#compute_durabledurablecomputestoreput_validator_record] ```rust #[cfg(feature = "compute")] pub fn put_validator_record( &self, record: &crate::executor::ValidatorRecord, ) -> Result<(), NodeError>; ``` Source line: `915`. ## compute\_durable::DurableComputeStore::get\_validator\_record [#compute_durabledurablecomputestoreget_validator_record] ```rust #[cfg(feature = "compute")] pub fn get_validator_record( &self, did: &str, ) -> Result, NodeError>; ``` Source line: `922`. ## compute\_durable::DurableComputeStore::list\_validator\_records [#compute_durabledurablecomputestorelist_validator_records] ```rust #[cfg(feature = "compute")] pub fn list_validator_records( &self, ) -> Result, NodeError>; ``` Source line: `947`. ## compute\_durable::DurableComputeStore::put\_delegation\_shares [#compute_durabledurablecomputestoreput_delegation_shares] ```rust #[cfg(feature = "compute")] pub fn put_delegation_shares( &self, delegator: &str, validator: &str, shares: u64, ) -> Result<(), NodeError>; ``` Source line: `956`. ## compute\_durable::DurableComputeStore::get\_delegation\_shares [#compute_durabledurablecomputestoreget_delegation_shares] ```rust #[cfg(feature = "compute")] pub fn get_delegation_shares( &self, delegator: &str, validator: &str, ) -> Result, NodeError>; ``` Source line: `972`. ## compute\_durable::DurableComputeStore::list\_delegations\_for\_delegator [#compute_durabledurablecomputestorelist_delegations_for_delegator] ```rust #[cfg(feature = "compute")] pub fn list_delegations_for_delegator( &self, delegator: &str, ) -> Result, NodeError>; ``` Source line: `991`. ## compute\_durable::DurableComputeStore::list\_delegations [#compute_durabledurablecomputestorelist_delegations] ```rust #[cfg(feature = "compute")] pub fn list_delegations(&self) -> Result, NodeError>; ``` Source line: `1018`. ## compute\_durable::DurableComputeStore::put\_delegation\_unbonding [#compute_durabledurablecomputestoreput_delegation_unbonding] ```rust #[cfg(feature = "compute")] pub fn put_delegation_unbonding( &self, delegator: &str, validator: &str, claim: &crate::executor::DelegationUnbonding, ) -> Result<(), NodeError>; ``` Source line: `1051`. ## compute\_durable::DurableComputeStore::get\_delegation\_unbonding [#compute_durabledurablecomputestoreget_delegation_unbonding] ```rust #[cfg(feature = "compute")] pub fn get_delegation_unbonding( &self, delegator: &str, validator: &str, ) -> Result, NodeError>; ``` Source line: `1067`. ## compute\_durable::DurableComputeStore::clear\_delegation\_unbonding [#compute_durabledurablecomputestoreclear_delegation_unbonding] ```rust #[cfg(feature = "compute")] pub fn clear_delegation_unbonding( &self, delegator: &str, validator: &str, ) -> Result<(), NodeError>; ``` Source line: `1081`. ## compute\_durable::DurableComputeStore::put\_nonce [#compute_durabledurablecomputestoreput_nonce] ```rust #[cfg(feature = "compute")] pub fn put_nonce(&self, did: &str, nonce: u64) -> Result<(), NodeError>; ``` Source line: `1101`. ## compute\_durable::DurableComputeStore::get\_nonce [#compute_durabledurablecomputestoreget_nonce] ```rust #[cfg(feature = "compute")] pub fn get_nonce(&self, did: &str) -> Result, NodeError>; ``` Source line: `1105`. ## compute\_durable::DurableComputeStore::list\_nonces [#compute_durabledurablecomputestorelist_nonces] ```rust #[cfg(feature = "compute")] pub fn list_nonces(&self) -> Result, NodeError>; ``` Source line: `1116`. ## compute\_durable::DurableComputeStore::mark\_tx\_included [#compute_durabledurablecomputestoremark_tx_included] Record `tx_hash` as included at `block_height`. Idempotent: writing the same hash twice is harmless because the value encodes the originating block height; the lookup path only inspects presence. ```rust #[cfg(feature = "compute")] pub fn mark_tx_included(&self, tx_hash: &[u8; 32], block_height: u64) -> Result<(), NodeError>; ``` Source line: `1145`. ## compute\_durable::DurableComputeStore::has\_tx\_included [#compute_durabledurablecomputestorehas_tx_included] Check whether `tx_hash` has been durably recorded as included. ```rust #[cfg(feature = "compute")] pub fn has_tx_included(&self, tx_hash: &[u8; 32]) -> Result; ``` Source line: `1151`. ## compute\_durable::DurableComputeStore::get\_tx\_included\_height [#compute_durabledurablecomputestoreget_tx_included_height] Return the block height at which `tx_hash` was recorded, if any. ```rust #[cfg(feature = "compute")] pub fn get_tx_included_height(&self, tx_hash: &[u8; 32]) -> Result, NodeError>; ``` Source line: `1156`. ## compute\_durable::DurableComputeStore::list\_tx\_included [#compute_durabledurablecomputestorelist_tx_included] ```rust #[cfg(feature = "compute")] pub fn list_tx_included(&self) -> Result, NodeError>; ``` Source line: `1167`. ## compute\_durable::DurableComputeStore::put\_clock [#compute_durabledurablecomputestoreput_clock] ```rust #[cfg(feature = "compute")] pub fn put_clock(&self, epoch: u64, height: u64) -> Result<(), NodeError>; ``` Source line: `1189`. ## compute\_durable::DurableComputeStore::get\_clock [#compute_durabledurablecomputestoreget_clock] ```rust #[cfg(feature = "compute")] pub fn get_clock(&self) -> Result<(u64, u64), NodeError>; ``` Source line: `1196`. ## compute\_durable::DurableComputeStore::put\_policy [#compute_durabledurablecomputestoreput_policy] ```rust #[cfg(feature = "compute")] pub fn put_policy(&self, policy: &ComputePolicy) -> Result<(), NodeError>; ``` Source line: `1209`. ## compute\_durable::DurableComputeStore::get\_policy [#compute_durabledurablecomputestoreget_policy] ```rust #[cfg(feature = "compute")] pub fn get_policy(&self) -> Result, NodeError>; ``` Source line: `1213`. ## compute\_durable::DurableComputeStore::put\_validator\_agent [#compute_durabledurablecomputestoreput_validator_agent] ```rust #[cfg(feature = "compute")] pub fn put_validator_agent(&self, r: &ValidatorAgentRecord) -> Result<(), NodeError>; ``` Source line: `1222`. ## compute\_durable::DurableComputeStore::get\_validator\_agent [#compute_durabledurablecomputestoreget_validator_agent] ```rust #[cfg(feature = "compute")] pub fn get_validator_agent( &self, agent_did: &str, ) -> Result, NodeError>; ``` Source line: `1228`. ## compute\_durable::DurableComputeStore::list\_validator\_agents [#compute_durabledurablecomputestorelist_validator_agents] ```rust #[cfg(feature = "compute")] pub fn list_validator_agents(&self) -> Result, NodeError>; ``` Source line: `1238`. ## compute\_durable::DurableComputeStore::put\_beacon [#compute_durabledurablecomputestoreput_beacon] ```rust #[cfg(feature = "compute")] pub fn put_beacon(&self, r: &BeaconRecord) -> Result<(), NodeError>; ``` Source line: `1248`. ## compute\_durable::DurableComputeStore::get\_beacon [#compute_durabledurablecomputestoreget_beacon] ```rust #[cfg(feature = "compute")] pub fn get_beacon(&self, epoch_id: u64) -> Result, NodeError>; ``` Source line: `1254`. ## compute\_durable::DurableComputeStore::put\_maca\_epoch [#compute_durabledurablecomputestoreput_maca_epoch] ```rust #[cfg(feature = "compute")] pub fn put_maca_epoch(&self, e: &MacaEpoch) -> Result<(), NodeError>; ``` Source line: `1261`. ## compute\_durable::DurableComputeStore::get\_maca\_epoch [#compute_durabledurablecomputestoreget_maca_epoch] ```rust #[cfg(feature = "compute")] pub fn get_maca_epoch(&self, epoch_id: u64) -> Result, NodeError>; ``` Source line: `1267`. ## compute\_durable::DurableComputeStore::list\_maca\_epochs [#compute_durabledurablecomputestorelist_maca_epochs] ```rust #[cfg(feature = "compute")] pub fn list_maca_epochs(&self, query: &EpochQuery) -> Result, NodeError>; ``` Source line: `1274`. ## compute\_durable::DurableComputeStore::put\_epoch\_attestation [#compute_durabledurablecomputestoreput_epoch_attestation] Append an attestation to the per-epoch index. Stored under `compute/epoch_att///`. ```rust #[cfg(feature = "compute")] pub fn put_epoch_attestation( &self, record: &MacaValidationRecord, epoch_id: u64, ) -> Result<(), NodeError>; ``` Source line: `1292`. ## compute\_durable::DurableComputeStore::list\_epoch\_attestations [#compute_durabledurablecomputestorelist_epoch_attestations] ```rust #[cfg(feature = "compute")] pub fn list_epoch_attestations( &self, epoch_id: u64, work_id: &SigilHash, ) -> Result, NodeError>; ``` Source line: `1310`. ## compute\_durable::DurableComputeStore::put\_quorum\_proof [#compute_durabledurablecomputestoreput_quorum_proof] ```rust #[cfg(feature = "compute")] pub fn put_quorum_proof(&self, p: &MacaQuorumProof) -> Result<(), NodeError>; ``` Source line: `1329`. ## compute\_durable::DurableComputeStore::get\_quorum\_proof [#compute_durabledurablecomputestoreget_quorum_proof] ```rust #[cfg(feature = "compute")] pub fn get_quorum_proof( &self, epoch_id: u64, work_id: &SigilHash, ) -> Result, NodeError>; ``` Source line: `1339`. ## compute\_durable::DurableComputeStore::list\_quorum\_proofs [#compute_durabledurablecomputestorelist_quorum_proofs] ```rust #[cfg(feature = "compute")] pub fn list_quorum_proofs(&self, epoch_id: u64) -> Result, NodeError>; ``` Source line: `1355`. ## compute\_durable::DurableComputeStore::flush [#compute_durabledurablecomputestoreflush] Force a flush of the underlying AkashaKV memtables to SSTables. Useful in tests that drop and reopen the store at the same path to verify durability without waiting for the background flush. ```rust #[cfg(feature = "compute")] pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `1371`. ## compute\_durable::DurableComputeStore::close [#compute_durabledurablecomputestoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust #[cfg(feature = "compute")] pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `1378`. ## compute\_durable::DurableComputeStore::namespace\_prefix [#compute_durabledurablecomputestorenamespace_prefix] Test helper: return the namespace prefix used by every compute key so callers can co-locate other data under different roots without risk of collision. ```rust #[cfg(feature = "compute")] pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `1387`. ## compute\_durable::DurableComputeStore::commit\_batch [#compute_durabledurablecomputestorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails (encoding error or storage error) the transaction is dropped (auto-aborted via `Drop`) before it can be committed, leaving zero partial state visible. Either every operation in the batch lands or none of them do. This is the only write path that compute transaction handlers should use after the handler has finished its read-only checks. ```rust #[cfg(feature = "compute")] pub fn commit_batch(&self, batch: &ComputeWriteBatch) -> Result<(), NodeError>; ``` Source line: `1403`. ## compute\_durable::ArcStore [#compute_durablearcstore] ```rust #[cfg(feature = "compute")] pub type ArcStore = Arc; ``` Source line: `1595`. ## compute\_durable::ComputeBatchOp [#compute_durablecomputebatchop] An individual operation inside a \[`ComputeWriteBatch`]. Cloning is derived from the inner state types which already implement `Clone`. ```rust #[cfg(feature = "compute")] #[derive(Clone)] pub enum ComputeBatchOp { PutProvider(ComputeProvider), PutEscrow(ComputeEscrow), PutJob(ComputeJob), /// Puts both the receipt record and the settled-marker in one atomic op. PutReceipt(ComputeReceiptRecord), PutChallenge(ComputeChallenge), AppendAudit(ComputeAuditEvent), AppendReputation(ComputeReputationSignal), PutMacaWorkClaim(MacaWorkClaim), PutMacaValidationRecord(MacaValidationRecord), PutBalance(String, u64), PutClock(u64, u64), PutPolicy(ComputePolicy), PutValidatorAgent(ValidatorAgentRecord), PutBeacon(BeaconRecord), PutMacaEpoch(MacaEpoch), PutQuorumProof(MacaQuorumProof), } ``` Source line: `1606`. ## compute\_durable::ComputeWriteBatch [#compute_durablecomputewritebatch] Write batch accumulating all mutations for a single compute executor handler. Commit the batch via \[`crate::executor::ExecutionState::commit_compute_tx`] at the end of the handler to apply all mutations atomically. ```rust #[cfg(feature = "compute")] #[derive(Default)] pub struct ComputeWriteBatch { } ``` Source line: `1630`. ## compute\_durable::ComputeWriteBatch::new [#compute_durablecomputewritebatchnew] Create an empty write batch. ```rust #[cfg(feature = "compute")] pub fn new() -> Self; ``` Source line: `1636`. ## compute\_durable::ComputeWriteBatch::put\_provider [#compute_durablecomputewritebatchput_provider] ```rust #[cfg(feature = "compute")] pub fn put_provider(&mut self, p: ComputeProvider); ``` Source line: `1640`. ## compute\_durable::ComputeWriteBatch::put\_escrow [#compute_durablecomputewritebatchput_escrow] ```rust #[cfg(feature = "compute")] pub fn put_escrow(&mut self, e: ComputeEscrow); ``` Source line: `1644`. ## compute\_durable::ComputeWriteBatch::put\_job [#compute_durablecomputewritebatchput_job] ```rust #[cfg(feature = "compute")] pub fn put_job(&mut self, j: ComputeJob); ``` Source line: `1648`. ## compute\_durable::ComputeWriteBatch::put\_receipt [#compute_durablecomputewritebatchput_receipt] Put a receipt record and its settled marker atomically. ```rust #[cfg(feature = "compute")] pub fn put_receipt(&mut self, r: ComputeReceiptRecord); ``` Source line: `1653`. ## compute\_durable::ComputeWriteBatch::put\_challenge [#compute_durablecomputewritebatchput_challenge] ```rust #[cfg(feature = "compute")] pub fn put_challenge(&mut self, c: ComputeChallenge); ``` Source line: `1657`. ## compute\_durable::ComputeWriteBatch::append\_audit [#compute_durablecomputewritebatchappend_audit] ```rust #[cfg(feature = "compute")] pub fn append_audit(&mut self, ev: ComputeAuditEvent); ``` Source line: `1661`. ## compute\_durable::ComputeWriteBatch::append\_reputation [#compute_durablecomputewritebatchappend_reputation] ```rust #[cfg(feature = "compute")] pub fn append_reputation(&mut self, sig: ComputeReputationSignal); ``` Source line: `1665`. ## compute\_durable::ComputeWriteBatch::put\_maca\_work\_claim [#compute_durablecomputewritebatchput_maca_work_claim] ```rust #[cfg(feature = "compute")] pub fn put_maca_work_claim(&mut self, c: MacaWorkClaim); ``` Source line: `1669`. ## compute\_durable::ComputeWriteBatch::put\_maca\_validation\_record [#compute_durablecomputewritebatchput_maca_validation_record] ```rust #[cfg(feature = "compute")] pub fn put_maca_validation_record(&mut self, r: MacaValidationRecord); ``` Source line: `1673`. ## compute\_durable::ComputeWriteBatch::put\_balance [#compute_durablecomputewritebatchput_balance] ```rust #[cfg(feature = "compute")] pub fn put_balance(&mut self, did: String, amount: u64); ``` Source line: `1677`. ## compute\_durable::ComputeWriteBatch::put\_clock [#compute_durablecomputewritebatchput_clock] ```rust #[cfg(feature = "compute")] pub fn put_clock(&mut self, epoch: u64, height: u64); ``` Source line: `1681`. ## compute\_durable::ComputeWriteBatch::put\_policy [#compute_durablecomputewritebatchput_policy] ```rust #[cfg(feature = "compute")] pub fn put_policy(&mut self, policy: ComputePolicy); ``` Source line: `1685`. ## compute\_durable::ComputeWriteBatch::put\_validator\_agent [#compute_durablecomputewritebatchput_validator_agent] ```rust #[cfg(feature = "compute")] pub fn put_validator_agent(&mut self, r: ValidatorAgentRecord); ``` Source line: `1689`. ## compute\_durable::ComputeWriteBatch::put\_beacon [#compute_durablecomputewritebatchput_beacon] ```rust #[cfg(feature = "compute")] pub fn put_beacon(&mut self, r: BeaconRecord); ``` Source line: `1693`. ## compute\_durable::ComputeWriteBatch::put\_maca\_epoch [#compute_durablecomputewritebatchput_maca_epoch] ```rust #[cfg(feature = "compute")] pub fn put_maca_epoch(&mut self, e: MacaEpoch); ``` Source line: `1697`. ## compute\_durable::ComputeWriteBatch::put\_quorum\_proof [#compute_durablecomputewritebatchput_quorum_proof] ```rust #[cfg(feature = "compute")] pub fn put_quorum_proof(&mut self, p: MacaQuorumProof); ``` Source line: `1701`. ## compute\_durable::ComputeWriteBatch::len [#compute_durablecomputewritebatchlen] Number of operations queued in this batch. ```rust #[cfg(feature = "compute")] pub fn len(&self) -> usize; ``` Source line: `1706`. ## compute\_durable::ComputeWriteBatch::is\_empty [#compute_durablecomputewritebatchis_empty] Returns `true` if no operations have been queued. ```rust #[cfg(feature = "compute")] pub fn is_empty(&self) -> bool; ``` Source line: `1711`. ## compute\_durable::ComputeWriteBatch::into\_ops [#compute_durablecomputewritebatchinto_ops] Consume the batch and return the inner op list. Used by the in-memory `MemoryExecutionState::commit_compute_tx` path to iterate ops without an extra clone. ```rust #[cfg(feature = "compute")] pub fn into_ops(self) -> Vec; ``` Source line: `1719`. # sigil-node · compute_state URL: https://docs.sigil.ml/reference/rust/sigil-node/compute_state Markdown: https://docs.sigil.ml/reference/rust/sigil-node/compute_state.md Source declarations, signatures and documentation for compute_state. Source: `sigil/node/sigil-node/src/compute_state.rs`. SHA-256: `4d3972f1807f71d929091f0a1bb937a72d80d993b28821996f64b4250188d5c0`. 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. Module condition: ```rust #[cfg(feature = "compute")] ``` ## compute\_state::receipt\_settlement\_tuple\_key [#compute_statereceipt_settlement_tuple_key] ```rust #[cfg(feature = "compute")] pub fn receipt_settlement_tuple_key( receipt_id: &str, job_id: &str, task_id: Option<&str>, ) -> String; ``` Source line: `17`. ## compute\_state::ProviderTier [#compute_stateprovidertier] Provider stake tier — copy of arise-bridge's ProviderTier on-chain. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ProviderTier { Consumer, Professional, Enterprise, Cluster, } ``` Source line: `32`. ## compute\_state::ProviderTier::min\_stake [#compute_stateprovidertiermin_stake] ```rust #[cfg(feature = "compute")] pub fn min_stake(self) -> u64; ``` Source line: `40`. ## compute\_state::ProviderTier::from\_stake [#compute_stateprovidertierfrom_stake] ```rust #[cfg(feature = "compute")] pub fn from_stake(stake: u64) -> Self; ``` Source line: `49`. ## compute\_state::ProviderStatus [#compute_stateproviderstatus] Operational status of a registered provider. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ProviderStatus { Active, Suspended, Exiting, Exited, } ``` Source line: `65`. ## compute\_state::ComputeProvider [#compute_statecomputeprovider] On-chain compute provider record. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeProvider { pub provider_did: String, pub human_root_did: Option, pub tier: ProviderTier, pub stake: u64, pub pricing: ComputePricing, pub supported_models: Vec, pub capabilities: Option, pub endpoint_url: Option, pub verification_tiers: Vec, pub hardware_attestation: Option, pub provider_pubkey: Option>, #[serde(default)] pub relayer_dids: Vec, pub status: ProviderStatus, pub registered_epoch: u64, pub last_updated_epoch: u64, pub unbonding_until_epoch: Option, pub active_jobs: u64, pub unresolved_challenges: u64, /// Aggregate reputation score (signed). Updated by reputation signals. pub reputation: i64 } ``` Source line: `74`. ## compute\_state::ComputeEscrow [#compute_statecomputeescrow] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)] pub struct ComputeEscrow { pub owner_did: String, pub available_balance: u64, pub reserved_balance: u64, pub mandate_id: Option, pub budget_limit: Option, pub last_updated_epoch: u64 } ``` Source line: `103`. ## compute\_state::ComputeEscrow::total [#compute_statecomputeescrowtotal] ```rust #[cfg(feature = "compute")] pub fn total(&self) -> u64; ``` Source line: `113`. ## compute\_state::JobStatus [#compute_statejobstatus] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum JobStatus { Pending, Dispatched, Running, Completed, Failed, Challenged, Refunded, } ``` Source line: `124`. ## compute\_state::JobStatus::is\_terminal [#compute_statejobstatusis_terminal] ```rust #[cfg(feature = "compute")] pub fn is_terminal(self) -> bool; ``` Source line: `135`. ## compute\_state::JobStatus::is\_active [#compute_statejobstatusis_active] ```rust #[cfg(feature = "compute")] pub fn is_active(self) -> bool; ``` Source line: `138`. ## compute\_state::JobStatus::allows\_receipt\_settlement [#compute_statejobstatusallows_receipt_settlement] ```rust #[cfg(feature = "compute")] pub fn allows_receipt_settlement(self) -> bool; ``` Source line: `142`. ## compute\_state::ComputeJob [#compute_statecomputejob] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeJob { pub job_id: String, pub consumer_did: String, pub provider_did: String, pub model_id: String, pub input_hash: SigilHash, pub max_cost: u64, pub reserved_amount: u64, pub verification_tier: ComputeVerificationTier, pub status: JobStatus, pub created_epoch: u64, pub dispatched_epoch: Option, pub completed_epoch: Option, pub agent_did: Option, pub dao_did: Option, pub mandate_id: Option, pub treasury_did: Option, pub authority_context: Option, pub receipt_id: Option } ``` Source line: `148`. ## compute\_state::ComputeReceiptRecord [#compute_statecomputereceiptrecord] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeReceiptRecord { pub receipt: ComputeReceipt, pub settled_epoch: u64, pub challenge_window_until_epoch: u64, pub challenged: bool } ``` Source line: `174`. ## compute\_state::ChallengeState [#compute_statechallengestate] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ChallengeState { Open, Resolving, Resolved, } ``` Source line: `187`. ## compute\_state::ComputeChallenge [#compute_statecomputechallenge] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeChallenge { pub challenge_id: String, pub receipt_id: String, pub challenger_did: String, pub deposit: u64, pub evidence: serde_json::Value, pub opened_at_epoch: u64, pub state: ChallengeState, pub resolution: Option, pub resolved_at_epoch: Option } ``` Source line: `194`. ## compute\_state::AuditAggregate [#compute_stateauditaggregate] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AuditAggregate { Provider, Escrow, Job, Receipt, Challenge, Maca, } ``` Source line: `212`. ## compute\_state::ComputeAuditEvent [#compute_statecomputeauditevent] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeAuditEvent { pub aggregate: AuditAggregate, pub seq: u64, pub epoch: u64, pub block_height: u64, pub kind: String, pub payload: serde_json::Value } ``` Source line: `222`. ## compute\_state::ReputationSignalKind [#compute_statereputationsignalkind] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ReputationSignalKind { JobCompleted, LatencyAccurate, Available, ChallengeSurvived, ChallengeLost, InvalidReceipt, InvalidProofCommitment, RedundantOutlier, ValidatorAgreement, TeeAttestationFresh, JobFailed, StorageChallengeFailed, } ``` Source line: `237`. ## compute\_state::ComputeReputationSignal [#compute_statecomputereputationsignal] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputeReputationSignal { pub provider_did: String, pub kind: ReputationSignalKind, pub weight: i32, pub at_epoch: u64, pub evidence_seq: Option } ``` Source line: `253`. ## compute\_state::MacaWorkClaim [#compute_statemacaworkclaim] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaWorkClaim { pub work_id: SigilHash, pub receipt_id: String, pub worker_did: String, pub consumer_did: String, pub agent_did: Option, pub dao_did: Option, pub mandate_id: Option, pub verification_tier: ComputeVerificationTier, pub commitments: ComputeEvidenceCommitment, pub authority_context: Option, pub worker_signature: Vec, pub worker_pubkey: Vec, pub epoch_settled: u64, pub challenge_window_until_epoch: u64, pub tee_attestation: Option, pub lumen_attestation: Option } ``` Source line: `266`. ## compute\_state::MacaWorkClaim::derive\_work\_id [#compute_statemacaworkclaimderive_work_id] Canonical work id derivation: BLAKE3(receipt\_id || worker\_did || epoch\_le). ```rust #[cfg(feature = "compute")] pub fn derive_work_id(receipt_id: &str, worker_did: &str, epoch: u64) -> SigilHash; ``` Source line: `287`. ## compute\_state::MacaValidationRecord [#compute_statemacavalidationrecord] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaValidationRecord { pub attestation: AgentVerificationAttestation, pub recorded_at_epoch: u64, pub recorded_at_block: u64, /// Phase 12: epoch this attestation was submitted under (when the /// validator submitted via the on-chain `MacaSubmitAttestation` tx). /// `None` for records persisted directly by the executor before /// Phase 12 wiring. #[serde(default, skip_serializing_if = "Option::is_none")] pub maca_epoch_id: Option } ``` Source line: `294`. ## compute\_state::ValidatorAgentRecord [#compute_statevalidatoragentrecord] On-chain validator agent record. Tracks the role and signing key the agent claimed at registration time. Authority gates (proposer/beacon allowlists) are still policy-driven; this record exists so attestations can be cross-checked against the registered pubkey + role. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ValidatorAgentRecord { pub agent_did: String, pub role: ValidatorRole, pub human_root_did: Option, pub agent_pubkey: Vec, pub capabilities: Option, pub registered_epoch: u64, pub last_updated_epoch: u64 } ``` Source line: `315`. ## compute\_state::BeaconRecord [#compute_statebeaconrecord] On-chain beacon publication for a single epoch. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BeaconRecord { pub epoch_id: u64, pub beacon_did: String, pub beacon_value: SigilHash, pub beacon_signature: Vec, pub published_at_epoch: u64, pub published_at_block: u64 } ``` Source line: `327`. ## compute\_state::MacaEpoch [#compute_statemacaepoch] On-chain MACA epoch record. Aggregates open work claims and (after finalization) the per-work `MacaQuorumProof`s. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaEpoch { pub epoch_id: u64, /// `BLAKE3(epoch_id LE || proposer_did || beacon_value || start_block_height /// LE || end_block_height LE || sorted_included_work_ids)`. /// Replay-safe: identical inputs always yield the same hash. pub epoch_hash: SigilHash, pub proposer_did: String, pub beacon_value: SigilHash, pub start_block_height: u64, pub end_block_height: u64, /// Sorted ascending so the canonical hash is order-independent. pub included_work_ids: Vec, pub state: MacaEpochState, pub proposed_at_epoch: u64, pub proposed_at_block: u64, pub finalized_at_epoch: Option, pub proposer_signature: Vec } ``` Source line: `339`. ## compute\_state::MacaEpoch::canonical\_hash [#compute_statemacaepochcanonical_hash] Canonical replay-safe hash. Used by tests and the executor to deduplicate and to check that a re-proposal of the same epoch (with the same content) produces the same `epoch_hash`. ```rust #[cfg(feature = "compute")] pub fn canonical_hash( epoch_id: u64, proposer_did: &str, beacon_value: &SigilHash, start_block_height: u64, end_block_height: u64, sorted_work_ids: &[SigilHash], ) -> SigilHash; ``` Source line: `362`. ## compute\_state::MacaQuorumProof [#compute_statemacaquorumproof] Per-work-claim aggregate of validator attestations. Created when an epoch is finalized. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MacaQuorumProof { /// `BLAKE3(epoch_id LE || work_id || sorted_validator_dids || sorted_signatures)` /// — replay-safe. pub proof_id: SigilHash, pub epoch_id: u64, pub work_id: SigilHash, pub outcome: QuorumOutcome, /// Sorted ascending. pub agreeing_validators: Vec, /// Sorted ascending. pub dissenting_validators: Vec, /// Validators that submitted Indeterminate or whose attestation could /// not be classified (e.g. missing output_hash). pub indeterminate_validators: Vec, /// `(validator_did, validator_signature)` pairs sorted by `validator_did`. pub validator_signatures: Vec<(String, Vec)>, pub quorum_threshold: u32, pub finalized_at_epoch: u64, pub finalized_at_block: u64 } ``` Source line: `389`. ## compute\_state::MacaQuorumProof::canonical\_hash [#compute_statemacaquorumproofcanonical_hash] Canonical replay-safe hash over `(epoch_id, work_id, sorted validator dids, sorted signatures)`. ```rust #[cfg(feature = "compute")] pub fn canonical_hash( epoch_id: u64, work_id: &SigilHash, sorted_validators: &[(String, Vec)], ) -> SigilHash; ``` Source line: `413`. ## compute\_state::EpochQuery [#compute_stateepochquery] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct EpochQuery { pub state: Option, pub limit: Option } ``` Source line: `431`. ## compute\_state::JobIndexFilter [#compute_statejobindexfilter] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct JobIndexFilter { pub by_provider: Option, pub by_consumer: Option, pub status: Option } ``` Source line: `441`. ## compute\_state::AuditQuery [#compute_stateauditquery] ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct AuditQuery { pub aggregate: Option, pub after_seq: Option, pub limit: Option } ``` Source line: `448`. ## compute\_state::ComputePolicy [#compute_statecomputepolicy] Snapshot of the chain config the compute executor consults at every transaction. Loaded from `genesis::ComputeParams` by the production state backend; the trait default in `ExecutionState::compute_policy` returns `fail_closed()` so a backend that forgets to wire genesis rejects all challenge-resolves and T3 settlements. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ComputePolicy { /// Allowlist of DIDs that may resolve compute challenges. The executor /// MUST fail closed when the sender is not in this list. An empty list /// disables challenge resolution entirely. pub challenge_resolver_dids: Vec, /// When `true`, T3 (TEE) receipts may settle. When `false`, the /// executor refuses T3 settlement. pub tee_verifier_enabled: bool, /// Provider exit cooldown in epochs. pub unbonding_epochs: u64, /// Default challenger deposit (micro-MINT) when the tx omits one. pub default_challenge_deposit: u64, /// Default challenge window in epochs (used when the receipt does not /// pin one). pub default_challenge_window_epochs: u32, /// Default reward shares applied when `ChallengeResolveData.reward_shares` /// is `None`. `(challenger, arbitrators, treasury)`. Must sum to 1.0. pub default_reward_shares: (f64, f64, f64), /// Treasury DID (paid arbitrator + treasury shares). pub treasury_did: String, /// Phase 12 — DIDs authorised to submit `MacaProposeEpoch` and /// `MacaFinalizeEpoch` transactions. Empty list disables MACA epoch /// proposal entirely (fail-closed). #[serde(default)] pub proposer_dids: Vec, /// Phase 12 — DIDs authorised to submit `MacaPublishBeacon`. Empty /// list disables beacon publication. #[serde(default)] pub beacon_dids: Vec, /// Phase 12 — minimum number of agreeing validators required for a /// `MacaQuorumProof` to be `Confirmed`. Below this, the outcome is /// `Inconclusive` (no clear majority) or `Rejected` (majority /// disagreement). #[serde(default = "default_validator_quorum_threshold")] pub validator_quorum_threshold: u32, /// Protocol escape hatch for receipts that are not bound to a stored job. /// Mainnet and canary keep this off; tests and explicitly named ad-hoc /// networks may enable it while they migrate dispatch to durable jobs. #[serde(default)] pub allow_ad_hoc_receipts: bool, /// Phase 14a — AMD SEV-SNP trust anchors. When `None`, the SEV-SNP /// verifier remains the Phase 13 fail-closed stub. When set, the /// verifier accepts an attestation iff (a) its 1184-byte report /// signature verifies against one of the allowlisted VCEK pubkeys, /// (b) the report's MEASUREMENT field is on the measurement /// allowlist. Cert-chain validation (VCEK → ASK → ARK) and /// REPORT_DATA / freshness binding are deferred to Phase 14a-2. #[serde(default, skip_serializing_if = "Option::is_none")] pub sev_snp_trust_anchors: Option, /// Phase 14b — Intel SGX DCAP trust anchor material. When `Some` /// and the `tee-verify-sgx-dcap` feature is compiled in, the verifier /// validates DCAP Quote v3 against the configured Intel root / /// MRENCLAVE / MRSIGNER allowlists, REPORT_DATA binding, freshness /// window, and TCB minimum. #[serde(default, skip_serializing_if = "Option::is_none")] pub sgx_dcap_trust_anchors: Option, /// Phase 14c — Intel TDX trust anchor material. When `Some` and /// the `tee-verify-tdx` feature is compiled in, the verifier /// validates DCAP Quote v4 (TDX) against the configured Intel /// root, MRTD / MRSIGNER_SEAM / RTMR allowlists, REPORT_DATA /// binding, collateral, and TCB minima. #[serde(default, skip_serializing_if = "Option::is_none")] pub tdx_trust_anchors: Option, /// Phase 14d — Arm CCA (Confidential Compute Architecture) trust /// anchor material. When `Some` and the `tee-verify-arm-cca` /// feature is compiled in, the verifier validates a CCA realm /// token (COSE_Sign1 + CBOR EAT-style claims) against the pinned /// IAK pubkey, RIM allowlist, challenge binding, and freshness /// window. #[serde(default, skip_serializing_if = "Option::is_none")] pub arm_cca_trust_anchors: Option } ``` Source line: `464`. ## compute\_state::SevSnpTrustAnchors [#compute_statesevsnptrustanchors] Phase 14a / 14a-2 — AMD SEV-SNP trust anchor material. `acceptable_vcek_pubkeys`: SEC1-encoded **uncompressed** P-384 public keys (97 bytes each: `0x04 || x || y`). Operators may pre-pin one entry per CPU they accept attestations from. When `pinned_ark_fingerprint_sha256` is set, the verifier instead extracts the VCEK pubkey from the cert chain in the attestation envelope after validating VCEK → ASK → ARK against the pinned root, and the pre-pinned key list becomes optional (kept for operators that want belt-and-braces). `measurement_allowlist`: 48-byte SHA-384 launch / image measurements the chain accepts. The verifier compares the report's MEASUREMENT field against this list and rejects if not present. Phase 14a-2 fields: `pinned_ark_fingerprint_sha256`: SHA-256 of the AMD ARK certificate (DER form). When set, every attestation must carry a cert chain whose terminal cert hashes to this value; intermediate ASK is verified against ARK; VCEK is verified against ASK. When `None`, the verifier falls back to direct VCEK pubkey pinning (Phase 14a posture). `pinned_ask_fingerprint_sha256`: optional SHA-256 fingerprint of the AMD ASK / product signing certificate (DER form). When set, the verifier rejects any SEV-SNP chain whose ASK cert does not match this product anchor. This prevents a broad ARK pin from accidentally accepting the wrong AMD product line. `vcek_allowlist`: optional explicit CPU allowlist. Each entry binds a chip ID to the exact reported TCB version accepted for that VCEK issuance, with an optional VCEK certificate fingerprint. When the list is non-empty, every accepted report must match one entry. `max_attestation_age_epochs`: when set, the verifier requires `att.generated_at_epoch` to be within this many epochs of the executor's `now_epoch`. When `None`, freshness is not enforced (Phase 14a posture). `min_tcb`: minimum SEV-SNP TCB version the chain accepts. Each report carries a `REPORTED_TCB` field at offset `0x180`; the verifier rejects reports where any pinned component is below the corresponding minimum. When `None`, TCB is not enforced (Phase 14a posture). `require_receipt_binding`: when true, the verifier requires the SEV-SNP report's `REPORT_DATA` field at offset `0x50..0x90` to match the canonical 64-byte receipt-binding derivation. The settle path computes the expected binding from the receipt being settled and passes it to the verifier. Enabled independently of the other fields so operators can dial in production posture incrementally. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SevSnpTrustAnchors { /// SEC1 uncompressed P-384 pubkeys (`0x04 || x || y`, 97 bytes each). /// May be empty if `pinned_ark_fingerprint_sha256` is set. #[serde(default)] pub acceptable_vcek_pubkeys: Vec>, /// 48-byte SHA-384 measurements. pub measurement_allowlist: Vec>, /// Phase 14a-2 — SHA-256 of the AMD ARK certificate (DER). #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_ark_fingerprint_sha256: Option<[u8; 32]>, /// Phase 14a-2 — SHA-256 of the AMD ASK / product signing /// certificate (DER). #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_ask_fingerprint_sha256: Option<[u8; 32]>, /// Phase 14a-2 — optional exact VCEK allowlist by chip ID and TCB. #[serde(default)] pub vcek_allowlist: Vec, /// Phase 14a-2 — maximum attestation age (in chain epochs). #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, /// Phase 14a-2 — minimum SEV-SNP TCB version. #[serde(default, skip_serializing_if = "Option::is_none")] pub min_tcb: Option, /// Phase 14a-2 — require REPORT_DATA receipt-binding. #[serde(default)] pub require_receipt_binding: bool } ``` Source line: `592`. ## compute\_state::SevSnpVcekAllowlistEntry [#compute_statesevsnpvcekallowlistentry] One accepted AMD SEV-SNP VCEK issuance. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SevSnpVcekAllowlistEntry { /// AMD KDS product name (`Milan`, `Genoa`, `Turin`, ...). The current /// verifier treats this as operator/audit metadata because the report /// carries chip ID and TCB, not a product string. pub product: String, /// 64-byte chip ID (`CHIP_ID`) from the SEV-SNP report / VCEK HWID. pub chip_id: Vec, /// Exact reported TCB tuple accepted for this VCEK issuance. pub tcb: SevSnpTcb, /// Optional SHA-256 fingerprint of the VCEK certificate DER. #[serde(default, skip_serializing_if = "Option::is_none")] pub vcek_fingerprint_sha256: Option<[u8; 32]> } ``` Source line: `622`. ## compute\_state::SevSnpTcb [#compute_statesevsnptcb] SEV-SNP TCB version. Each component is a u8 packed into the `REPORTED_TCB` u64 in the report: * byte 0: bootloader * byte 1: tee * byte 6: snp firmware * byte 7: microcode Bytes 2..6 are AMD-reserved. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct SevSnpTcb { pub bootloader: u8, pub tee: u8, pub snp: u8, pub microcode: u8 } ``` Source line: `645`. ## compute\_state::SevSnpTcb::from\_le\_bytes [#compute_statesevsnptcbfrom_le_bytes] Decode from the 8-byte little-endian `REPORTED_TCB` field. ```rust #[cfg(feature = "compute")] pub fn from_le_bytes(bytes: [u8; 8]) -> Self; ``` Source line: `654`. ## compute\_state::SevSnpTcb::meets [#compute_statesevsnptcbmeets] True when every component on `self` is `>= other`. ```rust #[cfg(feature = "compute")] pub fn meets(&self, minimum: &SevSnpTcb) -> bool; ``` Source line: `664`. ## compute\_state::ComputePolicy::fail\_closed [#compute_statecomputepolicyfail_closed] Maximum-restriction policy: no resolver may resolve, T3 disabled. Used as the default for backends that don't override `ExecutionState::compute_policy`. ```rust #[cfg(feature = "compute")] pub fn fail_closed() -> Self; ``` Source line: `676`. ## compute\_state::ComputePolicy::is\_authorised\_proposer [#compute_statecomputepolicyis_authorised_proposer] Returns true when `did` is on the proposer allowlist. ```rust #[cfg(feature = "compute")] pub fn is_authorised_proposer(&self, did: &str) -> bool; ``` Source line: `697`. ## compute\_state::ComputePolicy::is\_authorised\_beacon [#compute_statecomputepolicyis_authorised_beacon] Returns true when `did` is on the beacon allowlist. ```rust #[cfg(feature = "compute")] pub fn is_authorised_beacon(&self, did: &str) -> bool; ``` Source line: `702`. ## compute\_state::ComputePolicy::is\_authorised\_resolver [#compute_statecomputepolicyis_authorised_resolver] Returns true when `did` is on the resolver allowlist. ```rust #[cfg(feature = "compute")] pub fn is_authorised_resolver(&self, did: &str) -> bool; ``` Source line: `707`. ## compute\_state::ArmCcaTrustAnchors [#compute_statearmccatrustanchors] Phase 14d — Arm CCA (Confidential Compute Architecture) trust anchor material. `pinned_iak_pubkeys_sec1`: SEC1-uncompressed P-384 public keys (`0x04 || x || y`, 97 bytes each) for the Initial Attestation Keys (IAKs) accepted by the chain. The verifier verifies the realm token's COSE\_Sign1 ECDSA-P-384/SHA-384 signature against any of these pubkeys; first match accepts. `rim_allowlist`: realm initial measurements (RIM) the chain accepts. Each entry is the raw measurement bytes (length depends on the CCA hash algo claim — 32 / 48 / 64 bytes). `max_attestation_age_epochs` / `require_receipt_binding`: same shape as the other vendors. Receipt-binding compares `att.binding_nonce` against the realm token's `cca-realm-challenge` claim (canonical CBOR label 44233). # Mainnet caveats [#mainnet-caveats] Arm CCA's verifier ecosystem is still maturing. This slice implements the **structural** checks (COSE\_Sign1 envelope, CBOR claim parsing, ECDSA P-384 signature verification, RIM allowlist, challenge binding, freshness) and explicitly **defers** the platform-token / realm-token cross-binding, the full Arm IAK certificate chain (Arm has not published a stable production root yet), TCB lifecycle claim semantics, and per-claim policy enforcement. Until those land, mainnet operators should keep T3 Arm CCA off or pin a known-good IAK pubkey + RIM allowlist as an interim measure. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct ArmCcaTrustAnchors { /// SEC1-uncompressed P-384 IAK pubkeys (97 bytes each). #[serde(default)] pub pinned_iak_pubkeys_sec1: Vec>, /// Realm initial measurement allowlist (raw measurement bytes). #[serde(default)] pub rim_allowlist: Vec>, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, #[serde(default)] pub require_receipt_binding: bool } ``` Source line: `749`. ## compute\_state::TdxTrustAnchors [#compute_statetdxtrustanchors] Phase 14c — Intel TDX trust anchor material. Reuses the Intel root pinning + collateral pattern established by SGX DCAP. TDX-specific fields: `mrtd_allowlist`: 48-byte SHA-384 measurements of accepted TD images. Equivalent to MRENCLAVE on SGX but always 48 bytes. `mrsigner_seam_allowlist`: 48-byte SHA-384 measurements of accepted SEAM-module signers. Equivalent to MRSIGNER on SGX. `rtmr_allowlist[0..4]`: optional 48-byte allowlists for RTMR0..3 (Runtime Measurement Registers). When `None` for a slot, the corresponding RTMR is not enforced; when `Some`, the report's RTMR\ must match one of the listed values. Operators that pin boot-time RTMRs (e.g. UEFI/firmware via RTMR0) configure these. Collateral fields (`intel_tcb_signing_cert_der`, `tcb_info_json`, `qe_identity_json`, `pck_crl_der`, `root_ca_crl_der`, `allowed_tcb_statuses`) follow the same shape as SGX DCAP. The QE Identity for TDX has `id == "TD_QE"` and the TCB Info contains **both** SGX and TDX TCB component arrays — the verifier walks both against the quote's CPUSVN+TEE\_TCB\_SVN and takes the lower status. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct TdxTrustAnchors { #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>, /// 48-byte MRTD values the chain accepts. #[serde(default)] pub mrtd_allowlist: Vec>, /// 48-byte MRSIGNER_SEAM values the chain accepts. #[serde(default)] pub mrsigner_seam_allowlist: Vec>, /// Per-RTMR allowlists. Index 0 = RTMR0, 1 = RTMR1, etc. /// `None` disables enforcement for that register. #[serde(default)] pub rtmr0_allowlist: Vec>, #[serde(default)] pub rtmr1_allowlist: Vec>, #[serde(default)] pub rtmr2_allowlist: Vec>, #[serde(default)] pub rtmr3_allowlist: Vec>, #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub min_pce_svn: Option, #[serde(default)] pub require_receipt_binding: bool, #[serde(default, skip_serializing_if = "Option::is_none")] pub intel_tcb_signing_cert_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub tcb_info_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub qe_identity_json: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub pck_crl_der: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] pub root_ca_crl_der: Option>, #[serde(default)] pub allowed_tcb_statuses: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub collateral_max_age_epochs: Option } ``` Source line: `787`. ## compute\_state::SgxDcapTrustAnchors [#compute_statesgxdcaptrustanchors] Phase 14b — Intel SGX DCAP trust anchor material. `pinned_intel_root_fingerprint_sha256`: SHA-256 of the **Intel SGX Root CA** certificate (DER form). When set, the verifier walks the PCK certificate chain inside the quote (PCK leaf → PCK Platform CA → Intel SGX Root CA), validates the SHA-256 fingerprint of the root against the operator anchor, verifies every link's ECDSA-P-256/SHA-256 signature, and uses the PCK leaf pubkey to verify the QE report signature inside the quote. `mrenclave_allowlist`: 32-byte SHA-256 enclave-image measurements (`MRENCLAVE`) the chain accepts. `mrsigner_allowlist`: 32-byte SHA-256 enclave-signer measurements (`MRSIGNER`) the chain accepts. **Either** the report's `MRENCLAVE` must match the MRENCLAVE allowlist, **or** the report's `MRSIGNER` must match the MRSIGNER allowlist (both can be configured for belt-and-braces; at least one must be non-empty for the verifier to have something to compare against). `max_attestation_age_epochs`: when set, enforces a freshness window against `att.generated_at_epoch` (operator-supplied, since DCAP quotes carry collateral timestamps but we keep parity with the SEV-SNP gate for now). `min_isv_svn`: minimum `ISVSVN` value the chain accepts on the ISV enclave report. `min_pce_svn` plays the same role for the platform-config-enclave SVN advertised in the quote header. `require_receipt_binding`: when true, the verifier requires the ISV report's REPORT\_DATA field at offset 0x140 (first 64 bytes) to match `att.binding_nonce` decoded as 64 bytes of hex. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct SgxDcapTrustAnchors { /// SHA-256 of Intel SGX Root CA DER. When `None`, every well-formed /// quote falls into `FixtureMaterialRequired` (Phase 13 posture). #[serde(default, skip_serializing_if = "Option::is_none")] pub pinned_intel_root_fingerprint_sha256: Option<[u8; 32]>, /// 32-byte MRENCLAVE values the chain accepts. #[serde(default)] pub mrenclave_allowlist: Vec>, /// 32-byte MRSIGNER values the chain accepts. #[serde(default)] pub mrsigner_allowlist: Vec>, /// Freshness window in chain epochs. #[serde(default, skip_serializing_if = "Option::is_none")] pub max_attestation_age_epochs: Option, /// Minimum ISV enclave SVN. #[serde(default, skip_serializing_if = "Option::is_none")] pub min_isv_svn: Option, /// Minimum PCE SVN (from quote header). #[serde(default, skip_serializing_if = "Option::is_none")] pub min_pce_svn: Option, /// Require REPORT_DATA receipt-binding on every quote. #[serde(default)] pub require_receipt_binding: bool, // ----- Phase 14b-2 collateral hardening ----- /// Intel TCB Signing Cert (DER). The cert that signs Intel TCB /// Info and QE Identity JSON. Must be signed by Intel SGX Root /// CA (the verifier validates this against the pinned root at /// quote time). When `None`, every quote is rejected with /// `FixtureMaterialRequired` once collateral fields are present — /// a partial collateral configuration is itself a misconfiguration. #[serde(default, skip_serializing_if = "Option::is_none")] pub intel_tcb_signing_cert_der: Option>, /// Intel TCB Info JSON document. Operator-supplied; the verifier /// checks the signature on the inner `tcbInfo` value with the TCB /// Signing Cert pubkey, walks `tcbLevels` against the quote's /// CPUSVN / PCESVN, and rejects when the resolved status is not /// in `allowed_tcb_statuses`. #[serde(default, skip_serializing_if = "Option::is_none")] pub tcb_info_json: Option, /// Intel QE Identity JSON document. Operator-supplied; the /// verifier checks the signature on `enclaveIdentity`, matches /// fields against the quote's QE report (mrsigner / isvprodid / /// miscselect / attributes), and walks `tcbLevels` against the /// QE ISVSVN. #[serde(default, skip_serializing_if = "Option::is_none")] pub qe_identity_json: Option, /// PCK Platform CA CRL (DER). Required when collateral is on. The /// verifier rejects when the PCK leaf serial appears in the /// revoked list or when the CRL is expired. #[serde(default, skip_serializing_if = "Option::is_none")] pub pck_crl_der: Option>, /// Intel SGX Root CA CRL (DER). Optional. When set, the verifier /// also rejects when the PCK Platform CA serial appears in this /// CRL. #[serde(default, skip_serializing_if = "Option::is_none")] pub root_ca_crl_der: Option>, /// Allowed Intel TCB statuses. The verifier interprets the /// **empty** Vec as the strict default `["UpToDate"]` — /// `OutOfDate`, `Revoked`, `ConfigurationNeeded`, /// `ConfigurationAndSWHardeningNeeded`, `SWHardeningNeeded`, etc. /// all reject unless explicitly listed here. #[serde(default)] pub allowed_tcb_statuses: Vec, /// Maximum collateral age in chain epochs. When set, the verifier /// requires the TCB Info / QE Identity to be no older than this /// many epochs relative to the chain `now_epoch` (uses the /// collateral's `issueDate` field). #[serde(default, skip_serializing_if = "Option::is_none")] pub collateral_max_age_epochs: Option } ``` Source line: `860`. ## compute\_state::ComputeSnapshot [#compute_statecomputesnapshot] JSON-serialisable snapshot of the compute marketplace state. Used by `MemoryExecutionState::compute_snapshot` `MemoryExecutionState::compute_restore` to provide restart/reload semantics until a disk-backed state store lands across the rest of the chain. Every field round-trips through serde so the snapshot can be written to disk, sent over the wire, or replayed in tests. SigilHash-keyed maps are stored as `Vec<(SigilHash, ...)>` because JSON requires string keys at the protocol level. The structures are rebuilt into `HashMap`s by `compute_restore`. ```rust #[cfg(feature = "compute")] #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ComputeSnapshot { pub policy: ComputePolicy, pub clock: (u64, u64), pub providers: std::collections::HashMap, pub escrows: std::collections::HashMap, pub jobs: std::collections::HashMap, pub receipts: std::collections::HashMap, pub settled: std::collections::HashSet, pub challenges: std::collections::HashMap, pub audit: Vec, pub audit_seq: u64, pub reputation: std::collections::HashMap>, /// `(work_id, claim)` pairs — JSON cannot key maps by `SigilHash`. pub maca_claims: Vec<(sigil_core::hash::SigilHash, MacaWorkClaim)>, /// `(work_id, [(validator_did, record), ...])` — same reason. pub maca_validations: Vec<( sigil_core::hash::SigilHash, Vec<(String, MacaValidationRecord)>, )>, pub balances: std::collections::HashMap, /// Phase 12 — `MacaEpoch` state. #[serde(default)] pub maca_epochs: std::collections::HashMap, /// Phase 12 — `(epoch_id, work_id) → MacaQuorumProof`. #[serde(default)] pub maca_quorum_proofs: Vec<((u64, sigil_core::hash::SigilHash), MacaQuorumProof)>, /// Phase 12 — `(epoch_id) → BeaconRecord`. #[serde(default)] pub maca_beacons: std::collections::HashMap, /// Phase 12 — registered MACA validator agents. #[serde(default)] pub validator_agents: std::collections::HashMap } ``` Source line: `944`. # sigil-node · consensus_coordinator URL: https://docs.sigil.ml/reference/rust/sigil-node/consensus_coordinator Markdown: https://docs.sigil.ml/reference/rust/sigil-node/consensus_coordinator.md Source declarations, signatures and documentation for consensus_coordinator. Source: `sigil/node/sigil-node/src/consensus_coordinator.rs`. SHA-256: `17f14a881f2f1b3e7f3597aad8fb9400093ab52b3f5030e223e8308373f0eb2a`. 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. ## consensus\_coordinator::PeerEndpoint [#consensus_coordinatorpeerendpoint] Peer address for consensus message broadcasting. ```rust #[derive(Debug, Clone)] pub struct PeerEndpoint { /// Validator DID. pub did: String, /// HTTP RPC URL (e.g., "http://validator-2:26657/rpc"). pub rpc_url: String } ``` Source line: `54`. ## consensus\_coordinator::InboundConsensusMsg [#consensus_coordinatorinboundconsensusmsg] Messages that flow into the coordinator from the RPC layer. ```rust #[derive(Debug, Clone)] pub enum InboundConsensusMsg { Proposal { block: Box, proposer_did: String, view: u64, signature: Vec, }, PreVote(PreVote), PreCommit(PreCommit), ViewChange(ViewChangeMessage), NewView(NewViewMessage), } ``` Source line: `63`. ## consensus\_coordinator::RejectedReason [#consensus_coordinatorrejectedreason] Bounded reasons a proposal can be rejected before this validator prevotes. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum RejectedReason { WrongChainId, WrongParentHash, WrongHeight, InvalidProposer, InvalidProposerSignature, InvalidTransactionChainId, InvalidTransactionSignature, InvalidTransactionSigner, InvalidTransactionNonce, TransactionReplay, TxRootMismatch, ReceiptCountMismatch, ReceiptRootMismatch, StateRootMismatch, ZeroRootNonEmpty, GasLimitExceeded, GasUsedMismatch, SemanticValidationFailed, ExecutionSnapshotUnavailable, ExecutionFailed, } ``` Source line: `83`. ## consensus\_coordinator::CoordinatorConfig [#consensus_coordinatorcoordinatorconfig] Configuration for the consensus coordinator. ```rust pub struct CoordinatorConfig { /// This node's validator DID. pub validator_did: String, /// This node's Ed25519 signing key for consensus messages. pub signing_key: ed25519_dalek::SigningKey, /// Chain ID. pub chain_id: String, /// Target block time in milliseconds. pub block_time_ms: u64, /// Blocks per epoch. pub blocks_per_epoch: u64, /// Maximum gas per block. pub max_block_gas: u64, /// Ed25519 transaction signature batch size. pub signature_batch_size: usize, /// Peer endpoints for broadcasting. pub peers: Vec, /// The validator set (from genesis). pub validator_set: ValidatorSet } ``` Source line: `134`. ## consensus\_coordinator::ConsensusCoordinator [#consensus_coordinatorconsensuscoordinator] Drives the MACA consensus protocol across validators. ```rust pub struct ConsensusCoordinator { } ``` Source line: `156`. ## consensus\_coordinator::ConsensusCoordinator::new [#consensus_coordinatorconsensuscoordinatornew] Create a new consensus coordinator. ```rust #[allow(clippy::too_many_arguments)] pub fn new( config: CoordinatorConfig, mempool: Arc>, state: Arc, inbound_rx: mpsc::Receiver, initial_height: u64, initial_hash: SigilHash, block_store: Option>, zk_prover: Option, ) -> Self; ``` Source line: `179`. ## consensus\_coordinator::ConsensusCoordinator::run [#consensus_coordinatorconsensuscoordinatorrun] Run the consensus coordinator loop. For each block height: 1. Determine the proposer (round-robin by height) 2. If we are the proposer: build block, broadcast proposal 3. Run the MACA round, collecting votes from peers 4. Finalize when quorum is reached ```rust pub async fn run(&mut self) -> Result<(), NodeError>; ``` Source line: `211`. # sigil-node · contract_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/contract_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/contract_durable.md Source declarations, signatures and documentation for contract_durable. Source: `sigil/node/sigil-node/src/contract_durable.rs`. SHA-256: `133cd84c3ea670420745f6e552a846511146176455fda3264abda3e80f5c0999`. 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. Module condition: ```rust #[cfg(feature = "contracts")] ``` ## contract\_durable::DurableContractStore [#contract_durabledurablecontractstore] Durable Agent Contract Zone store backed by AkashaKV. Stores contract records, per-contract keyed state, code blobs, organization zones, contract events, and cross-zone messages. All multi-write operations should go through \[`ContractWriteBatch`] + \[`DurableContractStore::commit_batch`] for crash safety. ```rust #[cfg(feature = "contracts")] pub struct DurableContractStore { } ``` Source line: `213`. ## contract\_durable::DurableContractStore::open [#contract_durabledurablecontractstoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the contract subsystem. ```rust #[cfg(feature = "contracts")] pub fn open(path: &Path) -> Result; ``` Source line: `221`. ## contract\_durable::DurableContractStore::get\_contract [#contract_durabledurablecontractstoreget_contract] Fetch a contract record by DID. Returns `None` if not deployed. ```rust #[cfg(feature = "contracts")] pub fn get_contract(&self, contract_did: &str) -> Result, NodeError>; ``` Source line: `298`. ## contract\_durable::DurableContractStore::put\_contract [#contract_durabledurablecontractstoreput_contract] Insert or replace a contract record. ```rust #[cfg(feature = "contracts")] pub fn put_contract(&self, record: &ContractRecord) -> Result<(), NodeError>; ``` Source line: `307`. ## contract\_durable::DurableContractStore::delete\_contract [#contract_durabledurablecontractstoredelete_contract] Delete a contract record. Used during failed deploy rollback. ```rust #[cfg(feature = "contracts")] pub fn delete_contract(&self, contract_did: &str) -> Result<(), NodeError>; ``` Source line: `314`. ## contract\_durable::DurableContractStore::list\_contracts [#contract_durabledurablecontractstorelist_contracts] List all deployed contract records in deterministic DID order. ```rust #[cfg(feature = "contracts")] pub fn list_contracts(&self) -> Result, NodeError>; ``` Source line: `320`. ## contract\_durable::DurableContractStore::list\_zone\_contracts [#contract_durabledurablecontractstorelist_zone_contracts] List all contracts deployed in `zone_id`. ```rust #[cfg(feature = "contracts")] pub fn list_zone_contracts(&self, zone_id: &str) -> Result, NodeError>; ``` Source line: `331`. ## contract\_durable::DurableContractStore::get\_zone [#contract_durabledurablecontractstoreget_zone] Fetch an OrganizationZone by id. Returns `None` if not found. ```rust #[cfg(feature = "contracts")] pub fn get_zone(&self, zone_id: &str) -> Result, NodeError>; ``` Source line: `346`. ## contract\_durable::DurableContractStore::put\_zone [#contract_durabledurablecontractstoreput_zone] Insert or replace an OrganizationZone. ```rust #[cfg(feature = "contracts")] pub fn put_zone(&self, zone: &OrganizationZone) -> Result<(), NodeError>; ``` Source line: `355`. ## contract\_durable::DurableContractStore::list\_zones [#contract_durabledurablecontractstorelist_zones] List all known Organization Zones in deterministic `zone_id` order. ```rust #[cfg(feature = "contracts")] pub fn list_zones(&self) -> Result, NodeError>; ``` Source line: `362`. ## contract\_durable::DurableContractStore::get\_contract\_state [#contract_durabledurablecontractstoreget_contract_state] Read a single key from a contract's keyed state. ```rust #[cfg(feature = "contracts")] pub fn get_contract_state( &self, contract_did: &str, slot: &[u8], ) -> Result>, NodeError>; ``` Source line: `374`. ## contract\_durable::DurableContractStore::put\_contract\_state [#contract_durabledurablecontractstoreput_contract_state] Write a single key into a contract's keyed state. ```rust #[cfg(feature = "contracts")] pub fn put_contract_state( &self, contract_did: &str, slot: &[u8], value: &[u8], ) -> Result<(), NodeError>; ``` Source line: `383`. ## contract\_durable::DurableContractStore::delete\_contract\_state [#contract_durabledurablecontractstoredelete_contract_state] Delete a single key from a contract's keyed state. ```rust #[cfg(feature = "contracts")] pub fn delete_contract_state(&self, contract_did: &str, slot: &[u8]) -> Result<(), NodeError>; ``` Source line: `393`. ## contract\_durable::DurableContractStore::list\_contract\_state\_entries [#contract_durabledurablecontractstorelist_contract_state_entries] List every keyed state cell as `(contract_did, slot, value)`. ```rust #[cfg(feature = "contracts")] pub fn list_contract_state_entries( &self, ) -> Result, Vec)>, NodeError>; ``` Source line: `398`. ## contract\_durable::DurableContractStore::contract\_state\_root [#contract_durabledurablecontractstorecontract_state_root] Compute a BLAKE3-based state root over all keyed state for `contract_did`. Iterates all `(slot, value)` pairs in lexicographic key order and feeds them into a flat byte buffer, then hashes it with BLAKE3 via `SigilHash::digest`. Returns `SigilHash::ZERO` if the contract has no keyed state. ```rust #[cfg(feature = "contracts")] pub fn contract_state_root(&self, contract_did: &str) -> Result; ``` Source line: `432`. ## contract\_durable::DurableContractStore::get\_code\_blob [#contract_durabledurablecontractstoreget_code_blob] Get WASM bytecode by content-addressed hash. ```rust #[cfg(feature = "contracts")] pub fn get_code_blob(&self, code_hash: &SigilHash) -> Result>, NodeError>; ``` Source line: `461`. ## contract\_durable::DurableContractStore::get\_code\_metadata [#contract_durabledurablecontractstoreget_code_metadata] Get license/source/audit metadata for a registered code hash. ```rust #[cfg(feature = "contracts")] pub fn get_code_metadata( &self, code_hash: &SigilHash, ) -> Result, NodeError>; ``` Source line: `467`. ## contract\_durable::DurableContractStore::put\_code\_blob [#contract_durabledurablecontractstoreput_code_blob] Store a WASM bytecode blob. Verifies `hash == BLAKE3(bytes)`. ```rust #[cfg(feature = "contracts")] pub fn put_code_blob(&self, code_hash: &SigilHash, bytes: &[u8]) -> Result<(), NodeError>; ``` Source line: `476`. ## contract\_durable::DurableContractStore::list\_code\_blobs [#contract_durabledurablecontractstorelist_code_blobs] ```rust #[cfg(feature = "contracts")] pub fn list_code_blobs(&self) -> Result)>, NodeError>; ``` Source line: `487`. ## contract\_durable::DurableContractStore::put\_code\_metadata [#contract_durabledurablecontractstoreput_code_metadata] Store license/source/audit metadata for a registered code hash. ```rust #[cfg(feature = "contracts")] pub fn put_code_metadata( &self, code_hash: &SigilHash, metadata: &ContractLicenseMetadata, ) -> Result<(), NodeError>; ``` Source line: `506`. ## contract\_durable::DurableContractStore::list\_code\_metadata [#contract_durabledurablecontractstorelist_code_metadata] ```rust #[cfg(feature = "contracts")] pub fn list_code_metadata( &self, ) -> Result, NodeError>; ``` Source line: `515`. ## contract\_durable::DurableContractStore::append\_contract\_event [#contract_durabledurablecontractstoreappend_contract_event] Append a contract event. Returns the assigned monotonic global seq. ```rust #[cfg(feature = "contracts")] pub fn append_contract_event(&self, event: ContractEvent) -> Result; ``` Source line: `538`. ## contract\_durable::DurableContractStore::list\_contract\_events [#contract_durabledurablecontractstorelist_contract_events] List contract events matching `query`. ```rust #[cfg(feature = "contracts")] pub fn list_contract_events( &self, query: &ContractEventQuery, ) -> Result, NodeError>; ``` Source line: `563`. ## contract\_durable::DurableContractStore::enqueue\_zone\_message [#contract_durabledurablecontractstoreenqueue_zone_message] Enqueue a cross-zone message. ```rust #[cfg(feature = "contracts")] pub fn enqueue_zone_message(&self, msg: &CrossZoneMessage) -> Result<(), NodeError>; ``` Source line: `592`. ## contract\_durable::DurableContractStore::list\_pending\_zone\_messages [#contract_durabledurablecontractstorelist_pending_zone_messages] List pending messages for `target_zone`. AkashaKV's scan returns the **oldest** visible version of each key due to ascending SkipMap ordering. To avoid stale reads, we use the pending index only for its *keys* (to discover which message IDs to look up), then fetch the authoritative current record from the main `PREFIX_MSG` store. Any message whose current status is not `Pending` is excluded. ```rust #[cfg(feature = "contracts")] pub fn list_pending_zone_messages( &self, target_zone: &str, ) -> Result, NodeError>; ``` Source line: `611`. ## contract\_durable::DurableContractStore::list\_zone\_messages [#contract_durabledurablecontractstorelist_zone_messages] ```rust #[cfg(feature = "contracts")] pub fn list_zone_messages(&self) -> Result, NodeError>; ``` Source line: `638`. ## contract\_durable::DurableContractStore::mark\_zone\_message\_delivered [#contract_durabledurablecontractstoremark_zone_message_delivered] Update a message's status (e.g. Delivered / Failed). Updates the authoritative main record under `PREFIX_MSG`. `list_pending_zone_messages` reads from the main record for each message ID it discovers via the pending index, so it will see the updated status. ```rust #[cfg(feature = "contracts")] pub fn mark_zone_message_delivered( &self, msg_id: &str, status: MessageStatus, ) -> Result<(), NodeError>; ``` Source line: `653`. ## contract\_durable::DurableContractStore::flush [#contract_durabledurablecontractstoreflush] Force a flush of AkashaKV memtables to SSTables. Useful in tests. ```rust #[cfg(feature = "contracts")] pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `671`. ## contract\_durable::DurableContractStore::close [#contract_durabledurablecontractstoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust #[cfg(feature = "contracts")] pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `678`. ## contract\_durable::DurableContractStore::commit\_batch [#contract_durabledurablecontractstorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails the transaction is dropped (auto-aborted via `Drop`) before commit, leaving zero partial state visible. Either every operation in the batch lands or none do. ```rust #[cfg(feature = "contracts")] pub fn commit_batch(&self, batch: &ContractWriteBatch) -> Result<(), NodeError>; ``` Source line: `692`. ## contract\_durable::DurableContractStore::namespace\_prefix [#contract_durabledurablecontractstorenamespace_prefix] Test helper: return the namespace prefix used by every contract key. ```rust #[cfg(feature = "contracts")] pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `789`. ## contract\_durable::ArcContractStore [#contract_durablearccontractstore] Convenience type alias for a shared durable store. ```rust #[cfg(feature = "contracts")] pub type ArcContractStore = Arc; ``` Source line: `795`. ## contract\_durable::ContractBatchOp [#contract_durablecontractbatchop] An individual operation inside a \[`ContractWriteBatch`]. ```rust #[cfg(feature = "contracts")] #[derive(Clone)] pub enum ContractBatchOp { /// Insert or replace a contract record. PutContract(Box), /// Remove a contract record (rollback of failed deploys). DeleteContract(String), /// Insert or replace an OrganizationZone. PutZone(Box), /// Write a (contract_did, slot, value) keyed state entry. PutContractState(String, Vec, Vec), /// Delete a (contract_did, slot) keyed state entry. DeleteContractState(String, Vec), /// Content-addressed WASM bytecode blob (hash, bytes). PutCodeBlob(SigilHash, Vec), /// License/source/audit metadata associated with a code hash. PutCodeMetadata(SigilHash, Box), /// Append a contract event (seq will be assigned at commit time). AppendContractEvent(Box), /// Enqueue a cross-zone message. EnqueueZoneMessage(Box), } ``` Source line: `803`. ## contract\_durable::ContractWriteBatch [#contract_durablecontractwritebatch] Write batch accumulating all mutations for a single contract executor handler. Build the batch during the handler, then call \[`crate::executor::ExecutionState::commit_contract_tx`] at the end to apply all mutations atomically. A crash before `commit_contract_tx` leaves zero partial state on disk. ```rust #[cfg(feature = "contracts")] #[derive(Default)] pub struct ContractWriteBatch { } ``` Source line: `831`. ## contract\_durable::ContractWriteBatch::new [#contract_durablecontractwritebatchnew] Create an empty write batch. ```rust #[cfg(feature = "contracts")] pub fn new() -> Self; ``` Source line: `837`. ## contract\_durable::ContractWriteBatch::put\_contract [#contract_durablecontractwritebatchput_contract] Insert or replace a contract record. ```rust #[cfg(feature = "contracts")] pub fn put_contract(&mut self, record: ContractRecord); ``` Source line: `842`. ## contract\_durable::ContractWriteBatch::delete\_contract [#contract_durablecontractwritebatchdelete_contract] Delete a contract record (rollback / replacement). ```rust #[cfg(feature = "contracts")] pub fn delete_contract(&mut self, did: impl Into); ``` Source line: `848`. ## contract\_durable::ContractWriteBatch::put\_zone [#contract_durablecontractwritebatchput_zone] Insert or replace an OrganizationZone. ```rust #[cfg(feature = "contracts")] pub fn put_zone(&mut self, zone: OrganizationZone); ``` Source line: `853`. ## contract\_durable::ContractWriteBatch::put\_contract\_state [#contract_durablecontractwritebatchput_contract_state] Write a keyed state entry for `contract_did`. ```rust #[cfg(feature = "contracts")] pub fn put_contract_state( &mut self, contract_did: impl Into, slot: Vec, value: Vec, ); ``` Source line: `858`. ## contract\_durable::ContractWriteBatch::delete\_contract\_state [#contract_durablecontractwritebatchdelete_contract_state] Delete a keyed state entry for `contract_did`. ```rust #[cfg(feature = "contracts")] pub fn delete_contract_state(&mut self, contract_did: impl Into, slot: Vec); ``` Source line: `872`. ## contract\_durable::ContractWriteBatch::put\_code\_blob [#contract_durablecontractwritebatchput_code_blob] Add a content-addressed WASM code blob. ```rust #[cfg(feature = "contracts")] pub fn put_code_blob(&mut self, hash: SigilHash, bytes: Vec); ``` Source line: `880`. ## contract\_durable::ContractWriteBatch::put\_code\_metadata [#contract_durablecontractwritebatchput_code_metadata] Add metadata associated with a content-addressed code blob. ```rust #[cfg(feature = "contracts")] pub fn put_code_metadata(&mut self, hash: SigilHash, metadata: ContractLicenseMetadata); ``` Source line: `885`. ## contract\_durable::ContractWriteBatch::append\_contract\_event [#contract_durablecontractwritebatchappend_contract_event] Append a contract event (seq assigned at commit time). ```rust #[cfg(feature = "contracts")] pub fn append_contract_event(&mut self, event: ContractEvent); ``` Source line: `891`. ## contract\_durable::ContractWriteBatch::enqueue\_zone\_message [#contract_durablecontractwritebatchenqueue_zone_message] Enqueue a cross-zone message. ```rust #[cfg(feature = "contracts")] pub fn enqueue_zone_message(&mut self, msg: CrossZoneMessage); ``` Source line: `897`. ## contract\_durable::ContractWriteBatch::len [#contract_durablecontractwritebatchlen] Number of operations queued. ```rust #[cfg(feature = "contracts")] pub fn len(&self) -> usize; ``` Source line: `903`. ## contract\_durable::ContractWriteBatch::is\_empty [#contract_durablecontractwritebatchis_empty] Returns `true` if no operations have been queued. ```rust #[cfg(feature = "contracts")] pub fn is_empty(&self) -> bool; ``` Source line: `908`. ## contract\_durable::ContractWriteBatch::into\_ops [#contract_durablecontractwritebatchinto_ops] Consume the batch and return the inner op list. Used by `MemoryExecutionState::commit_contract_tx` to iterate ops on the in-memory slow-path without an extra clone. ```rust #[cfg(feature = "contracts")] pub fn into_ops(self) -> Vec; ``` Source line: `916`. # sigil-node · crate URL: https://docs.sigil.ml/reference/rust/sigil-node/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-node/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-node/src/lib.rs`. SHA-256: `a00ce310d188c4e4b5318bbd77b8febc186e97f1486e7d25ce7aae7d65ec829b`. 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. ## admission [#admission] ```rust pub mod admission; ``` Source line: `10`. ## bootstrap [#bootstrap] ```rust pub mod bootstrap; ``` Source line: `12`. ## compute\_durable [#compute_durable] ```rust #[cfg(feature = "compute")] pub mod compute_durable; ``` Source line: `14`. ## compute\_state [#compute_state] ```rust #[cfg(feature = "compute")] pub mod compute_state; ``` Source line: `16`. ## consensus\_coordinator [#consensus_coordinator] ```rust pub mod consensus_coordinator; ``` Source line: `17`. ## contract\_durable [#contract_durable] ```rust #[cfg(feature = "contracts")] pub mod contract_durable; ``` Source line: `19`. ## crucible\_durable [#crucible_durable] ```rust pub mod crucible_durable; ``` Source line: `20`. ## dex\_durable [#dex_durable] ```rust pub mod dex_durable; ``` Source line: `21`. ## engine [#engine] ```rust pub mod engine; ``` Source line: `22`. ## error [#error] ```rust pub mod error; ``` Source line: `23`. ## executor [#executor] ```rust pub mod executor; ``` Source line: `24`. ## executor\_compute [#executor_compute] ```rust #[cfg(feature = "compute")] pub mod executor_compute; ``` Source line: `26`. ## executor\_contract [#executor_contract] ```rust #[cfg(feature = "contracts")] pub mod executor_contract; ``` Source line: `28`. ## executor\_crucible [#executor_crucible] ```rust pub mod executor_crucible; ``` Source line: `29`. ## executor\_dao [#executor_dao] ```rust #[cfg(feature = "dao-validators")] pub mod executor_dao; ``` Source line: `31`. ## executor\_dex [#executor_dex] ```rust pub mod executor_dex; ``` Source line: `32`. ## executor\_evidence [#executor_evidence] ```rust pub mod executor_evidence; ``` Source line: `33`. ## executor\_gal [#executor_gal] ```rust #[cfg(feature = "tower")] pub mod executor_gal; ``` Source line: `35`. ## executor\_labor [#executor_labor] ```rust pub mod executor_labor; ``` Source line: `36`. ## executor\_mail [#executor_mail] ```rust pub mod executor_mail; ``` Source line: `37`. ## executor\_nft [#executor_nft] ```rust pub mod executor_nft; ``` Source line: `38`. ## executor\_nova [#executor_nova] ```rust pub mod executor_nova; ``` Source line: `39`. ## executor\_recovery [#executor_recovery] ```rust pub mod executor_recovery; ``` Source line: `40`. ## executor\_storage [#executor_storage] ```rust pub mod executor_storage; ``` Source line: `41`. ## executor\_username [#executor_username] ```rust pub mod executor_username; ``` Source line: `42`. ## executor\_vigils [#executor_vigils] ```rust #[cfg(feature = "vigils-v1")] pub mod executor_vigils; ``` Source line: `44`. ## gal\_durable [#gal_durable] ```rust #[cfg(feature = "tower")] pub mod gal_durable; ``` Source line: `46`. ## genesis\_loader [#genesis_loader] ```rust pub mod genesis_loader; ``` Source line: `47`. ## governance\_durable [#governance_durable] ```rust pub mod governance_durable; ``` Source line: `48`. ## health [#health] ```rust pub mod health; ``` Source line: `49`. ## host\_backend [#host_backend] ```rust #[cfg(feature = "wasm")] pub mod host_backend; ``` Source line: `51`. ## labor\_durable [#labor_durable] ```rust pub mod labor_durable; ``` Source line: `52`. ## logging [#logging] ```rust pub mod logging; ``` Source line: `53`. ## mail\_durable [#mail_durable] ```rust pub mod mail_durable; ``` Source line: `54`. ## mempool [#mempool] ```rust pub mod mempool; ``` Source line: `55`. ## metrics [#metrics] ```rust pub mod metrics; ``` Source line: `56`. ## nft\_durable [#nft_durable] ```rust pub mod nft_durable; ``` Source line: `57`. ## nova\_durable [#nova_durable] ```rust pub mod nova_durable; ``` Source line: `58`. ## recovery\_durable [#recovery_durable] ```rust pub mod recovery_durable; ``` Source line: `59`. ## rpc\_compute [#rpc_compute] ```rust #[cfg(feature = "compute")] pub mod rpc_compute; ``` Source line: `61`. ## rpc\_contract [#rpc_contract] ```rust #[cfg(feature = "contracts")] pub mod rpc_contract; ``` Source line: `63`. ## rpc\_crucible [#rpc_crucible] ```rust pub mod rpc_crucible; ``` Source line: `64`. ## rpc\_dex [#rpc_dex] ```rust pub mod rpc_dex; ``` Source line: `65`. ## rpc\_evidence [#rpc_evidence] ```rust pub mod rpc_evidence; ``` Source line: `66`. ## rpc\_gal [#rpc_gal] ```rust #[cfg(feature = "tower")] pub mod rpc_gal; ``` Source line: `68`. ## rpc\_labor [#rpc_labor] ```rust pub mod rpc_labor; ``` Source line: `69`. ## rpc\_mail [#rpc_mail] ```rust pub mod rpc_mail; ``` Source line: `70`. ## rpc\_middleware [#rpc_middleware] ```rust pub mod rpc_middleware; ``` Source line: `71`. ## rpc\_nft [#rpc_nft] ```rust pub mod rpc_nft; ``` Source line: `72`. ## rpc\_nova [#rpc_nova] ```rust pub mod rpc_nova; ``` Source line: `73`. ## rpc\_server [#rpc_server] ```rust pub mod rpc_server; ``` Source line: `74`. ## rpc\_storage\_market [#rpc_storage_market] ```rust pub mod rpc_storage_market; ``` Source line: `75`. ## rpc\_sync [#rpc_sync] ```rust pub mod rpc_sync; ``` Source line: `76`. ## rpc\_username [#rpc_username] ```rust pub mod rpc_username; ``` Source line: `77`. ## rpc\_vigils [#rpc_vigils] ```rust #[cfg(feature = "vigils-v1")] pub mod rpc_vigils; ``` Source line: `79`. ## snapshot [#snapshot] ```rust pub mod snapshot; ``` Source line: `80`. ## storage\_market\_durable [#storage_market_durable] ```rust pub mod storage_market_durable; ``` Source line: `82`. ## storage\_migration [#storage_migration] ```rust pub mod storage_migration; ``` Source line: `83`. ## tee\_verify [#tee_verify] ```rust #[cfg(feature = "tee-verify")] pub mod tee_verify; ``` Source line: `85`. ## tower\_durable [#tower_durable] ```rust pub mod tower_durable; ``` Source line: `86`. ## tower\_runtime [#tower_runtime] ```rust pub mod tower_runtime; ``` Source line: `87`. ## username\_durable [#username_durable] ```rust pub mod username_durable; ``` Source line: `88`. ## validator\_agent [#validator_agent] ```rust pub mod validator_agent; ``` Source line: `89`. ## weave [#weave] ```rust pub mod weave; ``` Source line: `90`. ## ws [#ws] ```rust pub mod ws; ``` Source line: `91`. ## ::NodeMode [#nodemode] Node operating modes. Each mode determines which subsystems are activated and how much data the node stores. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, clap::ValueEnum, Serialize, Deserialize)] pub enum NodeMode { /// Block Producer: execute transactions, generate ZK proofs. Producer, /// Block Validator: verify ZK proofs, participate in consensus. Validator, /// RPC node: serve API queries (no consensus participation). Rpc, /// Archive node: store full chain history. Archive, /// Light node: verify block headers only. Light, /// Tower coordination chain validator: participate in Tower consensus, /// committee selection, finality voting, and slashing evidence processing. /// Runs the Tower chain alongside the execution chain. #[cfg(feature = "tower")] Tower, /// Observer node: subscribe to blocks and transactions without participating /// in consensus. Useful for analytics, indexing, and monitoring dashboards. Observer, } ``` Source line: `142`. ## ::StateSyncMode [#statesyncmode] Startup state-sync mode for nodes booting from an existing chain. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, clap::ValueEnum, Serialize, Deserialize)] pub enum StateSyncMode { /// Do not attempt snapshot restore or state sync at startup. Off, /// Restore the latest signed snapshot, then catch up from peers. SnapshotThenP2pCatchup, /// Header sync first, then fetch state chunks against the finalized root. HeaderThenStateFetch, } ``` Source line: `181`. ## ::NodeConfig [#nodeconfig] Node configuration parsed from CLI arguments. ```rust #[derive(Debug, Clone, Parser)] #[command(name = "sigil-node", version, about = "Sigil blockchain node")] pub struct NodeConfig { /// Node operating mode. #[arg(long, value_enum, default_value_t = NodeMode::Validator)] pub mode: NodeMode, /// Chain ID. #[arg(long, default_value = "sigil-mainnet-1")] pub chain_id: String, /// Data directory for chain state and blocks. #[arg(long, default_value = "./data")] pub data_dir: String, /// RPC listen address. #[arg(long, default_value = "0.0.0.0:12618")] pub rpc_addr: String, /// P2P listen address. #[arg(long, default_value = "0.0.0.0:26656")] pub p2p_addr: String, /// Validator DID (required for producer/validator modes). #[arg(long)] pub validator_did: Option, /// Log level (e.g. "info", "debug", "trace"). #[arg(long, default_value = "info")] pub log_level: String, /// Genesis file path. #[arg(long, default_value = "genesis.json")] pub genesis: String, /// Expected BLAKE3 state-root hash of the loaded genesis file. /// /// When set, startup recomputes the canonical genesis hash and refuses to /// start if it differs. Mainnet chain IDs require this flag so a validator /// or RPC pod cannot silently boot against stale or tampered genesis data. #[arg(long)] pub expected_genesis_hash: Option, /// Tower coordination chain listen address (Tower mode only). #[arg(long, default_value = "0.0.0.0:26660")] pub tower_addr: String, /// Geographic region for Tower committee diversity (e.g., "us-east", "eu-west"). #[arg(long)] pub tower_region: Option, /// Path to a pre-provisioned validator key file (`validator_keys.json`). /// /// When set, the node reads Ed25519 validator keys from this path instead /// of the default `/keys/validator_keys.json`. This allows /// operators to keep key material on an HSM-backed FUSE mount, a sealed /// volume, or a separate read-only filesystem. /// /// **Mainnet requirement**: on mainnet (`chain-id` starting with /// `sigil-mainnet-`) this flag (or a pre-existing key file at the default /// path) is mandatory. The node will refuse to start without pre-provisioned /// keys — auto-generation and DID-derived keys are forbidden on mainnet. /// /// Recommended HSM workflows: /// - **Software HSM / OpenBao / Vault**: use `vault kv get` to export the /// key JSON to a tempfs path, mount it read-only, and point this flag at /// it. Revoke the export token after startup. /// - **Hardware HSM (YubiHSM / Thales)**: generate the key inside the HSM, /// export the public components to `validator_keys.json` (keep the private /// key in the HSM), and adapt `BlockEngine` to call the HSM signing API. /// - **Sealed file (e.g., Linux Keyring / TPM)**: decrypt the key file at /// boot via `systemd-creds` or `clevis`, write to a tmpfs path, and pass /// that path here. /// /// See `docs/operator/validator-key-provisioning.md` for step-by-step /// instructions and the audit checklist. #[arg(long)] pub validator_key_path: Option, /// Snapshot URI to restore before bootstrapping a fresh data directory. /// /// Supported forms are an unpacked local snapshot directory, a local /// `.tar`/`.tar.zst` archive, or an HTTP(S) `latest.json` manifest that /// points to the archive payload. The restored state root is verified /// against genesis for height 0 snapshots or against the restored canonical /// block header for height > 0 snapshots. #[arg(long)] pub restore_from: Option, /// Startup state-sync strategy. #[arg(long, value_enum, default_value_t = StateSyncMode::Off)] pub state_sync_mode: StateSyncMode, /// Public snapshot base URL used when `state-sync-mode` is /// `snapshot-then-p2p-catchup` and `--restore-from` is omitted. #[arg(long)] pub snapshot_base_url: Option, /// Finalized block retention window kept for snapshot restore and /// state-sync catchup. #[arg(long, default_value_t = 100_000)] pub retain_finalized_blocks: u64 } ``` Source line: `217`. ## ::NodeConfig::apply\_env\_overrides [#nodeconfigapply_env_overrides] Apply environment overrides supplied by Kubernetes manifests. ```rust pub fn apply_env_overrides(&mut self) -> Result<(), error::NodeError>; ``` Source line: `321`. ## ::NodeConfig::is\_public\_production\_chain [#nodeconfigis_public_production_chain] Returns true for public production/canary chain IDs where validator nodes must not silently fall back to solo block production. ```rust pub fn is_public_production_chain(&self) -> bool; ``` Source line: `349`. ## ::NodeConfig::validate\_public\_validator\_peers [#nodeconfigvalidate_public_validator_peers] Validate peer configuration for public validator/producer chains. ```rust pub fn validate_public_validator_peers( &self, sigil_peers: Option<&str>, ) -> Result<(), error::NodeError>; ``` Source line: `354`. ## ::NodeConfig::effective\_restore\_uri [#nodeconfigeffective_restore_uri] Resolve the concrete snapshot URI to restore, if startup should use one. ```rust pub fn effective_restore_uri(&self) -> Option; ``` Source line: `371`. ## ::NodeConfig::requires\_validator [#nodeconfigrequires_validator] Returns `true` if this mode requires a validator DID. ```rust pub fn requires_validator(&self) -> bool; ``` Source line: `384`. ## ::NodeConfig::requires\_zk\_prover [#nodeconfigrequires_zk_prover] Returns `true` if this mode needs the ZK proving subsystem. ```rust pub fn requires_zk_prover(&self) -> bool; ``` Source line: `394`. ## ::NodeConfig::requires\_full\_state [#nodeconfigrequires_full_state] Returns `true` if this mode maintains full state. ```rust pub fn requires_full_state(&self) -> bool; ``` Source line: `399`. ## ::NodeConfig::stores\_full\_history [#nodeconfigstores_full_history] Returns `true` if this mode stores the complete block history. ```rust pub fn stores_full_history(&self) -> bool; ``` Source line: `404`. ## ::NodeConfig::runs\_tower\_chain [#nodeconfigruns_tower_chain] Returns `true` if this mode participates in the Tower coordination chain. ```rust #[cfg(feature = "tower")] pub fn runs_tower_chain(&self) -> bool; ``` Source line: `410`. ## ::NodeConfig::is\_observer [#nodeconfigis_observer] Returns `true` if this mode only observes (no consensus participation). ```rust pub fn is_observer(&self) -> bool; ``` Source line: `418`. ## ::NodeConfig::validate [#nodeconfigvalidate] Validate the configuration. Returns an error if the config is inconsistent (e.g. producer mode without a validator DID). ```rust pub fn validate(&self) -> Result<(), error::NodeError>; ``` Source line: `424`. ## ::is\_public\_production\_chain\_id [#is_public_production_chain_id] Public networks where validator/producer mode must fail closed without explicit peers. ```rust pub fn is_public_production_chain_id(chain_id: &str) -> bool; ``` Source line: `468`. ## ::peer\_config\_empty [#peer_config_empty] True when the comma-separated peer config is absent or contains only whitespace/empty entries. ```rust pub fn peer_config_empty(sigil_peers: Option<&str>) -> bool; ``` Source line: `474`. ## ::NodeInfo [#nodeinfo] Summary of the running node's state. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct NodeInfo { /// Software version. pub version: String, /// Chain ID. pub chain_id: String, /// Operating mode. pub mode: NodeMode, /// Current block height. pub current_height: u64, /// Current epoch number. pub current_epoch: u64, /// Number of connected peers. pub peer_count: usize, /// Whether the node has finished initial sync. pub synced: bool, /// Current Tower slot number (Tower/Validator/Producer modes only). #[cfg(feature = "tower")] #[serde(default, skip_serializing_if = "Option::is_none")] pub tower_slot: Option, /// Latest finalized epoch via Casper FFG (Tower modes only). #[cfg(feature = "tower")] #[serde(default, skip_serializing_if = "Option::is_none")] pub finalized_epoch: Option } ``` Source line: `482`. # sigil-node · crucible_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/crucible_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/crucible_durable.md Source declarations, signatures and documentation for crucible_durable. Source: `sigil/node/sigil-node/src/crucible_durable.rs`. SHA-256: `28befa64cbd7be221ec79115df3ac49558f0d55d04bb1ecfd616369a6dec2eeb`. 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. ## crucible\_durable::CrucibleEvent [#crucible_durablecrucibleevent] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CrucibleEvent { pub block_height: u64, pub seq: u64, pub run_id: String, pub kind: String, pub payload: serde_json::Value } ``` Source line: `37`. ## crucible\_durable::CrucibleBatchOp [#crucible_durablecruciblebatchop] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum CrucibleBatchOp { PutRun(TrainingRun), PutRolloutBatch(RolloutBatchCommitment), PutRewardAttestation(RewardBatchAttestation), PutWeights(WeightPublicationRecord), PutSlash(TrainingSlashRecord), AppendEvent(CrucibleEvent), PutBalance(String, u64), } ``` Source line: `46`. ## crucible\_durable::CrucibleWriteBatch [#crucible_durablecruciblewritebatch] ```rust #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CrucibleWriteBatch { } ``` Source line: `57`. ## crucible\_durable::CrucibleWriteBatch::new [#crucible_durablecruciblewritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `62`. ## crucible\_durable::CrucibleWriteBatch::put\_run [#crucible_durablecruciblewritebatchput_run] ```rust pub fn put_run(&mut self, run: TrainingRun); ``` Source line: `66`. ## crucible\_durable::CrucibleWriteBatch::put\_rollout\_batch [#crucible_durablecruciblewritebatchput_rollout_batch] ```rust pub fn put_rollout_batch(&mut self, batch: RolloutBatchCommitment); ``` Source line: `70`. ## crucible\_durable::CrucibleWriteBatch::put\_reward\_attestation [#crucible_durablecruciblewritebatchput_reward_attestation] ```rust pub fn put_reward_attestation(&mut self, attestation: RewardBatchAttestation); ``` Source line: `74`. ## crucible\_durable::CrucibleWriteBatch::put\_weights [#crucible_durablecruciblewritebatchput_weights] ```rust pub fn put_weights(&mut self, weights: WeightPublicationRecord); ``` Source line: `79`. ## crucible\_durable::CrucibleWriteBatch::put\_slash [#crucible_durablecruciblewritebatchput_slash] ```rust pub fn put_slash(&mut self, slash: TrainingSlashRecord); ``` Source line: `83`. ## crucible\_durable::CrucibleWriteBatch::append\_event [#crucible_durablecruciblewritebatchappend_event] ```rust pub fn append_event(&mut self, event: CrucibleEvent); ``` Source line: `87`. ## crucible\_durable::CrucibleWriteBatch::put\_balance [#crucible_durablecruciblewritebatchput_balance] ```rust pub fn put_balance(&mut self, did: impl Into, amount: u64); ``` Source line: `91`. ## crucible\_durable::CrucibleWriteBatch::ops [#crucible_durablecruciblewritebatchops] ```rust pub fn ops(&self) -> &[CrucibleBatchOp]; ``` Source line: `96`. ## crucible\_durable::DurableCrucibleStore [#crucible_durabledurablecruciblestore] ```rust pub struct DurableCrucibleStore { } ``` Source line: `177`. ## crucible\_durable::DurableCrucibleStore::open [#crucible_durabledurablecruciblestoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `183`. ## crucible\_durable::DurableCrucibleStore::put\_run [#crucible_durabledurablecruciblestoreput_run] ```rust pub fn put_run(&self, run: &TrainingRun) -> Result<(), NodeError>; ``` Source line: `251`. ## crucible\_durable::DurableCrucibleStore::get\_run [#crucible_durabledurablecruciblestoreget_run] ```rust pub fn get_run(&self, run_id: &str) -> Result, NodeError>; ``` Source line: `255`. ## crucible\_durable::DurableCrucibleStore::list\_runs [#crucible_durabledurablecruciblestorelist_runs] ```rust pub fn list_runs(&self) -> Result, NodeError>; ``` Source line: `262`. ## crucible\_durable::DurableCrucibleStore::get\_rollout\_batch [#crucible_durabledurablecruciblestoreget_rollout_batch] ```rust pub fn get_rollout_batch( &self, run_id: &str, batch_id: &str, ) -> Result, NodeError>; ``` Source line: `271`. ## crucible\_durable::DurableCrucibleStore::list\_rollout\_batches [#crucible_durabledurablecruciblestorelist_rollout_batches] ```rust pub fn list_rollout_batches( &self, run_id: &str, ) -> Result, NodeError>; ``` Source line: `282`. ## crucible\_durable::DurableCrucibleStore::get\_weights [#crucible_durabledurablecruciblestoreget_weights] ```rust pub fn get_weights( &self, run_id: &str, model_root: &SigilHash, ) -> Result, NodeError>; ``` Source line: `301`. ## crucible\_durable::DurableCrucibleStore::list\_weights [#crucible_durabledurablecruciblestorelist_weights] ```rust pub fn list_weights(&self, run_id: &str) -> Result, NodeError>; ``` Source line: `312`. ## crucible\_durable::DurableCrucibleStore::get\_reward\_attestation [#crucible_durabledurablecruciblestoreget_reward_attestation] ```rust pub fn get_reward_attestation( &self, run_id: &str, attestation_id: &str, ) -> Result, NodeError>; ``` Source line: `329`. ## crucible\_durable::DurableCrucibleStore::list\_reward\_attestations [#crucible_durabledurablecruciblestorelist_reward_attestations] ```rust pub fn list_reward_attestations( &self, run_id: &str, ) -> Result, NodeError>; ``` Source line: `340`. ## crucible\_durable::DurableCrucibleStore::get\_slash [#crucible_durabledurablecruciblestoreget_slash] ```rust pub fn get_slash( &self, run_id: &str, slash_id: &str, ) -> Result, NodeError>; ``` Source line: `357`. ## crucible\_durable::DurableCrucibleStore::list\_slashes [#crucible_durabledurablecruciblestorelist_slashes] ```rust pub fn list_slashes(&self, run_id: &str) -> Result, NodeError>; ``` Source line: `368`. ## crucible\_durable::DurableCrucibleStore::list\_events [#crucible_durabledurablecruciblestorelist_events] ```rust pub fn list_events(&self, run_id: Option<&str>) -> Result, NodeError>; ``` Source line: `382`. ## crucible\_durable::DurableCrucibleStore::put\_balance [#crucible_durabledurablecruciblestoreput_balance] ```rust pub fn put_balance(&self, did: &str, amount: u64) -> Result<(), NodeError>; ``` Source line: `398`. ## crucible\_durable::DurableCrucibleStore::get\_balance [#crucible_durabledurablecruciblestoreget_balance] ```rust pub fn get_balance(&self, did: &str) -> Result, NodeError>; ``` Source line: `402`. ## crucible\_durable::DurableCrucibleStore::list\_balances [#crucible_durabledurablecruciblestorelist_balances] ```rust pub fn list_balances(&self) -> Result, NodeError>; ``` Source line: `413`. ## crucible\_durable::DurableCrucibleStore::commit\_batch [#crucible_durabledurablecruciblestorecommit_batch] ```rust pub fn commit_batch(&self, batch: &CrucibleWriteBatch) -> Result<(), NodeError>; ``` Source line: `427`. ## crucible\_durable::ArcCrucibleStore [#crucible_durablearccruciblestore] ```rust pub type ArcCrucibleStore = Arc; ``` Source line: `533`. # sigil-node · dex_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/dex_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/dex_durable.md Source declarations, signatures and documentation for dex_durable. Source: `sigil/node/sigil-node/src/dex_durable.rs`. SHA-256: `61f494ff0848902445b5d1aaa6b79107f40d548cfb529e01c1438b88ea0966f2`. 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. ## dex\_durable::DurableDexStore [#dex_durabledurabledexstore] ```rust pub struct DurableDexStore { } ``` Source line: `133`. ## dex\_durable::DurableDexStore::open [#dex_durabledurabledexstoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `139`. ## dex\_durable::DurableDexStore::get\_pool [#dex_durabledurabledexstoreget_pool] ```rust pub fn get_pool(&self, pool_id: &str) -> Result, NodeError>; ``` Source line: `205`. ## dex\_durable::DurableDexStore::put\_pool [#dex_durabledurabledexstoreput_pool] ```rust pub fn put_pool(&self, pool: &DexPool) -> Result<(), NodeError>; ``` Source line: `212`. ## dex\_durable::DurableDexStore::list\_pools [#dex_durabledurabledexstorelist_pools] ```rust pub fn list_pools(&self) -> Result, NodeError>; ``` Source line: `216`. ## dex\_durable::DurableDexStore::get\_position [#dex_durabledurabledexstoreget_position] ```rust pub fn get_position( &self, pool_id: &str, owner_did: &str, ) -> Result, NodeError>; ``` Source line: `225`. ## dex\_durable::DurableDexStore::put\_position [#dex_durabledurabledexstoreput_position] ```rust pub fn put_position(&self, position: &DexPosition) -> Result<(), NodeError>; ``` Source line: `236`. ## dex\_durable::DurableDexStore::list\_positions [#dex_durabledurabledexstorelist_positions] ```rust pub fn list_positions( &self, owner_did: Option<&str>, pool_id: Option<&str>, ) -> Result, NodeError>; ``` Source line: `243`. ## dex\_durable::DurableDexStore::get\_asset\_balance [#dex_durabledurabledexstoreget_asset_balance] ```rust pub fn get_asset_balance(&self, asset_id: &str, owner_did: &str) -> Result; ``` Source line: `267`. ## dex\_durable::DurableDexStore::put\_asset\_balance [#dex_durabledurabledexstoreput_asset_balance] ```rust pub fn put_asset_balance( &self, asset_id: &str, owner_did: &str, amount: u64, ) -> Result<(), NodeError>; ``` Source line: `274`. ## dex\_durable::DurableDexStore::get\_token\_class [#dex_durabledurabledexstoreget_token_class] ```rust pub fn get_token_class(&self, token_id: &str) -> Result, NodeError>; ``` Source line: `286`. ## dex\_durable::DurableDexStore::put\_token\_class [#dex_durabledurabledexstoreput_token_class] ```rust pub fn put_token_class(&self, class: &CustomTokenClass) -> Result<(), NodeError>; ``` Source line: `292`. ## dex\_durable::DurableDexStore::list\_token\_classes [#dex_durabledurabledexstorelist_token_classes] ```rust pub fn list_token_classes(&self) -> Result, NodeError>; ``` Source line: `296`. ## dex\_durable::DurableDexStore::list\_asset\_balances [#dex_durabledurabledexstorelist_asset_balances] ```rust pub fn list_asset_balances(&self) -> Result, NodeError>; ``` Source line: `305`. ## dex\_durable::DurableDexStore::list\_events [#dex_durabledurabledexstorelist_events] ```rust pub fn list_events( &self, pool_id: Option<&str>, limit: usize, ) -> Result, NodeError>; ``` Source line: `328`. ## dex\_durable::DurableDexStore::commit\_batch [#dex_durabledurabledexstorecommit_batch] ```rust pub fn commit_batch(&self, batch: &DexWriteBatch) -> Result<(), NodeError>; ``` Source line: `353`. ## dex\_durable::ArcDexStore [#dex_durablearcdexstore] ```rust pub type ArcDexStore = Arc; ``` Source line: `419`. ## dex\_durable::DexBatchOp [#dex_durabledexbatchop] ```rust #[derive(Clone)] pub enum DexBatchOp { PutTokenClass(CustomTokenClass), PutPool(DexPool), PutPosition(DexPosition), PutAssetBalance { asset_id: String, owner_did: String, amount: u64, }, AppendEvent(DexEvent), } ``` Source line: `422`. ## dex\_durable::DexWriteBatch [#dex_durabledexwritebatch] ```rust #[derive(Default)] pub struct DexWriteBatch { } ``` Source line: `435`. ## dex\_durable::DexWriteBatch::new [#dex_durabledexwritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `440`. ## dex\_durable::DexWriteBatch::put\_pool [#dex_durabledexwritebatchput_pool] ```rust pub fn put_pool(&mut self, pool: DexPool); ``` Source line: `444`. ## dex\_durable::DexWriteBatch::put\_token\_class [#dex_durabledexwritebatchput_token_class] ```rust pub fn put_token_class(&mut self, class: CustomTokenClass); ``` Source line: `448`. ## dex\_durable::DexWriteBatch::put\_position [#dex_durabledexwritebatchput_position] ```rust pub fn put_position(&mut self, position: DexPosition); ``` Source line: `452`. ## dex\_durable::DexWriteBatch::put\_asset\_balance [#dex_durabledexwritebatchput_asset_balance] ```rust pub fn put_asset_balance( &mut self, asset_id: impl Into, owner_did: impl Into, amount: u64, ); ``` Source line: `456`. ## dex\_durable::DexWriteBatch::append\_event [#dex_durabledexwritebatchappend_event] ```rust pub fn append_event(&mut self, event: DexEvent); ``` Source line: `469`. # sigil-node · engine URL: https://docs.sigil.ml/reference/rust/sigil-node/engine Markdown: https://docs.sigil.ml/reference/rust/sigil-node/engine.md Source declarations, signatures and documentation for engine. Source: `sigil/node/sigil-node/src/engine.rs`. SHA-256: `0734c0e521c5d0f4818d219f3e816df9a552f716afa4e8e284ca4012136f22e8`. 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. ## engine::BlockEngine [#engineblockengine] Block production and execution engine. Runs in a loop, draining the mempool and producing blocks at the target interval. Uses `AtomicU64` for the current height so `run(&self)` can be called on a shared reference from multiple tasks. ```rust pub struct BlockEngine { } ``` Source line: `53`. ## engine::BlockEngine::new [#engineblockenginenew] Create a new block engine from bootstrap results, genesis config, and an optional bootstrap agent team. When a `BootstrapTeam` is provided, block production uses agent-driven proposer rotation. Without one, it falls back to the single validator DID from the bootstrap result. ```rust pub fn new( bootstrap: BootstrapResult, mempool: Arc>, genesis: &GenesisConfig, bootstrap_team: Option, ) -> Result; ``` Source line: `108`. ## engine::BlockEngine::height [#engineblockengineheight] Current block height (atomic read — safe from any thread). ```rust pub fn height(&self) -> u64; ``` Source line: `940`. ## engine::BlockEngine::chain\_id [#engineblockenginechain_id] The chain ID this engine is producing blocks for. ```rust pub fn chain_id(&self) -> &str; ``` Source line: `945`. ## engine::BlockEngine::genesis\_accounts [#engineblockenginegenesis_accounts] Number of genesis accounts loaded. ```rust pub fn genesis_accounts(&self) -> usize; ``` Source line: `950`. ## engine::BlockEngine::genesis\_supply [#engineblockenginegenesis_supply] Total initial supply loaded from genesis. ```rust pub fn genesis_supply(&self) -> u64; ``` Source line: `955`. ## engine::BlockEngine::target\_block\_time [#engineblockenginetarget_block_time] Target block time in whole seconds, rounded up for legacy callers. ```rust pub fn target_block_time(&self) -> u64; ``` Source line: `960`. ## engine::BlockEngine::target\_block\_time\_ms [#engineblockenginetarget_block_time_ms] Target block time in milliseconds. ```rust pub fn target_block_time_ms(&self) -> u64; ``` Source line: `965`. ## engine::BlockEngine::target\_block\_time\_seconds [#engineblockenginetarget_block_time_seconds] Target block time in seconds, preserving sub-second precision. ```rust pub fn target_block_time_seconds(&self) -> f64; ``` Source line: `970`. ## engine::BlockEngine::validator\_summary [#engineblockenginevalidator_summary] Validator set summary. ```rust pub fn validator_summary(&self) -> &str; ``` Source line: `975`. ## engine::BlockEngine::has\_bootstrap\_team [#engineblockenginehas_bootstrap_team] Whether this engine has a bootstrap agent team. ```rust pub fn has_bootstrap_team(&self) -> bool; ``` Source line: `980`. ## engine::BlockEngine::tower\_genesis\_params [#engineblockenginetower_genesis_params] Return the Tower consensus parameters loaded from genesis. Used by diagnostics endpoints, the P2P gossip layer, and future Tower slot-scheduling logic that needs epoch/committee configuration. ```rust pub fn tower_genesis_params(&self) -> &sigil_core::genesis::TowerParams; ``` Source line: `988`. ## engine::BlockEngine::governance\_genesis\_params [#engineblockenginegovernance_genesis_params] Return the governance parameters loaded from genesis. Used by RPC `chain_getGenesisConfig` and the governance execution path that needs deposit minimums, voting periods, and quorum thresholds. ```rust pub fn governance_genesis_params(&self) -> &sigil_core::genesis::GovernanceParams; ``` Source line: `996`. ## engine::BlockEngine::execution\_state [#engineblockengineexecution_state] Return a shared reference to the execution state. Used to wire the RPC server so query methods (`sigil_getBalance`, `sigil_getIdentity`, `sigil_getValidator`, `sigil_getValidatorSet`) can read live chain state. ```rust pub fn execution_state(&self) -> Arc; ``` Source line: `1005`. ## engine::BlockEngine::block\_store [#engineblockengineblock_store] Returns a shared reference to the block store. The store is always present — `BlockEngine::new` is fatal if it cannot be opened. ```rust pub fn block_store(&self) -> Arc; ``` Source line: `1012`. ## engine::BlockEngine::parent\_hash\_for\_current\_height [#engineblockengineparent_hash_for_current_height] Hash of the block that should be used as the parent for the current height. At height 1 the parent is the genesis state commitment; after a restart it is the hash of the latest persisted canonical block. ```rust pub fn parent_hash_for_current_height(&self) -> Result; ``` Source line: `1019`. ## engine::BlockEngine::take\_attestation\_rx [#engineblockenginetake_attestation_rx] Take the Tower attestation receiver channel, if present. Must be called exactly once after `BlockEngine::new` to wire the outbound attestation queue to the gossip transport. Returns `None` for non-validator nodes (no tower runtime). ```rust pub fn take_attestation_rx(&self) -> Option; ``` Source line: `1097`. ## engine::BlockEngine::on\_tower\_attestation\_received [#engineblockengineon_tower_attestation_received] Process an inbound Tower attestation received from a peer via gossip. Verifies the signature, persists via `commit_tower_tx`, and advances Casper FFG finality state. Call this from the gossip handler task when a `MessagePayload::TowerAttestation` arrives on `GossipTopic::TowerAttestations`. ```rust pub fn on_tower_attestation_received( &self, msg: sigil_network::message::TowerAttestationMessage, ) -> Result<(), crate::error::NodeError>; ``` Source line: `1110`. ## engine::BlockEngine::run [#engineblockenginerun] Run the block production loop. Takes `&self` — uses AtomicU64 for height. When a bootstrap team is present, the proposer rotates each block via round-robin among block producers. Each block is signed by the proposer agent's Ed25519 key. ```rust pub async fn run(&self) -> Result<(), NodeError>; ``` Source line: `1133`. ## engine::MemoryExecutionState::install\_nft\_durable [#enginememoryexecutionstateinstall_nft_durable] Install a durable NFT store backed by AkashaKV. After this call all NFT reads and writes are routed through the store; the in-memory `HashMap` fields remain available as the test/fallback path when no durable store has been installed. Called from `BlockEngine::new` on startup so the production node has durable NFT state from the very first block; tests may also call this explicitly with a `tempfile`-backed store. ```rust pub fn install_nft_durable( &self, store: crate::nft_durable::ArcNftStore, ) -> Result<(), NodeError>; ``` Source line: `2580`. ## engine::MemoryExecutionState::install\_dex\_durable [#enginememoryexecutionstateinstall_dex_durable] Install a durable native DEX store. After this call all DEX reads and writes use AkashaKV; the in-memory maps remain only as dev/test fallbacks and snapshot mirrors. ```rust pub fn install_dex_durable( &self, store: crate::dex_durable::ArcDexStore, ) -> Result<(), NodeError>; ``` Source line: `2604`. ## engine::MemoryExecutionState::install\_storage\_market\_durable [#enginememoryexecutionstateinstall_storage_market_durable] ```rust pub fn install_storage_market_durable( &self, store: crate::storage_market_durable::ArcStorageMarketStore, ) -> Result<(), NodeError>; ``` Source line: `2672`. ## engine::MemoryExecutionState::install\_nova\_durable [#enginememoryexecutionstateinstall_nova_durable] Install a durable Nova store. After this call all Nova reads and writes use AkashaKV; the in-memory maps remain mirrors for validation snapshots and state-root computation. ```rust pub fn install_nova_durable( &self, store: crate::nova_durable::ArcNovaStore, ) -> Result<(), NodeError>; ``` Source line: `2796`. ## engine::MemoryExecutionState::install\_contract\_durable [#enginememoryexecutionstateinstall_contract_durable] Install a durable Agent Contract Zone store backed by AkashaKV. After this call all contract reads and writes are routed through the store. Called from `BlockEngine::new` on startup so the production node has durable contract state from the very first block. ```rust #[cfg(feature = "contracts")] pub fn install_contract_durable( &self, store: crate::contract_durable::ArcContractStore, ) -> Result<(), NodeError>; ``` Source line: `2862`. ## engine::MemoryExecutionState::install\_tower\_durable [#enginememoryexecutionstateinstall_tower_durable] Install a durable Tower finality store backed by AkashaKV. After this call all Tower reads and writes are routed through the store and survive process restart. Called from `BlockEngine::new` on startup so the production node has durable Tower state from the very first block. ```rust pub fn install_tower_durable( &self, store: crate::tower_durable::ArcTowerStore, ) -> Result<(), NodeError>; ``` Source line: `2945`. ## engine::MemoryExecutionState::install\_gal\_durable [#enginememoryexecutionstateinstall_gal_durable] ```rust #[cfg(feature = "tower")] pub fn install_gal_durable( &self, store: crate::gal_durable::ArcGalStore, ) -> Result<(), NodeError>; ``` Source line: `2967`. ## engine::MemoryExecutionState::install\_governance\_durable [#enginememoryexecutionstateinstall_governance_durable] Wire in the durable AkashaKV-backed Governance store. Called from `BlockEngine::new` so proposal creation, voting, and timelock operations survive process restart. Failure to install is fatal. ```rust pub fn install_governance_durable( &self, store: crate::governance_durable::ArcGovernanceStore, ) -> Result<(), NodeError>; ``` Source line: `3031`. ## engine::MemoryExecutionState::install\_labor\_durable [#enginememoryexecutionstateinstall_labor_durable] Wire in the durable AkashaKV-backed Labor Marketplace store. Called from `BlockEngine::new` so contract creation, milestone release, worker indexes, and audit events survive process restart. Failure to install is fatal. ```rust pub fn install_labor_durable( &self, store: crate::labor_durable::ArcLaborStore, ) -> Result<(), NodeError>; ``` Source line: `3068`. ## engine::MemoryExecutionState::install\_crucible\_durable [#enginememoryexecutionstateinstall_crucible_durable] Wire in the durable AkashaKV-backed Crucible training store. The store is opened on startup even though the execution policy remains disabled by default, so governance activation later cannot lose prior anchors. ```rust pub fn install_crucible_durable( &self, store: crate::crucible_durable::ArcCrucibleStore, ) -> Result<(), NodeError>; ``` Source line: `3092`. ## engine::MemoryExecutionState::install\_crucible\_policy [#enginememoryexecutionstateinstall_crucible_policy] ```rust pub fn install_crucible_policy( &self, policy: sigil_crucible::CruciblePolicy, ) -> Result<(), NodeError>; ``` Source line: `3159`. ## engine::MemoryExecutionState::install\_username\_durable [#enginememoryexecutionstateinstall_username_durable] Wire in the durable AkashaKV-backed username registry. Called from `BlockEngine::new` so register/transfer/release transactions survive process restart. Failure to install is fatal. ```rust pub fn install_username_durable( &self, store: crate::username_durable::ArcUsernameStore, ) -> Result<(), NodeError>; ``` Source line: `3183`. ## engine::MemoryExecutionState::install\_mail\_durable [#enginememoryexecutionstateinstall_mail_durable] ```rust pub fn install_mail_durable( &self, store: crate::mail_durable::ArcMailStore, ) -> Result<(), NodeError>; ``` Source line: `3243`. ## engine::MemoryExecutionState::install\_username\_params [#enginememoryexecutionstateinstall_username_params] Replace the live `UsernameParams` policy (e.g. genesis bootstrap or a future governance param-change hook). ```rust pub fn install_username_params( &self, params: sigil_core::username::UsernameParams, ) -> Result<(), NodeError>; ``` Source line: `3473`. ## engine::MemoryExecutionState::install\_recovery\_durable [#enginememoryexecutionstateinstall_recovery_durable] Wire in the durable AkashaKV-backed recovery store. Called from `BlockEngine::new` so initiated recovery ceremonies survive restart during their multi-day timelock window. Failure to install is fatal. ```rust #[allow(dead_code)] pub fn install_recovery_durable( &self, store: crate::recovery_durable::ArcRecoveryStore, ) -> Result<(), NodeError>; ``` Source line: `3488`. # sigil-node · error URL: https://docs.sigil.ml/reference/rust/sigil-node/error Markdown: https://docs.sigil.ml/reference/rust/sigil-node/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-node/src/error.rs`. SHA-256: `3a599e3c736d120029610f954cdcf3732f150113072131412c30b7c1744b8afc`. 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. ## error::NodeError [#errornodeerror] Errors that can occur during node operation. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, thiserror::Error)] pub enum NodeError { /// Invalid or incomplete node configuration. #[error("config error: {0}")] ConfigError(String), /// Failed to load or validate the genesis configuration. #[error("genesis load failed: {0}")] GenesisLoadFailed(String), /// Storage subsystem error. #[error("storage error: {0}")] StorageError(String), /// Consensus subsystem error. #[error("consensus error: {0}")] ConsensusError(String), /// Network subsystem error. #[error("network error: {0}")] NetworkError(String), /// RPC subsystem error. #[error("rpc error: {0}")] RpcError(String), /// Error during node shutdown. #[error("shutdown error: {0}")] ShutdownError(String), /// Transaction execution error. #[error("execution error: {0}")] ExecutionError(String), /// A transaction targeted a different chain than the block execution /// context. #[error( "invalid transaction chain id at tx index {tx_index}: expected {expected:?}, got {actual:?}" )] InvalidTransactionChainId { /// Transaction index within the block. tx_index: u32, /// Expected chain ID supplied by consensus/startup context. expected: String, /// Chain ID declared by the transaction. actual: String, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// A transaction's Ed25519 signature failed verification. #[error("invalid transaction signature at tx index {tx_index}: {reason}")] InvalidTransactionSignature { /// Transaction index within the block. tx_index: u32, /// Stable, non-secret rejection reason. reason: String, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// A transaction failed signer/public-key policy validation. #[error("invalid transaction signer at tx index {tx_index}: {reason}")] InvalidTransactionSigner { /// Transaction index within the block. tx_index: u32, /// Stable, non-secret rejection reason. reason: String, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// A transaction's nonce did not match the sender's next expected nonce. #[error( "invalid transaction nonce at tx index {tx_index}: sender {sender_did}, expected {expected}, got {actual}" )] InvalidTransactionNonce { /// Transaction index within the block. tx_index: u32, /// Sender DID whose nonce was checked. sender_did: String, /// Next nonce expected by execution state. expected: u64, /// Nonce declared by the transaction. actual: u64, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// A transaction was already durably recorded as included. #[error("transaction replay at tx index {tx_index}: {tx_hash}")] TransactionReplay { /// Transaction index within the block. tx_index: u32, /// Hex-encoded transaction hash. tx_hash: String, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// A transaction violated gas admission bounds. #[error("invalid transaction gas at tx index {tx_index}: {reason}")] InvalidTransactionGas { /// Transaction index within the block. tx_index: u32, /// Stable, non-secret rejection reason. reason: String, /// Receipts already produced before the rejected transaction. partial_receipts: Vec, }, /// Idempotent compute settlement rejected because the receipt/job/task /// tuple has already been settled. #[error("already settled: {0}")] AlreadySettled(String), /// Bootstrap or agent initialization error. #[error("bootstrap error: {0}")] BootstrapError(String), /// Mainnet startup refused because no pre-provisioned validator keys were /// found and auto-generation is forbidden on mainnet. /// /// `path` is the canonical location where the node expected to find /// `validator_keys.json`. Operators must provision keys via HSM, a sealed /// file mount, or by copying an externally generated key file to that path /// before starting the mainnet validator. #[error( "production validator key missing at {path}. \ Mainnet validators must be provisioned with pre-generated or \ HSM-backed Ed25519 keys. Auto-generation and DID-derived keys \ are forbidden on mainnet. \ Operator workflow: (1) generate keys offline or via HSM, \ (2) write validator_keys.json to {path}, \ (3) restart with --validator-key-path if using a custom location. \ See docs/operator/validator-key-provisioning.md for HSM workflows." )] ProductionKeyMissing { /// Canonical path where the key file was expected. path: String, }, } ``` Source line: `8`. ## error::NodeError::with\_partial\_receipts [#errornodeerrorwith_partial_receipts] Attach block-level partial receipts to transaction-validity errors. ```rust pub fn with_partial_receipts(self, partial_receipts: Vec) -> Self; ``` Source line: `152`. # sigil-node · executor URL: https://docs.sigil.ml/reference/rust/sigil-node/executor Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor.md Source declarations, signatures and documentation for executor. Source: `sigil/node/sigil-node/src/executor.rs`. SHA-256: `0e296c403ef21e4fd4e81e81f448be6e3ead66e0bbdfc44fce11d9c6b223f1d3`. 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. ## executor::BOOTSTRAP\_SECURITY\_MIN\_BP\_STAKE [#executorbootstrap_security_min_bp_stake] Bootstrap security floor for Block Producers: 100,000,000 MINT. ```rust pub const BOOTSTRAP_SECURITY_MIN_BP_STAKE: u64; ``` Source line: `65`. ## executor::BOOTSTRAP\_SECURITY\_MIN\_BV\_STAKE [#executorbootstrap_security_min_bv_stake] Bootstrap security floor for Block Validators: 25,000,000 MINT. ```rust pub const BOOTSTRAP_SECURITY_MIN_BV_STAKE: u64; ``` Source line: `67`. ## executor::DEFAULT\_VALIDATOR\_REWARD\_RESERVE\_DID [#executordefault_validator_reward_reserve_did] Default pre-funded account used to pay validator rewards without inflating native supply. ```rust pub const DEFAULT_VALIDATOR_REWARD_RESERVE_DID: &str; ``` Source line: `84`. ## executor::ValidatorRecord [#executorvalidatorrecord] On-chain validator record managed by the executor. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ValidatorRecord { /// OAS DID of the validator. pub did: String, /// micro-MINT staked by the validator itself. pub stake: u64, /// Validator mode: BlockProducer or BlockValidator. pub mode: ValidatorMode, /// Whether this validator is in the active set. pub active: bool, /// Total delegated stake from delegators. pub delegated_stake: u64, /// Total delegation pool shares issued to delegators. #[serde(default)] pub delegated_shares: u64, /// Accumulated rewards in micro-MINT. pub accumulated_rewards: u64, /// Epoch at which unbonding completes (None if not unbonding). pub unbonding_epoch: Option, /// Self-stake waiting out the unbonding period before it can return to the liquid balance. #[serde(default)] pub unbonding_stake: u64, /// Epoch through which a slashed validator is jailed and epoch-excluded. #[serde(default, skip_serializing_if = "Option::is_none")] pub slashed_until_epoch: Option } ``` Source line: `98`. ## executor::ValidatorRecord::total\_stake [#executorvalidatorrecordtotal_stake] Total effective stake (self + delegated). ```rust pub fn total_stake(&self) -> u64; ``` Source line: `126`. ## executor::StakingPolicy [#executorstakingpolicy] Height-gated staking policy used by transaction execution. Existing chains can continue from their current history by configuring a future activation height. Before that height, legacy minimums apply so already-running validator sets keep producing blocks while operators top up. At and after activation, new stakes and post-unstake active eligibility use the upgraded floor. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct StakingPolicy { pub legacy_min_bp_stake: u64, pub legacy_min_bv_stake: u64, pub activation_height: Option, pub activated_min_bp_stake: u64, pub activated_min_bv_stake: u64 } ``` Source line: `139`. ## executor::NativeSupplyPolicy [#executornativesupplypolicy] Native MINT/BITS supply policy enforced by launch-live execution paths. A fixed supply chain must not silently mint rewards. Rewards are paid by debiting a pre-funded reserve account that was included in genesis. ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct NativeSupplyPolicy { pub max_supply: Option, pub validator_reward_reserve_did: Option } ``` Source line: `152`. ## executor::CustomTokenClass [#executorcustomtokenclass] Launch-live custom-token class record. Balances for these token ids use the same deterministic DEX asset-balance table so a freshly minted token can be pooled and traded without a shadow ledger. Amounts are currently bounded to `u64::MAX` at the executor edge because the DEX/labor asset ledger is `u64`. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CustomTokenClass { pub token_id: String, pub ticker: String, pub decimals: u8, pub issuer_did: String, pub controller_did: String, pub supply_policy: SupplyPolicy, pub transfer_policy: Option, pub metadata_uri: Option, pub total_supply: u128 } ``` Source line: `164`. ## executor::DelegationUnbonding [#executordelegationunbonding] Delegated-stake redemption waiting out the unbonding period before withdrawal. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DelegationUnbonding { /// Pool shares redeemed from the delegator position. pub shares: u64, /// Native token amount claimable after `unlock_height`. pub amount: u64, /// Block height at which the claim becomes withdrawable. pub unlock_height: u64 } ``` Source line: `178`. ## executor::AccountSnapshot [#executoraccountsnapshot] Read-only account summary returned to public explorer RPCs. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AccountSnapshot { pub did: String, pub balance: u64, pub nonce: u64, pub staked_amount: u64, pub transaction_count: u64, #[serde(skip_serializing_if = "Option::is_none")] pub identity_doc: Option } ``` Source line: `189`. ## executor::NativeSupplyPolicy::fixed\_at\_genesis [#executornativesupplypolicyfixed_at_genesis] ```rust pub fn fixed_at_genesis(max_supply: u64) -> Self; ``` Source line: `200`. ## executor::StakingPolicy::from\_env [#executorstakingpolicyfrom_env] ```rust pub fn from_env() -> Result; ``` Source line: `221`. ## executor::StakingPolicy::min\_stake\_for\_mode\_at [#executorstakingpolicymin_stake_for_mode_at] ```rust pub fn min_stake_for_mode_at(&self, mode: &ValidatorMode, block_height: u64) -> u64; ``` Source line: `245`. ## executor::ProposalStatus [#executorproposalstatus] Status of a governance proposal. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum ProposalStatus { /// Voting is open. Voting, /// Proposal passed. Passed, /// Proposal rejected. Rejected, /// Proposal cancelled by proposer. Cancelled, /// Proposal executed. Executed, } ``` Source line: `277`. ## executor::Proposal [#executorproposal] On-chain governance proposal. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Proposal { /// Auto-incrementing proposal ID. pub id: u64, /// DID of the proposer. pub proposer: String, /// Proposal title. pub title: String, /// Proposal description. pub description: String, /// Block height at which this proposal was created. pub created_height: u64, /// Block height at which voting ends. pub voting_end_height: u64, /// Total yes votes (stake-weighted, in micro-MINT). pub votes_yes: u64, /// Total no votes (stake-weighted, in micro-MINT). pub votes_no: u64, /// Total abstain votes (stake-weighted, in micro-MINT). pub votes_abstain: u64, /// Current proposal status. pub status: ProposalStatus, /// Deposit amount locked by the proposer. pub deposit: u64 } ``` Source line: `292`. ## executor::StateRootEntry [#executorstaterootentry] One canonical leaf in Sigil's global state commitment. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct StateRootEntry { /// Top-level state namespace, e.g. `balance`, `nonce`, `validator`. pub partition: String, /// Namespaced state key within the partition. pub key: Vec, /// Canonically encoded value bytes. pub value: Vec } ``` Source line: `323`. ## executor::ExecutionState [#executorexecutionstate] State interface for the executor. Provides read/write access to account balances, nonces, identity documents, validator records, delegation mappings, and governance proposals. ```rust pub trait ExecutionState: Send + Sync { // -- Account state -- fn get_balance(&self, did: &str) -> Result; fn set_balance(&self, did: &str, amount: u64) -> Result<(), NodeError>; fn get_nonce(&self, did: &str) -> Result; fn increment_nonce(&self, did: &str) -> Result<(), NodeError>; fn has_sponsored_setup_idempotency( &self, _subject_did: &str, _setup_scope: &SponsoredSetupScope, _idempotency_key: &str, ) -> Result ; fn mark_sponsored_setup_idempotency( &self, _subject_did: &str, _setup_scope: &SponsoredSetupScope, _idempotency_key: &str, ) -> Result<(), NodeError> ; // -- Identity state -- /// Returns the OAS identity document for a DID, or None if not registered. fn get_identity(&self, did: &str) -> Result, NodeError>; /// Stores an OAS identity document for a DID. fn set_identity(&self, did: &str, document: serde_json::Value) -> Result<(), NodeError>; fn get_initial_device_anchor( &self, _subject_did: &str, _device_id: &str, ) -> Result, NodeError> ; fn put_initial_device_anchor( &self, _anchor: sigil_core::InitialDeviceAnchorData, ) -> Result<(), NodeError> ; /// Returns whether this DID received a balance at genesis. fn is_genesis_balance_account(&self, _did: &str) -> Result ; // -- Validator state -- /// Returns the validator record for a DID, or None if not staked. fn get_validator(&self, did: &str) -> Result, NodeError>; /// Stores or updates a validator record. fn set_validator(&self, did: &str, record: ValidatorRecord) -> Result<(), NodeError>; /// Returns all active validators. fn get_active_validators(&self) -> Result, NodeError>; // -- Delegation state -- /// Returns delegation pool shares from `delegator` to `validator`. fn get_delegation(&self, delegator: &str, validator: &str) -> Result; /// Returns all known delegation pool shares for `delegator`. fn list_delegations_for_delegator( &self, delegator: &str, ) -> Result, NodeError> ; /// Sets delegation pool shares from `delegator` to `validator`. fn set_delegation( &self, delegator: &str, validator: &str, amount: u64, ) -> Result<(), NodeError>; /// Returns a pending delegation unbonding claim, if one exists. fn get_delegation_unbonding( &self, delegator: &str, validator: &str, ) -> Result, NodeError> ; /// Sets or clears a pending delegation unbonding claim. fn set_delegation_unbonding( &self, delegator: &str, validator: &str, claim: Option, ) -> Result<(), NodeError> ; // -- Custom token state ------------------------------------------------- fn get_token_class(&self, _token_id: &str) -> Result, NodeError> ; fn put_token_class(&self, _class: CustomTokenClass) -> Result<(), NodeError> ; /// Lists account summaries for explorer/public RPC views. fn list_accounts( &self, _limit: usize, _offset: usize, ) -> Result, NodeError> ; /// Lists registered identity documents for explorer/public RPC views. fn list_identities( &self, limit: usize, offset: usize, ) -> Result, NodeError> ; // -- Governance state -- /// Returns a governance proposal by ID, or None. fn get_proposal(&self, id: u64) -> Result, NodeError>; /// Lists governance proposals for public RPC and wallet views. fn list_proposals( &self, _status: Option, _limit: usize, _offset: usize, ) -> Result, NodeError> ; /// Stores or updates a governance proposal. fn set_proposal(&self, proposal: Proposal) -> Result<(), NodeError>; /// Returns the next proposal ID and increments the counter. fn next_proposal_id(&self) -> Result; /// Returns whether `voter_did` has already voted on `proposal_id`. fn has_voted(&self, proposal_id: u64, voter_did: &str) -> Result; /// Records that `voter_did` has voted on `proposal_id`. fn record_vote(&self, proposal_id: u64, voter_did: &str) -> Result<(), NodeError>; // -- Global Anchor Layer (GAL) ---------------------------------- // // These methods back the public `gal_*` RPC surface used by OAS/HMR // resolvers. Defaults fail closed or return empty so test-only backends // that do not wire GAL cannot accidentally approve production identity // checks. #[cfg(feature = "tower")] fn get_gal_hmr(&self, _did: &str) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_hmr(&self, _anchor: sigil_core::HmrAnchor) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn get_gal_mhr(&self, _did: &str) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_mhr(&self, _anchor: sigil_core::MhrAnchor) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn get_gal_enr(&self, _did: &str) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_enr(&self, _anchor: sigil_core::EnrAnchor) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn get_gal_org_root( &self, _org_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_org_root(&self, _root: sigil_core::OrgLineageRoot) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn get_gal_shard_assignment( &self, _did: &str, ) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_shard_assignment( &self, _assignment: sigil_core::ShardAssignment, ) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn get_gal_revocation( &self, _did: &str, ) -> Result, NodeError> ; #[cfg(feature = "tower")] fn put_gal_revocation(&self, _record: sigil_core::RevocationRecord) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn check_gal_revocation(&self, did: &str) -> Result ; #[cfg(feature = "tower")] fn put_gal_topology(&self, _entry: sigil_core::ShardTopologyEntry) -> Result<(), NodeError> ; #[cfg(feature = "tower")] fn list_gal_topology(&self) -> Result, NodeError> ; /// Return the on-chain governance parameters loaded from genesis. /// /// The default returns `GovernanceParams::default()` so that test /// backends and old-format genesis files that pre-date this field /// continue to work. Production `MemoryExecutionState` overrides this /// to return whatever was stored via `install_governance_policy`. fn governance_params(&self) -> sigil_core::genesis::GovernanceParams ; /// Return the effective staking policy for consensus-critical stake checks. /// /// Production nodes should run with identical environment values or a /// backend override installed at startup. The default keeps legacy behavior /// when no upgrade env is configured. fn staking_policy(&self) -> Result ; /// Return launch activation policy for EOS-style stake collection gating. /// /// Production backends derive this from the fixed staking policy and /// launch environment. Tests can override it directly so environment /// changes do not leak between parallel test cases. fn network_activation_policy(&self) -> Result ; /// Return the native supply policy. /// /// Production backends install a fixed-at-genesis policy during bootstrap. /// The default is uncapped only for older tests and external lightweight /// state implementations that have not opted into launch-live accounting. fn native_supply_policy(&self) -> NativeSupplyPolicy ; /// Return smart-contract platform parameters loaded from genesis. #[cfg(feature = "contracts")] fn contract_params(&self) -> sigil_core::genesis::ContractParams ; /// Return CZAC protocol parameters loaded from genesis. fn czac_params(&self) -> sigil_core::genesis::CzacParams ; /// Return Vigils launch and source-gating parameters loaded from genesis. fn vigils_params(&self) -> sigil_core::genesis::VigilsParams ; /// Transaction signature batch size configured from genesis. /// /// Batch size only affects verifier throughput. It does not change block /// validity, and the batch verifier derives its scalars from the input /// transcript rather than from wall-clock or process RNG. fn signature_batch_size(&self) -> usize ; /// Current epoch for DAO/labor validator snapshots. /// /// Production backends should override this from consensus state. The /// default keeps genesis-free tests deterministic. fn current_epoch_for_dao(&self) -> Result ; /// Current finalized block height used as the DAO snapshot block. /// /// This is deliberately state-derived rather than clock-derived so replay /// and consensus execution see identical validator context. fn current_block_height_for_dao(&self) -> Result ; // -- Crucible training coordination ------------------------------------- // // Defaults fail closed for writes and expose an explicit disabled policy. // Production `MemoryExecutionState` overrides these with durable AkashaKV // storage; lightweight tests must opt in deliberately before transactions // can mutate training state. fn crucible_policy(&self) -> Result ; fn get_training_run( &self, _run_id: &str, ) -> Result, NodeError> ; fn list_training_runs(&self) -> Result, NodeError> ; fn get_training_rollout_batch( &self, _run_id: &str, _batch_id: &str, ) -> Result, NodeError> ; fn list_training_rollout_batches( &self, _run_id: &str, ) -> Result, NodeError> ; fn get_training_weights( &self, _run_id: &str, _model_root: &SigilHash, ) -> Result, NodeError> ; fn list_training_weights( &self, _run_id: &str, ) -> Result, NodeError> ; fn list_training_rewards( &self, _run_id: &str, ) -> Result, NodeError> ; fn list_training_slashes( &self, _run_id: &str, ) -> Result, NodeError> ; fn list_training_events( &self, _run_id: Option<&str>, ) -> Result, NodeError> ; fn commit_crucible_tx( &self, _batch: crate::crucible_durable::CrucibleWriteBatch, ) -> Result<(), NodeError> ; // -- Vigils -------------------------------------------------------------- // // Defaults fail closed for writes so a backend cannot silently accept // autonomous subscription state without storage. Read/list defaults keep // test-only backends usable until they opt in. #[cfg(feature = "vigils-v1")] fn get_vigil_subscription( &self, _subscription_id: &sigil_core::SigilHash, ) -> Result, NodeError> ; #[cfg(feature = "vigils-v1")] fn put_vigil_subscription( &self, _subscription: sigil_core::vigil::VigilSubscription, ) -> Result<(), NodeError> ; #[cfg(feature = "vigils-v1")] fn list_vigil_subscriptions( &self, _subscriber_did: Option<&str>, _limit: u32, ) -> Result, NodeError> ; #[cfg(feature = "vigils-v1")] fn get_vigil_ingestor( &self, _ingestor_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "vigils-v1")] fn put_vigil_ingestor(&self, _ingestor: sigil_core::vigil::Ingestor) -> Result<(), NodeError> ; #[cfg(feature = "vigils-v1")] fn list_vigil_ingestors(&self) -> Result, NodeError> ; #[cfg(feature = "vigils-v1")] fn has_vigil_delivery( &self, _subscription_id: &sigil_core::SigilHash, _event_id: &sigil_core::SigilHash, ) -> Result ; #[cfg(feature = "vigils-v1")] fn put_vigil_delivery( &self, _record: sigil_core::vigil::VigilDeliveryRecord, ) -> Result<(), NodeError> ; #[cfg(feature = "vigils-v1")] fn list_vigil_delivery_history( &self, _subscription_id: &sigil_core::SigilHash, _limit: u32, ) -> Result, NodeError> ; #[cfg(feature = "vigils-v1")] fn schedule_vigil_callback( &self, _callback: sigil_core::vigil::ScheduledVigilCallback, ) -> Result<(), NodeError> ; #[cfg(feature = "vigils-v1")] fn drain_vigil_callbacks_for_height( &self, _height: u64, _limit: u32, ) -> Result, NodeError> ; // -- Tx-inclusion replay barrier (Round-7 P0) -- // // `is_tx_included` and `mark_tx_included` form a durable barrier that // closes the crash-window replay window for non-NFT tx types. The // executor calls `is_tx_included` before its nonce-equality check and // `mark_tx_included` on the success path **before** the sequential // `increment_nonce`. Once the inclusion entry has committed, even a // crash that loses the post-execution nonce write cannot replay the // signed transaction on restart — the inclusion check fires first. // // The default impls return `false` / `Ok(())` so test backends and // genesis-bootstrap code paths that have no durable store still work. // Production `MemoryExecutionState` overrides both to delegate to // `compute_durable` when wired. /// Was this signed transaction already durably recorded as applied? fn is_tx_included(&self, _tx_hash: &[u8; 32]) -> Result ; /// Record this signed transaction as durably applied at `block_height`. /// Must be called BEFORE `increment_nonce` on every successful tx /// (NFT executors that already fold the nonce update into their atomic /// batch should still mark the inclusion so non-`compute` builds remain /// safe under restart). fn mark_tx_included(&self, _tx_hash: &[u8; 32], _block_height: u64) -> Result<(), NodeError> ; // -- Native DEX state --------------------------------------------------- // // DEX is consensus state: pools, LP positions, non-native asset balances, // and audit events must be backed by the same replayable/snapshot-friendly // execution state as balances and nonces. Defaults fail closed for every // write except native MINT balance reads/writes, which deliberately reuse // the account-balance ledger. fn get_dex_pool(&self, _pool_id: &str) -> Result, NodeError> ; fn put_dex_pool(&self, _pool: sigil_core::dex::DexPool) -> Result<(), NodeError> ; fn list_dex_pools(&self) -> Result, NodeError> ; fn get_dex_position( &self, _pool_id: &str, _owner_did: &str, ) -> Result, NodeError> ; fn put_dex_position(&self, _position: sigil_core::dex::DexPosition) -> Result<(), NodeError> ; fn list_dex_positions( &self, _owner_did: Option<&str>, _pool_id: Option<&str>, ) -> Result, NodeError> ; fn get_dex_asset_balance(&self, asset_id: &str, owner_did: &str) -> Result ; fn set_dex_asset_balance( &self, asset_id: &str, owner_did: &str, amount: u64, ) -> Result<(), NodeError> ; fn append_dex_event(&self, _event: sigil_core::dex::DexEvent) -> Result ; fn list_dex_events( &self, _pool_id: Option<&str>, _limit: usize, ) -> Result, NodeError> ; fn commit_dex_tx(&self, _batch: crate::dex_durable::DexWriteBatch) -> Result<(), NodeError> ; // -- Storage Pinning Marketplace state --------------------------------- // // Storage marketplace consensus state contains commitments, provider // records, pin contracts, receipts, challenge records, and slashing / // reward outcomes. Weave bytes stay off-chain. fn get_storage_provider( &self, _provider_did: &str, ) -> Result, NodeError> ; fn list_storage_providers( &self, ) -> Result, NodeError> ; fn get_storage_pin_request( &self, _request_id: &str, ) -> Result, NodeError> ; fn list_storage_pin_requests_by_owner( &self, _owner_did: &str, ) -> Result, NodeError> ; fn get_storage_pin_contract( &self, _contract_id: &str, ) -> Result, NodeError> ; fn list_storage_pin_contracts_by_provider( &self, _provider_did: &str, ) -> Result, NodeError> ; fn list_storage_pin_contracts_by_request( &self, _request_id: &str, ) -> Result, NodeError> ; fn get_storage_pin_receipt( &self, _receipt_id: &str, ) -> Result, NodeError> ; fn list_storage_pin_receipts_by_contract( &self, _contract_id: &str, ) -> Result, NodeError> ; fn get_storage_challenge( &self, _challenge_id: &str, ) -> Result, NodeError> ; fn list_storage_challenges_by_contract( &self, _contract_id: &str, ) -> Result, NodeError> ; fn commit_storage_market_tx( &self, _batch: crate::storage_market_durable::StorageMarketWriteBatch, ) -> Result<(), NodeError> ; // -- Evidence anchoring state ------------------------------------------ // // Reads default to empty; the write path fails closed so a backend // without evidence storage cannot silently accept anchor transactions. /// Fetch one evidence anchor record by deterministic anchor ID. fn get_evidence_anchor( &self, _anchor_id: &str, ) -> Result, NodeError> ; /// List all evidence anchor records for a content digest. fn list_evidence_anchors_by_digest( &self, _digest: &str, ) -> Result, NodeError> ; /// Persist an evidence anchor record (keyed by `record.anchor_id`). fn put_evidence_anchor( &self, _record: sigil_core::evidence::EvidenceAnchorRecord, ) -> Result<(), NodeError> ; // -- Nova metaverse state ---------------------------------------------- // // Nova is launch-scope consensus state. Defaults fail closed for writes so // no backend can appear launch-live without durable world/parcel storage. fn get_nova_world( &self, _world_id: &str, ) -> Result, NodeError> ; fn put_nova_world(&self, _world: sigil_core::nova::NovaWorldConfig) -> Result<(), NodeError> ; fn list_nova_worlds(&self) -> Result, NodeError> ; fn get_nova_parcel( &self, _parcel_id: &str, ) -> Result, NodeError> ; fn put_nova_parcel( &self, _parcel: sigil_core::nova::NovaParcelRecord, ) -> Result<(), NodeError> ; fn list_nova_parcels_in_region( &self, _world_id: &str, _region_x: i32, _region_z: i32, ) -> Result, NodeError> ; fn list_nova_parcels(&self) -> Result, NodeError> ; fn get_nova_building( &self, _building_id: &str, ) -> Result, NodeError> ; fn put_nova_building( &self, _building: sigil_core::nova::NovaBuildingRecord, ) -> Result<(), NodeError> ; fn delete_nova_building(&self, _building_id: &str) -> Result<(), NodeError> ; fn list_nova_buildings(&self) -> Result, NodeError> ; fn get_nova_avatar( &self, _avatar_id: &str, ) -> Result, NodeError> ; fn put_nova_avatar( &self, _avatar: sigil_core::nova::NovaAvatarRecord, ) -> Result<(), NodeError> ; fn list_nova_avatars(&self) -> Result, NodeError> ; fn get_nova_auction( &self, _auction_id: &str, ) -> Result, NodeError> ; fn put_nova_auction( &self, _auction: sigil_core::nova::NovaAuctionRecord, ) -> Result<(), NodeError> ; fn list_nova_auctions(&self) -> Result, NodeError> ; fn commit_nova_tx(&self, _batch: crate::nova_durable::NovaWriteBatch) -> Result<(), NodeError> ; /// Create a disposable, copy-on-write validation snapshot. /// /// Consensus uses this before prevoting so proposal re-execution cannot /// mutate canonical state unless the block later finalizes. fn snapshot_for_validation(&self) -> Result, NodeError> ; /// Compute the deterministic global post-state root. /// /// Production backends must override this with their complete state snapshot. fn compute_state_root(&self) -> Result ; /// Compute the deterministic global post-state root for a specific block /// height. /// /// This is used during rolling protocol upgrades where new state-root /// namespaces must not alter historical replay before their configured /// activation height. Backends that do not need height-aware schemas may /// safely delegate to `compute_state_root`. fn compute_state_root_at_height(&self, _block_height: u64) -> Result ; fn state_root_entries_at_height( &self, _block_height: u64, ) -> Result, NodeError> ; // -- Compute marketplace -- // // The default implementations return NotSupported. Production state // backends (the `engine` module) override the methods they wire; the // executor's compute handlers fail closed when the backend has not yet // implemented compute storage. /// Current epoch (used by compute handlers to time-stamp records). #[cfg(feature = "compute")] fn current_epoch(&self) -> Result ; /// Current block height (snapshot at execution). #[cfg(feature = "compute")] fn current_block_height(&self) -> Result ; /// Snapshot of the chain-config policies the compute executor must /// enforce. The default returns a fail-closed policy: empty resolver /// allowlist (no challenge resolution permitted) and TEE verification /// disabled. Production backends override this from genesis. #[cfg(feature = "compute")] fn compute_policy(&self) -> Result ; /// Phase 13 — return the TEE verifier registry the executor will /// consult on T3 receipt settlement. The default registers the four /// production verifier stubs (each fails closed with /// `FixtureMaterialRequired`). Backends that need to override (e.g. /// tests using `TestAcceptor`, or ops that have plugged in real /// vendor reference material) provide a custom registry. /// /// Only available when the `tee-verify` feature is compiled in; /// production builds without `tee-verify` reject all T3 settlement /// upstream of the verifier check. #[cfg(feature = "tee-verify")] fn tee_verifier(&self) -> Result ; #[cfg(feature = "compute")] fn get_compute_provider( &self, _provider_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_compute_provider( &self, _provider: crate::compute_state::ComputeProvider, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_compute_providers( &self, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn get_compute_escrow( &self, _owner_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_compute_escrow( &self, _escrow: crate::compute_state::ComputeEscrow, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn get_compute_job( &self, _job_id: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_compute_job(&self, _job: crate::compute_state::ComputeJob) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_compute_jobs( &self, _filter: &crate::compute_state::JobIndexFilter, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn get_compute_receipt( &self, _receipt_id: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_compute_receipt( &self, _record: crate::compute_state::ComputeReceiptRecord, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn is_receipt_settled(&self, _receipt_id: &str) -> Result ; #[cfg(feature = "compute")] fn is_receipt_tuple_settled( &self, receipt_id: &str, _job_id: &str, _task_id: Option<&str>, ) -> Result ; #[cfg(feature = "compute")] fn get_compute_challenge( &self, _challenge_id: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_compute_challenge( &self, _challenge: crate::compute_state::ComputeChallenge, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_compute_challenges_by_receipt( &self, _receipt_id: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn append_compute_audit_event( &self, _event: crate::compute_state::ComputeAuditEvent, ) -> Result ; #[cfg(feature = "compute")] fn list_compute_audit_events( &self, _query: &crate::compute_state::AuditQuery, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn append_compute_reputation_signal( &self, _signal: crate::compute_state::ComputeReputationSignal, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_compute_reputation_signals( &self, _provider_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_maca_work_claim( &self, _claim: crate::compute_state::MacaWorkClaim, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn get_maca_work_claim( &self, _work_id: &sigil_core::hash::SigilHash, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_maca_validation_record( &self, _record: crate::compute_state::MacaValidationRecord, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_maca_validation_records( &self, _work_id: &sigil_core::hash::SigilHash, ) -> Result, NodeError> ; // -- MACA epoch / quorum aggregation (Phase 12) ------------------ #[cfg(feature = "compute")] fn get_validator_agent( &self, _agent_did: &str, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_validator_agent( &self, _record: crate::compute_state::ValidatorAgentRecord, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_validator_agents( &self, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn get_maca_beacon( &self, _epoch_id: u64, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_maca_beacon( &self, _record: crate::compute_state::BeaconRecord, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn get_maca_epoch( &self, _epoch_id: u64, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_maca_epoch(&self, _epoch: crate::compute_state::MacaEpoch) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_maca_epochs( &self, _query: &crate::compute_state::EpochQuery, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn get_maca_quorum_proof( &self, _epoch_id: u64, _work_id: &sigil_core::hash::SigilHash, ) -> Result, NodeError> ; #[cfg(feature = "compute")] fn put_maca_quorum_proof( &self, _proof: crate::compute_state::MacaQuorumProof, ) -> Result<(), NodeError> ; #[cfg(feature = "compute")] fn list_maca_quorum_proofs( &self, _epoch_id: u64, ) -> Result, NodeError> ; /// Returns all `MacaValidationRecord`s submitted under a given epoch /// + work_id pair. Used by `MacaFinalizeEpoch` to aggregate. #[cfg(feature = "compute")] fn list_maca_attestations_for_epoch_work( &self, _epoch_id: u64, _work_id: &sigil_core::hash::SigilHash, ) -> Result, NodeError> ; // -- DAO Work OS state (Phase 3) --------------------------------- // // Mandate / labor-contract storage backing the validators in // `sigil_state::dao_validators`. Default implementations fail // closed when the backend has not wired DAO state — protected // transactions then produce typed `Failed` receipts rather than // silently no-op'ing. /// Fetch a Mandate by its `mandate_id` (DID), or `None` if absent. #[cfg(feature = "dao-validators")] fn get_mandate(&self, _mandate_id: &str) -> Result, NodeError> ; /// Insert or update a Mandate. Replaces any existing record at the /// same `mandate_id`. #[cfg(feature = "dao-validators")] fn put_mandate(&self, _mandate: sigil_core::Mandate) -> Result<(), NodeError> ; /// Return active mandates for state-derived DAO validator snapshots. #[cfg(feature = "dao-validators")] fn list_active_mandates(&self) -> Result, NodeError> ; /// Fetch a `LaborJob` posting by its `job_id`, or `None` if absent. fn get_labor_job(&self, _job_id: &str) -> Result, NodeError> ; /// Insert or update a `LaborJob`. Replaces any existing record at the /// same `job_id`. fn put_labor_job(&self, _job: sigil_core::LaborJob) -> Result<(), NodeError> ; /// Fetch a `LaborBid` by its `bid_id`, or `None` if absent. fn get_labor_bid(&self, _bid_id: &str) -> Result, NodeError> ; /// Insert or update a `LaborBid`. Replaces any existing record at the /// same `bid_id`. fn put_labor_bid(&self, _bid: sigil_core::LaborBid) -> Result<(), NodeError> ; /// Return all `bid_id` strings for bids submitted against `job_id`. fn list_labor_bids_for_job(&self, _job_id: &str) -> Result, NodeError> ; /// Look up the `contract_id` associated with `dispute_id`. /// Returns `None` if the dispute index entry does not exist. fn get_labor_dispute_contract_id( &self, _dispute_id: &str, ) -> Result, NodeError> ; /// Fetch a LaborContract by its `contract_id`, or `None` if absent. fn get_labor_contract( &self, _contract_id: &str, ) -> Result, NodeError> ; /// Insert or update a LaborContract. Replaces any existing record /// at the same `contract_id`. fn put_labor_contract(&self, _contract: sigil_core::LaborContract) -> Result<(), NodeError> ; /// Return labor contracts for state-derived DAO validator snapshots. fn list_labor_contracts(&self) -> Result, NodeError> ; /// Fetch a single durable labor milestone. fn get_labor_milestone( &self, _contract_id: &str, _milestone_index: u32, ) -> Result, NodeError> ; /// List milestones for a labor contract. fn list_labor_milestones( &self, _contract_id: &str, ) -> Result, NodeError> ; /// Return all labor jobs known to this state backend. fn list_labor_jobs(&self) -> Result, NodeError> ; /// Return all labor bids known to this state backend. fn list_labor_bids(&self) -> Result, NodeError> ; /// Fetch exact labor escrow accounting for a contract. fn get_labor_escrow( &self, _contract_id: &str, ) -> Result, NodeError> ; /// Insert or update exact labor escrow accounting. fn put_labor_escrow(&self, _escrow: sigil_core::LaborEscrow) -> Result<(), NodeError> ; /// Fetch a full labor dispute record. fn get_labor_dispute( &self, _dispute_id: &str, ) -> Result, NodeError> ; /// Insert or update a full labor dispute record. fn put_labor_dispute(&self, _dispute: sigil_core::Dispute) -> Result<(), NodeError> ; /// List full labor dispute records. fn list_labor_disputes( &self, _state: Option, ) -> Result, NodeError> ; /// Fetch an open bounty offer by ID. fn get_labor_offer( &self, _offer_id: &str, ) -> Result, NodeError> ; /// List open bounty offers, optionally filtered by state. fn list_labor_offers( &self, _state: Option, ) -> Result, NodeError> ; /// Fetch an open bounty claim by ID. fn get_labor_claim( &self, _claim_id: &str, ) -> Result, NodeError> ; /// List open bounty claims, optionally filtered by offer and claimant. fn list_labor_claims( &self, _offer_id: Option<&str>, _claimant_did: Option<&str>, ) -> Result, NodeError> ; /// Replay/equivocation guard for claimant deliverables. fn get_labor_claim_index( &self, _offer_id: &str, _claimant_did: &str, _deliverable_hash: &str, ) -> Result, NodeError> ; /// Fetch an attestation by ID. fn get_labor_claim_attestation( &self, _attestation_id: &str, ) -> Result, NodeError> ; /// List attestations for one claim. fn list_labor_claim_attestations( &self, _claim_id: &str, ) -> Result, NodeError> ; /// Fetch durable Labor audit events in a block-height range. fn list_labor_events( &self, _from_height: u64, _to_height: u64, ) -> Result, NodeError> ; // -- Agent Contract Zones (Phase 15) ------------------------------ // // `contracts` feature surface. Default implementations fail closed // so that the four contract transactions (DeployContract, // CallContract, UpgradeContract, SetContractPolicy) cannot silently // no-op when the backend has not wired contract storage. /// Get a contract record by DID. Returns `None` if not deployed. #[cfg(feature = "contracts")] fn get_contract( &self, _contract_did: &str, ) -> Result, NodeError> ; /// Insert or replace a contract record. #[cfg(feature = "contracts")] fn put_contract(&self, _record: sigil_execution::ContractRecord) -> Result<(), NodeError> ; /// List all contracts deployed in `zone_id`. #[cfg(feature = "contracts")] fn list_zone_contracts( &self, _zone_id: &str, ) -> Result, NodeError> ; /// List all known Organization Zones in deterministic order. #[cfg(feature = "contracts")] fn list_contract_zones(&self) -> Result, NodeError> ; /// Get an `OrganizationZone` by id. #[cfg(feature = "contracts")] fn get_zone( &self, _zone_id: &str, ) -> Result, NodeError> ; /// Insert or replace an `OrganizationZone`. #[cfg(feature = "contracts")] fn put_zone(&self, _zone: sigil_execution::OrganizationZone) -> Result<(), NodeError> ; /// Read a single key from a contract's keyed state. Returns `None` /// if the key is unset. #[cfg(feature = "contracts")] fn get_contract_state( &self, _contract_did: &str, _key: &[u8], ) -> Result>, NodeError> ; /// Write a single key into a contract's keyed state. #[cfg(feature = "contracts")] fn put_contract_state( &self, _contract_did: &str, _key: &[u8], _value: &[u8], ) -> Result<(), NodeError> ; /// Delete a single key from a contract's keyed state. #[cfg(feature = "contracts")] fn delete_contract_state(&self, _contract_did: &str, _key: &[u8]) -> Result<(), NodeError> ; /// Compute a deterministic state-root for a contract over its /// keyed state. Default returns `SigilHash::ZERO`. Production /// backends override with a Merkle-style root. #[cfg(feature = "contracts")] fn contract_state_root( &self, _contract_did: &str, ) -> Result ; /// Append a contract event. Returns the assigned monotonic seq. #[cfg(feature = "contracts")] fn append_contract_event( &self, _event: sigil_execution::ContractEvent, ) -> Result ; /// List contract events matching `query`. Default returns empty. #[cfg(feature = "contracts")] fn list_contract_events( &self, _query: &sigil_execution::ContractEventQuery, ) -> Result, NodeError> ; /// Get the WASM bytecode blob keyed by its content-addressed hash. /// `None` if no blob has been registered for `code_hash`. #[cfg(feature = "contracts")] fn get_code_blob( &self, _code_hash: &sigil_core::hash::SigilHash, ) -> Result>, NodeError> ; /// Insert a content-addressed WASM bytecode blob. The hash MUST /// match `SigilHash::digest(bytes)`; backends MUST verify before /// persisting. #[cfg(feature = "contracts")] fn put_code_blob( &self, _code_hash: &sigil_core::hash::SigilHash, _bytes: &[u8], ) -> Result<(), NodeError> ; // -- Cross-zone messaging (Phase 15-K) -- // // The contract host fn `send_zone_message` enqueues messages here. // The target zone's executor drains them in a subsequent block via // `list_pending_zone_messages` + `mark_zone_message_delivered`. // Inline cross-zone delivery is deliberately out of scope — message // delivery is a separate consensus step, in line with the design // doc. #[cfg(feature = "contracts")] fn enqueue_zone_message( &self, _msg: sigil_execution::CrossZoneMessage, ) -> Result<(), NodeError> ; #[cfg(feature = "contracts")] fn list_pending_zone_messages( &self, _target_zone: &str, ) -> Result, NodeError> ; #[cfg(feature = "contracts")] fn mark_zone_message_delivered( &self, _msg_id: &str, _status: sigil_execution::MessageStatus, ) -> Result<(), NodeError> ; // -- Native NFT state (unconditional — NFTs are core, not optional) ------- // // Default implementations fail closed so that callers never silently // no-op on backends without NFT storage. // `MemoryExecutionState` overrides all of these below. /// Fetch an NFT collection by id, or `None` if not found. fn get_nft_collection( &self, _collection_id: &sigil_core::nft::CollectionId, ) -> Result, NodeError> ; /// Insert or replace an NFT collection record. fn put_nft_collection( &self, _collection: sigil_core::nft::NftCollection, ) -> Result<(), NodeError> ; /// Fetch an individual NFT token, or `None` if not found. fn get_nft_token( &self, _collection_id: &sigil_core::nft::CollectionId, _token_id: sigil_core::nft::TokenId, ) -> Result, NodeError> ; /// Insert or replace an NFT token record. fn put_nft_token(&self, _token: sigil_core::nft::NftToken) -> Result<(), NodeError> ; /// Delete a token record (used on burn). No-op if already absent. fn delete_nft_token( &self, _collection_id: &sigil_core::nft::CollectionId, _token_id: sigil_core::nft::TokenId, ) -> Result<(), NodeError> ; /// Return all `OwnerIndexEntry` records for `owner_did`, paged. /// /// `limit = 0` means "return all". Entries are returned in insertion order. fn list_nfts_by_owner( &self, _owner_did: &str, _limit: usize, _offset: usize, ) -> Result, NodeError> ; /// Upsert the owner-index entry for `(collection_id, owner_did)`. fn put_owner_index_entry( &self, _entry: sigil_core::nft::OwnerIndexEntry, ) -> Result<(), NodeError> ; /// Remove a token from the owner-index entry for `(collection_id, owner_did)`. /// /// If the resulting token list is empty, the entry may be deleted. fn remove_owner_index_entry( &self, _collection_id: &sigil_core::nft::CollectionId, _owner_did: &str, _token_id: sigil_core::nft::TokenId, ) -> Result<(), NodeError> ; /// Fetch the DID-identity index for `subject_did`, or `None`. fn get_did_identity_nft( &self, _subject_did: &str, ) -> Result, NodeError> ; /// Upsert the DID-identity index for a subject. fn put_did_identity_nft( &self, _index: sigil_core::nft::DidIdentityIndex, ) -> Result<(), NodeError> ; /// Remove a `(collection_id, token_id)` pair from the DID-identity index. /// /// Used on burn of an identity token. No-op if not present. fn remove_did_identity_nft( &self, _subject_did: &str, _collection_id: &sigil_core::nft::CollectionId, _token_id: sigil_core::nft::TokenId, ) -> Result<(), NodeError> ; /// Append an NFT lifecycle event to the event log. Returns the /// assigned monotonic sequence number. fn append_nft_event(&self, _event: sigil_core::nft::NftEvent) -> Result ; /// List NFT events, optionally filtered by collection. Default returns /// empty. fn list_nft_events( &self, _collection_id: Option<&sigil_core::nft::CollectionId>, ) -> Result, NodeError> ; /// Commit a [`crate::nft_durable::NftWriteBatch`] atomically. /// /// This is the **only** write path that NFT transaction handlers must use. /// All mutations accumulated inside the batch are applied in a single MVCC /// transaction (when backed by AkashaKV) so a crash mid-handler leaves no /// partial state behind. /// /// Default implementation: **fail closed** — callers must explicitly /// override this method for any backend that actually persists NFT state. /// `MemoryExecutionState` overrides it to dispatch through the durable /// store when one is installed, or to apply ops sequentially in-memory. fn commit_nft_tx(&self, _batch: crate::nft_durable::NftWriteBatch) -> Result<(), NodeError> ; /// Commit a [`crate::compute_durable::ComputeWriteBatch`] atomically. /// /// This is the **only** write path that compute marketplace transaction /// handlers must use. All mutations accumulated inside the batch are /// applied in a single AkashaKV MVCC transaction so a crash mid-handler /// leaves no partial state behind. /// /// Default implementation: **fail closed** — callers must explicitly /// override this method for any backend that actually persists compute /// state. `MemoryExecutionState` overrides it to dispatch through the /// durable store when one is installed, or to apply ops sequentially /// in-memory. #[cfg(feature = "compute")] fn commit_compute_tx( &self, _batch: crate::compute_durable::ComputeWriteBatch, ) -> Result<(), NodeError> ; /// Commit a [`crate::contract_durable::ContractWriteBatch`] atomically. /// /// This is the **only** write path that contract transaction handlers must /// use. All mutations accumulated in the batch (contract records, keyed /// state, code blobs, zones, events, cross-zone messages) are applied in a /// single AkashaKV MVCC transaction so a crash mid-handler leaves no /// partial state behind. /// /// Default implementation: **fail closed** — callers must explicitly /// override this method for any backend that actually persists contract /// state. `MemoryExecutionState` overrides it to dispatch through the /// AkashaKV durable store when one is installed, or to apply ops /// sequentially in-memory (test/dev only, no crash-safety guarantee). #[cfg(feature = "contracts")] fn commit_contract_tx( &self, _batch: crate::contract_durable::ContractWriteBatch, ) -> Result<(), NodeError> ; // -- Tower (Casper FFG epoch finality) — core consensus, unconditional ---- // // Tower is not feature-gated. Every node must be able to read and write // Tower finality state. Default implementations fail closed so that // callers see a clear error rather than silent data loss when the backend // has not yet wired Tower storage. `MemoryExecutionState` overrides all // of these to dispatch through the AkashaKV durable store when one is // installed, or to return the fail-closed error otherwise. /// Fetch a Tower validator record by DID. Returns `None` if not found. fn get_tower_validator( &self, _did: &str, ) -> Result, NodeError> ; /// Insert or replace a Tower validator record. fn put_tower_validator( &self, _record: sigil_tower::types::ValidatorRecord, ) -> Result<(), NodeError> ; /// Return all Tower validator records. fn list_tower_validators(&self) -> Result, NodeError> ; /// Fetch accepted Tower slashing evidence by evidence hash. fn get_tower_evidence( &self, _evidence_hash: &SigilHash, ) -> Result, NodeError> ; /// Fetch a finality checkpoint by epoch. Returns `None` if not found. fn get_tower_checkpoint( &self, _epoch: u64, ) -> Result, NodeError> ; /// Insert or replace a finality checkpoint. fn put_tower_checkpoint( &self, _cp: sigil_tower::types::FinalityCheckpoint, ) -> Result<(), NodeError> ; /// Fetch the persisted finality state snapshot (justified/finalized epoch /// highwater marks). Returns `None` on a fresh store. fn get_tower_finality_state( &self, ) -> Result, NodeError> ; /// Persist the finality state snapshot. fn put_tower_finality_state( &self, _snap: crate::tower_durable::FinalityStateSnapshot, ) -> Result<(), NodeError> ; /// Store a Casper FFG attestation (vote) for `(target_epoch, voter_did)`. fn put_tower_attestation( &self, _vote: sigil_tower::types::FinalityVote, ) -> Result<(), NodeError> ; /// Return all attestations cast for `epoch`. fn list_tower_attestations_for_epoch( &self, _epoch: u64, ) -> Result, NodeError> ; /// Mark `epoch` as justified. fn tower_mark_justified(&self, _epoch: u64) -> Result<(), NodeError> ; /// Mark `epoch` as finalized. fn tower_mark_finalized(&self, _epoch: u64) -> Result<(), NodeError> ; /// Returns `true` if `epoch` has been marked finalized. fn tower_is_epoch_finalized(&self, _epoch: u64) -> Result ; /// Return all epoch numbers that have been finalized, in ascending order. fn list_tower_finalized_epochs(&self) -> Result, NodeError> ; /// Apply all operations in `batch` atomically via a single AkashaKV MVCC /// transaction. Fail closed when no durable Tower store is wired. fn commit_tower_tx( &self, _batch: crate::tower_durable::TowerWriteBatch, ) -> Result<(), NodeError> ; /// Apply all governance operations in `batch` atomically via a single /// AkashaKV MVCC transaction. Fail closed when no durable Governance store /// is wired — ensures proposal creation and vote recording never leave /// partial state on disk. fn commit_governance_tx( &self, _batch: crate::governance_durable::GovernanceWriteBatch, ) -> Result<(), NodeError> ; /// Apply all labor operations in `batch` atomically via a single AkashaKV /// MVCC transaction. Fail closed when no durable Labor store is wired — /// ensures contract creation and milestone release never leave partial /// state on disk. fn commit_labor_tx( &self, _batch: crate::labor_durable::LaborWriteBatch, ) -> Result<(), NodeError> ; // -- Username state ----------------------------------------------------- // // Default impls return None / empty / default-params / fail-closed so that // every existing test backend keeps compiling. Production // `MemoryExecutionState` overrides these to route through // `DurableUsernameStore` and the in-memory mirror. /// Username system parameters (length-tier prices, multipliers, reserved /// list, dispute multisig DIDs). Default returns /// `UsernameParams::default()` for backward compatibility. fn username_params(&self) -> sigil_core::username::UsernameParams ; /// Fetch a username record by canonical name. Default returns `None`. fn username_get( &self, _canonical_name: &str, ) -> Result, NodeError> ; /// Look up a DID's primary `@username`. Default returns `None`. fn username_lookup_reverse(&self, _owner_did: &str) -> Result, NodeError> ; /// List all username records owned by `owner_did`. Default returns empty. fn username_list_for_owner( &self, _owner_did: &str, ) -> Result, NodeError> ; /// Search usernames by ASCII prefix, returning up to `limit` rows. The /// default returns empty so backends without a username index do not /// silently return wrong data. fn username_search_prefix( &self, _prefix: &str, _limit: usize, ) -> Result, NodeError> ; /// Fetch a premium-name auction by canonical name. Default returns `None`. fn username_auction_get( &self, _canonical_name: &str, ) -> Result, NodeError> ; /// List all open premium-name auctions. Default returns empty. fn username_auctions_list_open( &self, ) -> Result, NodeError> ; /// Fetch a username dispute by deterministic dispute ID. Default returns /// `None` so backends without username disputes fail closed in handlers. fn username_dispute_get( &self, _dispute_id: &str, ) -> Result, NodeError> ; /// List all currently-filed (unresolved) username disputes. Default empty. fn username_disputes_list_open( &self, ) -> Result, NodeError> ; /// Apply all username operations in `batch` atomically. Fail closed when /// no username state is wired so the executor cannot silently no-op. fn commit_username_tx( &self, _batch: crate::username_durable::UsernameWriteBatch, ) -> Result<(), NodeError> ; // -- Sigil Mail + SNS state -------------------------------------------- // // Defaults return empty/fail-closed so tests with custom state backends // keep compiling while production `MemoryExecutionState` wires durable // AkashaKV-backed storage. fn mail_get_mailbox( &self, _mailbox_id: &str, ) -> Result, NodeError> ; fn mail_list_mailboxes_by_owner( &self, _subject_did: &str, ) -> Result, NodeError> ; fn mail_get_policy( &self, _mailbox_id: &str, _version: Option, ) -> Result, NodeError> ; fn mail_get_keys( &self, _mailbox_id: &str, _purpose: Option<&str>, ) -> Result, NodeError> ; fn mail_get_delivery( &self, _delivery_commitment_id: &str, ) -> Result, NodeError> ; fn mail_has_nonce(&self, _actor_did: &str, _nonce: &str) -> Result ; fn mail_list_deliveries_by_recipient( &self, _mailbox_id: &str, ) -> Result, NodeError> ; fn mail_list_deliveries_by_sender( &self, _sender_route_id: &str, ) -> Result, NodeError> ; fn mail_get_delegation( &self, _grant_id: &str, ) -> Result, NodeError> ; fn mail_list_delegations( &self, _mailbox_id: &str, ) -> Result, NodeError> ; fn mail_get_abuse_report( &self, _abuse_report_id: &str, ) -> Result, NodeError> ; fn sns_get_name( &self, _name_hash: &str, ) -> Result, NodeError> ; fn sns_get_records( &self, _name_hash: &str, ) -> Result, NodeError> ; fn sns_get_registration_commitment( &self, _commitment: &str, ) -> Result, NodeError> ; fn sns_get_sealed_bid( &self, _commitment: &str, ) -> Result, NodeError> ; fn sns_get_auction( &self, _auction_id: &str, ) -> Result, NodeError> ; fn commit_mail_tx(&self, _batch: crate::mail_durable::MailWriteBatch) -> Result<(), NodeError> ; // -- Recovery state ----------------------------------------------------- // // Default impls return None / fail-closed so existing test backends // keep compiling without changes. Production `MemoryExecutionState` // overrides them to route through the durable AkashaKV-backed store // and the in-memory mirror. fn recovery_config_get( &self, _subject_did: &str, ) -> Result, NodeError> ; fn recovery_ceremony_get( &self, _ceremony_id: &str, ) -> Result, NodeError> ; fn recovery_active_for(&self, _subject_did: &str) -> Result, NodeError> ; fn commit_recovery_tx( &self, _batch: crate::recovery_durable::RecoveryWriteBatch, ) -> Result<(), NodeError> ; } ``` Source line: `368`. ## executor::DaoValidatorBacking [#executordaovalidatorbacking] Backing for DAO Work OS state-transition validators. Always present in the type system (so default-feature builds compile and always match the protected transactions explicitly), but only carries a context when the `dao-validators` feature is enabled and a context was supplied. Default = `Disabled` → protected DAO transactions fail closed. `Wired(ctx)` → protected DAO transactions consume `ctx` to look up pre-built \[`crate::executor_dao::GalSnapshot`]s. ```rust #[derive(Clone, Copy)] pub struct DaoValidatorBacking<'a> { } ``` Source line: `2692`. ## executor::DaoValidatorBacking\<'a>::disabled [#executordaovalidatorbackingadisabled] Disabled backing: protected DAO transactions fail closed. ```rust pub const fn disabled() -> Self; ``` Source line: `2701`. ## executor::DaoValidatorBacking\<'a>::wired [#executordaovalidatorbackingawired] Wire a DAO validator context. Only available when `dao-validators` is enabled. ```rust #[cfg(feature = "dao-validators")] pub const fn wired(ctx: &'a crate::executor_dao::DaoValidatorContext) -> Self; ``` Source line: `2713`. ## executor::DaoValidatorBacking\<'a>::context [#executordaovalidatorbackingacontext] Borrow the wired context, if any. ```rust #[cfg(feature = "dao-validators")] pub const fn context(&self) -> Option<&'a crate::executor_dao::DaoValidatorContext>; ``` Source line: `2719`. ## executor::build\_dao\_validator\_context [#executorbuild_dao_validator_context] Build the deterministic DAO validator context consumed by production block execution. The builder reads only `ExecutionState`; it performs no I/O, no RNG, and no clock reads. ```rust #[cfg(feature = "dao-validators")] pub fn build_dao_validator_context( state: &dyn ExecutionState, ) -> Result; ``` Source line: `2734`. ## executor::execute\_block [#executorexecute_block] Execute all transactions in a block, producing receipts. Production entry point wires state-derived DAO/labor validator backing when the `dao-validators` feature is compiled in. ```rust pub fn execute_block( block: &Block, state: &dyn ExecutionState, expected_chain_id: &str, ) -> Result, NodeError>; ``` Source line: `2743`. ## executor::execute\_block\_with\_dao\_backing [#executorexecute_block_with_dao_backing] Execute all transactions in a block with an explicit DAO validator backing. Use \[`DaoValidatorBacking::wired`] (feature-gated) when the block contains protected DAO transactions. ```rust pub fn execute_block_with_dao_backing( block: &Block, state: &dyn ExecutionState, expected_chain_id: &str, dao: DaoValidatorBacking<'_>, ) -> Result, NodeError>; ``` Source line: `2773`. # sigil-node · executor_compute URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_compute Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_compute.md Source declarations, signatures and documentation for executor_compute. Source: `sigil/node/sigil-node/src/executor_compute.rs`. SHA-256: `0c6e4c9bbebc01bb07551fd997bff46febe9a0febf758c5bce9ec3f359eeacfe`. 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. Module condition: ```rust #[cfg(feature = "compute")] ``` ## executor\_compute::execute\_provider\_register [#executor_computeexecute_provider_register] ```rust #[cfg(feature = "compute")] pub fn execute_provider_register( sender: &str, data: &ComputeProviderRegisterData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `212`. ## executor\_compute::execute\_provider\_update [#executor_computeexecute_provider_update] ```rust #[cfg(feature = "compute")] pub fn execute_provider_update( sender: &str, data: &ComputeProviderUpdateData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `295`. ## executor\_compute::execute\_provider\_relayer\_register [#executor_computeexecute_provider_relayer_register] ```rust #[cfg(feature = "compute")] pub fn execute_provider_relayer_register( sender: &str, data: &ComputeProviderRelayerData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `369`. ## executor\_compute::execute\_provider\_relayer\_revoke [#executor_computeexecute_provider_relayer_revoke] ```rust #[cfg(feature = "compute")] pub fn execute_provider_relayer_revoke( sender: &str, data: &ComputeProviderRelayerData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `428`. ## executor\_compute::execute\_provider\_exit [#executor_computeexecute_provider_exit] ```rust #[cfg(feature = "compute")] pub fn execute_provider_exit( sender: &str, data: &ComputeProviderExitData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `483`. ## executor\_compute::execute\_escrow\_fund [#executor_computeexecute_escrow_fund] ```rust #[cfg(feature = "compute")] pub fn execute_escrow_fund( sender: &str, data: &ComputeEscrowFundData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `548`. ## executor\_compute::execute\_escrow\_withdraw [#executor_computeexecute_escrow_withdraw] ```rust #[cfg(feature = "compute")] pub fn execute_escrow_withdraw( sender: &str, data: &ComputeEscrowWithdrawData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `616`. ## executor\_compute::execute\_receipt\_settle [#executor_computeexecute_receipt_settle] ```rust #[cfg(feature = "compute")] pub fn execute_receipt_settle( sender: &str, data: &ComputeReceiptSettleData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `673`. ## executor\_compute::execute\_challenge [#executor_computeexecute_challenge] ```rust #[cfg(feature = "compute")] pub fn execute_challenge( sender: &str, data: &ComputeChallengeData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `977`. ## executor\_compute::execute\_challenge\_resolve [#executor_computeexecute_challenge_resolve] ```rust #[cfg(feature = "compute")] pub fn execute_challenge_resolve( sender: &str, data: &ComputeChallengeResolveData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1072`. ## executor\_compute::execute\_maca\_register\_validator\_agent [#executor_computeexecute_maca_register_validator_agent] ```rust #[cfg(feature = "compute")] pub fn execute_maca_register_validator_agent( sender: &str, data: &sigil_core::transaction::MacaRegisterValidatorAgentData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1338`. ## executor\_compute::execute\_maca\_publish\_beacon [#executor_computeexecute_maca_publish_beacon] ```rust #[cfg(feature = "compute")] pub fn execute_maca_publish_beacon( sender: &str, data: &sigil_core::transaction::MacaPublishBeaconData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1390`. ## executor\_compute::execute\_maca\_propose\_epoch [#executor_computeexecute_maca_propose_epoch] ```rust #[cfg(feature = "compute")] pub fn execute_maca_propose_epoch( sender: &str, data: &sigil_core::transaction::MacaProposeEpochData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1461`. ## executor\_compute::execute\_maca\_submit\_attestation [#executor_computeexecute_maca_submit_attestation] ```rust #[cfg(feature = "compute")] pub fn execute_maca_submit_attestation( sender: &str, data: &sigil_core::transaction::MacaSubmitAttestationData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1590`. ## executor\_compute::execute\_maca\_finalize\_epoch [#executor_computeexecute_maca_finalize_epoch] ```rust #[cfg(feature = "compute")] pub fn execute_maca_finalize_epoch( sender: &str, data: &sigil_core::transaction::MacaFinalizeEpochData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1687`. ## executor\_compute::provider\_reputation\_score [#executor_computeprovider_reputation_score] Return the cumulative reputation score for a provider summed from signals. ```rust #[cfg(feature = "compute")] pub fn provider_reputation_score( provider_did: &str, state: &dyn ExecutionState, ) -> Result; ``` Source line: `1860`. # sigil-node · executor_contract URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_contract Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_contract.md Source declarations, signatures and documentation for executor_contract. Source: `sigil/node/sigil-node/src/executor_contract.rs`. SHA-256: `7da2d6ddde2cf76977abc880a19b8c2ff6a08736b7102de7f8f63de6c2a7d494`. 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. Module condition: ```rust #[cfg(feature = "contracts")] ``` ## executor\_contract::CONTRACT\_TX\_BASE\_GAS [#executor_contractcontract_tx_base_gas] Gas charged for the structural part of a deploy / call / upgrade set-policy transaction (not including any WASM execution fuel). ```rust #[cfg(feature = "contracts")] pub const CONTRACT_TX_BASE_GAS: u64; ``` Source line: `42`. ## executor\_contract::REGISTER\_CODE\_BASE\_GAS [#executor_contractregister_code_base_gas] Structural gas charged for registering a code blob. ```rust #[cfg(feature = "contracts")] pub const REGISTER_CODE_BASE_GAS: u64; ``` Source line: `44`. ## executor\_contract::REGISTER\_CODE\_GAS\_PER\_KIB [#executor_contractregister_code_gas_per_kib] Additional gas charged per started KiB of registered code. ```rust #[cfg(feature = "contracts")] pub const REGISTER_CODE_GAS_PER_KIB: u64; ``` Source line: `46`. ## executor\_contract::MAX\_CROSS\_ZONE\_DELIVERIES\_PER\_BLOCK [#executor_contractmax_cross_zone_deliveries_per_block] Maximum pending cross-zone messages delivered from any one target zone per block. The bound prevents one zone from starving local execution. ```rust #[cfg(feature = "contracts")] pub const MAX_CROSS_ZONE_DELIVERIES_PER_BLOCK: usize; ``` Source line: `49`. ## executor\_contract::DEFAULT\_CROSS\_ZONE\_DELIVERY\_GAS [#executor_contractdefault_cross_zone_delivery_gas] Default fuel for cross-zone delivery envelopes when the message did not carry forwarded gas and the envelope does not override it. ```rust #[cfg(feature = "contracts")] pub const DEFAULT_CROSS_ZONE_DELIVERY_GAS: u64; ``` Source line: `52`. ## executor\_contract::CrossZoneDeliveryEnvelope [#executor_contractcrosszonedeliveryenvelope] ```rust #[cfg(feature = "contracts")] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CrossZoneDeliveryEnvelope { pub contract_did: String, pub function: String, #[serde(default)] pub args: serde_json::Value, #[serde(default, skip_serializing_if = "Option::is_none")] pub gas_budget: Option } ``` Source line: `55`. ## executor\_contract::CrossZoneDeliveryReport [#executor_contractcrosszonedeliveryreport] ```rust #[cfg(feature = "contracts")] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub struct CrossZoneDeliveryReport { pub delivered: usize, pub failed: usize, pub skipped_inactive_zone: usize } ``` Source line: `65`. ## executor\_contract::deliver\_cross\_zone\_messages [#executor_contractdeliver_cross_zone_messages] ```rust #[cfg(feature = "contracts")] pub fn deliver_cross_zone_messages( state: &dyn ExecutionState, ) -> Result; ``` Source line: `393`. ## executor\_contract::deliver\_cross\_zone\_messages\_with\_limit [#executor_contractdeliver_cross_zone_messages_with_limit] ```rust #[cfg(feature = "contracts")] pub fn deliver_cross_zone_messages_with_limit( state: &dyn ExecutionState, per_zone_limit: usize, ) -> Result; ``` Source line: `399`. ## executor\_contract::register\_contract\_code\_required\_fee [#executor_contractregister_contract_code_required_fee] ```rust #[cfg(feature = "contracts")] pub fn register_contract_code_required_fee( data: &RegisterContractCodeData, _state: &dyn ExecutionState, ) -> Result; ``` Source line: `465`. ## executor\_contract::execute\_register\_contract\_code [#executor_contractexecute_register_contract_code] ```rust #[cfg(feature = "contracts")] pub fn execute_register_contract_code( sender_did: &str, data: &RegisterContractCodeData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `499`. ## executor\_contract::execute\_register\_contract\_code\_genesis [#executor_contractexecute_register_contract_code_genesis] ```rust #[cfg(feature = "contracts")] pub fn execute_register_contract_code_genesis( data: &RegisterContractCodeData, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `508`. ## executor\_contract::execute\_deploy\_contract [#executor_contractexecute_deploy_contract] ```rust #[cfg(feature = "contracts")] #[allow(clippy::too_many_arguments)] pub fn execute_deploy_contract( sender_did: &str, data: &DeployContractData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `610`. ## executor\_contract::execute\_call\_contract [#executor_contractexecute_call_contract] ```rust #[cfg(feature = "contracts")] pub fn execute_call_contract( sender_did: &str, data: &CallContractData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `792`. ## executor\_contract::execute\_upgrade\_contract [#executor_contractexecute_upgrade_contract] ```rust #[cfg(feature = "contracts")] pub fn execute_upgrade_contract( sender_did: &str, data: &UpgradeContractData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `935`. ## executor\_contract::execute\_set\_contract\_policy [#executor_contractexecute_set_contract_policy] ```rust #[cfg(feature = "contracts")] pub fn execute_set_contract_policy( sender_did: &str, data: &SetContractPolicyData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1107`. # sigil-node · executor_crucible URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_crucible Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_crucible.md Source declarations, signatures and documentation for executor_crucible. Source: `sigil/node/sigil-node/src/executor_crucible.rs`. SHA-256: `011a8a6c790b444d20071a09fe579b666b85ac043ca8667cb2a73995c6ee0b42`. 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. ## executor\_crucible::GAS\_TRAIN\_OPEN [#executor_cruciblegas_train_open] ```rust pub const GAS_TRAIN_OPEN: u64; ``` Source line: `29`. ## executor\_crucible::GAS\_TRAIN\_ROLLOUT\_BATCH\_COMMIT [#executor_cruciblegas_train_rollout_batch_commit] ```rust pub const GAS_TRAIN_ROLLOUT_BATCH_COMMIT: u64; ``` Source line: `30`. ## executor\_crucible::GAS\_TRAIN\_REWARD\_BATCH\_ATTEST [#executor_cruciblegas_train_reward_batch_attest] ```rust pub const GAS_TRAIN_REWARD_BATCH_ATTEST: u64; ``` Source line: `31`. ## executor\_crucible::GAS\_TRAIN\_WEIGHTS\_PUBLISH [#executor_cruciblegas_train_weights_publish] ```rust pub const GAS_TRAIN_WEIGHTS_PUBLISH: u64; ``` Source line: `32`. ## executor\_crucible::GAS\_TRAIN\_SLASH [#executor_cruciblegas_train_slash] ```rust pub const GAS_TRAIN_SLASH: u64; ``` Source line: `33`. ## executor\_crucible::GAS\_TRAIN\_CLOSE [#executor_cruciblegas_train_close] ```rust pub const GAS_TRAIN_CLOSE: u64; ``` Source line: `34`. ## executor\_crucible::execute\_train\_open [#executor_crucibleexecute_train_open] ```rust pub fn execute_train_open( sender_did: &str, data: &TrainOpenData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `262`. ## executor\_crucible::execute\_rollout\_batch\_commit [#executor_crucibleexecute_rollout_batch_commit] ```rust pub fn execute_rollout_batch_commit( sender_did: &str, data: &TrainRolloutBatchCommitData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `318`. ## executor\_crucible::execute\_reward\_batch\_attest [#executor_crucibleexecute_reward_batch_attest] ```rust pub fn execute_reward_batch_attest( sender_did: &str, data: &TrainRewardBatchAttestData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `376`. ## executor\_crucible::execute\_weights\_publish [#executor_crucibleexecute_weights_publish] ```rust pub fn execute_weights_publish( sender_did: &str, data: &TrainWeightsPublishData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `534`. ## executor\_crucible::execute\_train\_slash [#executor_crucibleexecute_train_slash] ```rust pub fn execute_train_slash( sender_did: &str, data: &TrainSlashData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `596`. ## executor\_crucible::execute\_train\_close [#executor_crucibleexecute_train_close] ```rust pub fn execute_train_close( sender_did: &str, data: &TrainCloseData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `665`. # sigil-node · executor_dao URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_dao Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_dao.md Source declarations, signatures and documentation for executor_dao. Source: `sigil/node/sigil-node/src/executor_dao.rs`. SHA-256: `5fb53b93a7badced6af96dc9e66c28245afa6b85287dcfbb7a3c2c2f2c0eca79`. 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. Module condition: ```rust #[cfg(feature = "dao-validators")] ``` ## executor\_dao::DaoValidatorContext [#executor_daodaovalidatorcontext] Per-block bundle of GAL snapshots covering every protected transaction. Built async ahead of execution; consumed sync inside \[`crate::executor::execute_transaction`]. The bundle is keyed by transaction hash so each protected tx looks up its own snapshot. There is no fallback to a "default" snapshot or to local checks; if a tx isn't covered, execution fails with \[`DaoValidatorError::Internal`] mapped to a `Failed` receipt — the consensus layer that produced the block must populate the context for every protected tx in it. ```rust #[cfg(feature = "dao-validators")] #[derive(Debug, Clone, Default)] pub struct DaoValidatorContext { } ``` Source line: `72`. ## executor\_dao::DaoValidatorContext::empty [#executor_daodaovalidatorcontextempty] Empty context. Protected transactions will fail closed. ```rust #[cfg(feature = "dao-validators")] pub fn empty() -> Self; ``` Source line: `79`. ## executor\_dao::DaoValidatorContext::from\_state [#executor_daodaovalidatorcontextfrom_state] Build the production context directly from execution state. This path is synchronous and deterministic: it reads the current DAO epoch/block, active mandates, labor contracts, and validator-agent registry from `ExecutionState`; it performs no resolver/GAL I/O and no wall-clock/RNG access. Tx-specific contexts built by `for_transactions` still override this default snapshot when supplied explicitly by proposer/validator tests. ```rust #[cfg(feature = "dao-validators")] pub fn from_state(state: &dyn ExecutionState) -> Result; ``` Source line: `91`. ## executor\_dao::DaoValidatorContext::for\_transactions [#executor_daodaovalidatorcontextfor_transactions] Build a context covering every protected transaction in `transactions`. Async because it talks to the GAL. `verifier` runs the full GAL trust path (Rules 1–7) per DID. `gal` provides raw revocation lookups for actor / counterparty. `snapshot_block` should equal the chain's current finalized block height at the time of snapshot construction; consensus replay must use the same value. ```rust #[cfg(feature = "dao-validators")] pub async fn for_transactions( transactions: &[SignedTransaction], verifier: &V, gal: &G, snapshot_block: u64, state: &dyn ExecutionState, ) -> Result where V: IssuerVerifier + ?Sized, G: SigilGalSource + ?Sized,; ``` Source line: `155`. ## executor\_dao::DaoValidatorContext::snapshot\_for [#executor_daodaovalidatorcontextsnapshot_for] Look up the pre-built snapshot for a given transaction. ```rust #[cfg(feature = "dao-validators")] pub fn snapshot_for(&self, tx_hash: &SigilHash) -> Option<&GalSnapshot>; ``` Source line: `184`. ## executor\_dao::DaoValidatorContext::len [#executor_daodaovalidatorcontextlen] Number of snapshots in the bundle (for diagnostics). ```rust #[cfg(feature = "dao-validators")] pub fn len(&self) -> usize; ``` Source line: `191`. ## executor\_dao::DaoValidatorContext::is\_empty [#executor_daodaovalidatorcontextis_empty] True if the bundle covers no transactions. ```rust #[cfg(feature = "dao-validators")] pub fn is_empty(&self) -> bool; ``` Source line: `196`. ## executor\_dao::execute\_record\_mandate\_spend [#executor_daoexecute_record_mandate_spend] Execute `RecordMandateSpend`. Runs `validate_mandate_spend` first; only mutates state on success. ```rust #[cfg(feature = "dao-validators")] pub fn execute_record_mandate_spend( sender_did: &str, data: &RecordMandateSpendData, fee: u64, ctx: &DaoValidatorContext, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `368`. ## executor\_dao::execute\_release\_milestone\_payment [#executor_daoexecute_release_milestone_payment] Execute `ReleaseMilestonePayment`. Runs `validate_labor_contract_release` first; only mutates state on success (mark milestone `Paid`, increment mandate `spent_amount`). ```rust #[cfg(feature = "dao-validators")] pub fn execute_release_milestone_payment( sender_did: &str, data: &ReleaseMilestonePaymentData, fee: u64, ctx: &DaoValidatorContext, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `471`. ## executor\_dao::execute\_revoke\_mandate [#executor_daoexecute_revoke_mandate] Execute `RevokeMandate`. Runs `validate_cascade_revoke` against a synthetic `RevocationRecord` representing the in-flight revocation; only mutates state on success (mandate.status = Revoked). ```rust #[cfg(feature = "dao-validators")] pub fn execute_revoke_mandate( sender_did: &str, data: &RevokeMandateData, fee: u64, ctx: &DaoValidatorContext, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `623`. ## executor\_dao::dao\_failure\_minimum\_gas [#executor_daodao_failure_minimum_gas] Minimum gas charged when execution of a protected tx fails. ```rust #[cfg(feature = "dao-validators")] pub const fn dao_failure_minimum_gas() -> u64; ``` Source line: `736`. ## executor\_dao::GuardedResolverIssuerVerifier [#executor_daoguardedresolverissuerverifier] `IssuerVerifier` adapter that runs the live GAL trust path through any `oas_resolve::SigilGuardedResolver`. This is the only adapter production builds use; tests inside this module use the same adapter wrapping a `MemoryGalSource` + `InMemoryResolver` pair. ```rust #[cfg(feature = "dao-validators")] pub struct GuardedResolverIssuerVerifier where R: oas_resolve::resolver::Resolver, G: SigilGalSource, { } ``` Source line: `748`. ## executor\_dao::GuardedResolverIssuerVerifier\::new [#executor_daoguardedresolverissuerverifierr-gnew] Wrap a fully-configured `SigilGuardedResolver`. ```rust #[cfg(feature = "dao-validators")] pub fn new(resolver: oas_resolve::SigilGuardedResolver) -> Self; ``` Source line: `762`. # sigil-node · executor_dex URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_dex Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_dex.md Source declarations, signatures and documentation for executor_dex. Source: `sigil/node/sigil-node/src/executor_dex.rs`. SHA-256: `1b1e256f8a09912a4653ed6ea50cb443f8268d6e6403edc68a1ce4c42298b871`. 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. ## executor\_dex::DEX\_NATIVE\_ASSET [#executor_dexdex_native_asset] ```rust pub const DEX_NATIVE_ASSET: &str; ``` Source line: `28`. ## executor\_dex::GAS\_DEX\_CREATE\_POOL [#executor_dexgas_dex_create_pool] ```rust pub const GAS_DEX_CREATE_POOL: u64; ``` Source line: `29`. ## executor\_dex::GAS\_DEX\_ADD\_LIQUIDITY [#executor_dexgas_dex_add_liquidity] ```rust pub const GAS_DEX_ADD_LIQUIDITY: u64; ``` Source line: `30`. ## executor\_dex::GAS\_DEX\_REMOVE\_LIQUIDITY [#executor_dexgas_dex_remove_liquidity] ```rust pub const GAS_DEX_REMOVE_LIQUIDITY: u64; ``` Source line: `31`. ## executor\_dex::GAS\_DEX\_SWAP [#executor_dexgas_dex_swap] ```rust pub const GAS_DEX_SWAP: u64; ``` Source line: `32`. ## executor\_dex::execute\_create\_pool [#executor_dexexecute_create_pool] ```rust pub fn execute_create_pool( sender_did: &str, data: &DexCreatePoolData, tx_fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `36`. ## executor\_dex::execute\_add\_liquidity [#executor_dexexecute_add_liquidity] ```rust pub fn execute_add_liquidity( sender_did: &str, data: &DexAddLiquidityData, tx_fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `116`. ## executor\_dex::execute\_remove\_liquidity [#executor_dexexecute_remove_liquidity] ```rust pub fn execute_remove_liquidity( sender_did: &str, data: &DexRemoveLiquidityData, tx_fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `208`. ## executor\_dex::execute\_swap\_exact\_in [#executor_dexexecute_swap_exact_in] ```rust pub fn execute_swap_exact_in( sender_did: &str, data: &DexSwapExactInData, tx_fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `315`. ## executor\_dex::execute\_swap\_exact\_out [#executor_dexexecute_swap_exact_out] ```rust pub fn execute_swap_exact_out( sender_did: &str, data: &DexSwapExactOutData, tx_fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `354`. # sigil-node · executor_evidence URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_evidence Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_evidence.md Source declarations, signatures and documentation for executor_evidence. Source: `sigil/node/sigil-node/src/executor_evidence.rs`. SHA-256: `9da398d743cc8bbebc4fda840e5e5282c7ab7a820f0e54d1c2d15bbc680592ed`. 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. ## executor\_evidence::execute\_evidence\_anchor [#executor_evidenceexecute_evidence_anchor] Execute an evidence anchor transaction. Fails closed on: malformed payload, insufficient balance for the fee, a duplicate anchor ID (same chain, sender, digest, and client nonce), or a state backend without evidence storage. ```rust pub fn execute_evidence_anchor( sender_did: &str, data: &EvidenceAnchorData, fee: u64, block_height: u64, chain_id: &str, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result; ``` Source line: `30`. # sigil-node · executor_gal URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_gal Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_gal.md Source declarations, signatures and documentation for executor_gal. Source: `sigil/node/sigil-node/src/executor_gal.rs`. SHA-256: `c54180d5c310a62b82061b670543900dcb43afcb815df18488e070c76dde00de`. 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. Module condition: ```rust #[cfg(feature = "tower")] ``` ## executor\_gal::execute\_anchor\_hmr [#executor_galexecute_anchor_hmr] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_hmr( sender: &str, anchor: &HmrAnchor, signer_public_key: &[u8], fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `202`. ## executor\_gal::execute\_anchor\_hmr\_sponsored [#executor_galexecute_anchor_hmr_sponsored] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_hmr_sponsored( sponsor: &str, subject: &str, anchor: &HmrAnchor, subject_public_key: &[u8], fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `243`. ## executor\_gal::execute\_anchor\_mhr [#executor_galexecute_anchor_mhr] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_mhr( sender: &str, anchor: &MhrAnchor, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `285`. ## executor\_gal::execute\_anchor\_mhr\_sponsored [#executor_galexecute_anchor_mhr_sponsored] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_mhr_sponsored( sponsor: &str, subject: &str, anchor: &MhrAnchor, subject_public_key: &[u8], fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `346`. ## executor\_gal::execute\_anchor\_enr [#executor_galexecute_anchor_enr] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_enr( sender: &str, anchor: &EnrAnchor, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `418`. ## executor\_gal::execute\_anchor\_enr\_sponsored [#executor_galexecute_anchor_enr_sponsored] ```rust #[cfg(feature = "tower")] pub fn execute_anchor_enr_sponsored( sponsor: &str, subject: &str, anchor: &EnrAnchor, subject_public_key: &[u8], fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `474`. ## executor\_gal::execute\_update\_org\_lineage\_root [#executor_galexecute_update_org_lineage_root] ```rust #[cfg(feature = "tower")] pub fn execute_update_org_lineage_root( sender: &str, root: &OrgLineageRoot, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `535`. ## executor\_gal::execute\_update\_org\_lineage\_root\_sponsored [#executor_galexecute_update_org_lineage_root_sponsored] ```rust #[cfg(feature = "tower")] pub fn execute_update_org_lineage_root_sponsored( sponsor: &str, subject: &str, root: &OrgLineageRoot, subject_public_key: &[u8], fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `577`. ## executor\_gal::execute\_assign\_shard [#executor_galexecute_assign_shard] ```rust #[cfg(feature = "tower")] pub fn execute_assign_shard( sender: &str, assignment: &ShardAssignment, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `626`. ## executor\_gal::execute\_record\_revocation [#executor_galexecute_record_revocation] ```rust #[cfg(feature = "tower")] pub fn execute_record_revocation( sender: &str, record: &RevocationRecord, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `670`. ## executor\_gal::execute\_apply\_topology [#executor_galexecute_apply_topology] ```rust #[cfg(feature = "tower")] pub fn execute_apply_topology( sender: &str, entry: &ShardTopologyEntry, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> ExecResult; ``` Source line: `741`. # sigil-node · executor_labor URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_labor Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_labor.md Source declarations, signatures and documentation for executor_labor. Source: `sigil/node/sigil-node/src/executor_labor.rs`. SHA-256: `72d7a67dfeb9a64f74263e87aaf160e22c3ce3453cd71c4907347a58d1fde282`. 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. ## executor\_labor::GAS\_POST\_LABOR\_JOB [#executor_laborgas_post_labor_job] Gas for posting a new labor job (stores job record on-chain). ```rust pub const GAS_POST_LABOR_JOB: u64; ``` Source line: `54`. ## executor\_labor::GAS\_CANCEL\_LABOR\_JOB [#executor_laborgas_cancel_labor_job] Gas for cancelling a labor job. ```rust pub const GAS_CANCEL_LABOR_JOB: u64; ``` Source line: `56`. ## executor\_labor::GAS\_SUBMIT\_LABOR\_BID [#executor_laborgas_submit_labor_bid] Gas for submitting a bid (stores bid record + job-bid index entry). ```rust pub const GAS_SUBMIT_LABOR_BID: u64; ``` Source line: `58`. ## executor\_labor::GAS\_WITHDRAW\_LABOR\_BID [#executor_laborgas_withdraw_labor_bid] Gas for withdrawing a bid. ```rust pub const GAS_WITHDRAW_LABOR_BID: u64; ``` Source line: `60`. ## executor\_labor::GAS\_ACCEPT\_LABOR\_BID [#executor_laborgas_accept_labor_bid] Gas for accepting a bid (updates job status). ```rust pub const GAS_ACCEPT_LABOR_BID: u64; ``` Source line: `62`. ## executor\_labor::GAS\_CREATE\_LABOR\_CONTRACT [#executor_laborgas_create_labor_contract] Gas for creating a contract (stores contract + milestones + worker index). ```rust pub const GAS_CREATE_LABOR_CONTRACT: u64; ``` Source line: `64`. ## executor\_labor::GAS\_FUND\_LABOR\_ESCROW [#executor_laborgas_fund_labor_escrow] Gas for funding the escrow (updates contract state). ```rust pub const GAS_FUND_LABOR_ESCROW: u64; ``` Source line: `66`. ## executor\_labor::GAS\_LABOR\_OPEN\_OFFER [#executor_laborgas_labor_open_offer] Gas for opening and funding an open bounty offer. ```rust pub const GAS_LABOR_OPEN_OFFER: u64; ``` Source line: `68`. ## executor\_labor::GAS\_LABOR\_SUBMIT\_CLAIM [#executor_laborgas_labor_submit_claim] Gas for submitting an open bounty claim. ```rust pub const GAS_LABOR_SUBMIT_CLAIM: u64; ``` Source line: `70`. ## executor\_labor::GAS\_LABOR\_ATTEST\_CLAIM [#executor_laborgas_labor_attest_claim] Gas for attesting an open bounty claim. ```rust pub const GAS_LABOR_ATTEST_CLAIM: u64; ``` Source line: `72`. ## executor\_labor::GAS\_LABOR\_CANCEL\_OFFER [#executor_laborgas_labor_cancel_offer] Gas for cancelling or closing an open bounty offer. ```rust pub const GAS_LABOR_CANCEL_OFFER: u64; ``` Source line: `74`. ## executor\_labor::GAS\_SUBMIT\_DELIVERABLE [#executor_laborgas_submit_deliverable] Gas for submitting a deliverable (updates milestone state). ```rust pub const GAS_SUBMIT_DELIVERABLE: u64; ``` Source line: `76`. ## executor\_labor::GAS\_ATTEST\_MILESTONE [#executor_laborgas_attest_milestone] Gas for attesting milestone completion. ```rust pub const GAS_ATTEST_MILESTONE: u64; ``` Source line: `78`. ## executor\_labor::GAS\_RELEASE\_MILESTONE\_PAYMENT [#executor_laborgas_release_milestone_payment] Gas for releasing a milestone payment. ```rust pub const GAS_RELEASE_MILESTONE_PAYMENT: u64; ``` Source line: `80`. ## executor\_labor::GAS\_RAISE\_LABOR\_DISPUTE [#executor_laborgas_raise_labor_dispute] Gas for raising a dispute. ```rust pub const GAS_RAISE_LABOR_DISPUTE: u64; ``` Source line: `82`. ## executor\_labor::GAS\_RESOLVE\_LABOR\_DISPUTE [#executor_laborgas_resolve_labor_dispute] Gas for resolving a dispute. ```rust pub const GAS_RESOLVE_LABOR_DISPUTE: u64; ``` Source line: `84`. ## executor\_labor::GAS\_SUBMIT\_LABOR\_REVIEW [#executor_laborgas_submit_labor_review] Gas for submitting a post-completion review. ```rust pub const GAS_SUBMIT_LABOR_REVIEW: u64; ``` Source line: `86`. ## executor\_labor::execute\_post\_labor\_job [#executor_laborexecute_post_labor_job] ```rust pub fn execute_post_labor_job( sender_did: &str, data: &PostLaborJobData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `278`. ## executor\_labor::execute\_cancel\_labor\_job [#executor_laborexecute_cancel_labor_job] ```rust pub fn execute_cancel_labor_job( sender_did: &str, data: &CancelLaborJobData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `344`. ## executor\_labor::execute\_submit\_labor\_bid [#executor_laborexecute_submit_labor_bid] ```rust pub fn execute_submit_labor_bid( sender_did: &str, data: &SubmitLaborBidData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `386`. ## executor\_labor::execute\_withdraw\_labor\_bid [#executor_laborexecute_withdraw_labor_bid] ```rust pub fn execute_withdraw_labor_bid( sender_did: &str, data: &WithdrawLaborBidData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `461`. ## executor\_labor::execute\_accept\_labor\_bid [#executor_laborexecute_accept_labor_bid] ```rust pub fn execute_accept_labor_bid( sender_did: &str, data: &AcceptLaborBidData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `503`. ## executor\_labor::execute\_create\_labor\_contract [#executor_laborexecute_create_labor_contract] ```rust pub fn execute_create_labor_contract( sender_did: &str, data: &CreateLaborContractData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `583`. ## executor\_labor::execute\_fund\_labor\_escrow [#executor_laborexecute_fund_labor_escrow] ```rust pub fn execute_fund_labor_escrow( sender_did: &str, data: &FundLaborEscrowData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `676`. ## executor\_labor::execute\_labor\_open\_offer [#executor_laborexecute_labor_open_offer] ```rust pub fn execute_labor_open_offer( sender_did: &str, data: &LaborOpenOfferData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `755`. ## executor\_labor::execute\_labor\_submit\_claim [#executor_laborexecute_labor_submit_claim] ```rust pub fn execute_labor_submit_claim( sender_did: &str, data: &LaborSubmitClaimData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `836`. ## executor\_labor::execute\_labor\_attest\_claim [#executor_laborexecute_labor_attest_claim] ```rust pub fn execute_labor_attest_claim( sender_did: &str, data: &LaborAttestClaimData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `991`. ## executor\_labor::execute\_labor\_cancel\_offer [#executor_laborexecute_labor_cancel_offer] ```rust pub fn execute_labor_cancel_offer( sender_did: &str, data: &LaborCancelOfferData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1168`. ## executor\_labor::execute\_submit\_deliverable [#executor_laborexecute_submit_deliverable] ```rust pub fn execute_submit_deliverable( sender_did: &str, data: &SubmitDeliverableData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1269`. ## executor\_labor::execute\_attest\_milestone [#executor_laborexecute_attest_milestone] ```rust pub fn execute_attest_milestone( sender_did: &str, data: &AttestMilestoneData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1347`. ## executor\_labor::execute\_release\_milestone\_payment [#executor_laborexecute_release_milestone_payment] ```rust pub fn execute_release_milestone_payment( sender_did: &str, data: &ReleaseMilestonePaymentData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1438`. ## executor\_labor::execute\_raise\_labor\_dispute [#executor_laborexecute_raise_labor_dispute] ```rust pub fn execute_raise_labor_dispute( sender_did: &str, data: &RaiseLaborDisputeData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1561`. ## executor\_labor::execute\_resolve\_labor\_dispute [#executor_laborexecute_resolve_labor_dispute] ```rust pub fn execute_resolve_labor_dispute( sender_did: &str, data: &ResolveLaborDisputeData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1639`. ## executor\_labor::execute\_submit\_labor\_review [#executor_laborexecute_submit_labor_review] ```rust pub fn execute_submit_labor_review( sender_did: &str, data: &SubmitLaborReviewData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1801`. # sigil-node · executor_mail URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_mail Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_mail.md Source declarations, signatures and documentation for executor_mail. Source: `sigil/node/sigil-node/src/executor_mail.rs`. SHA-256: `e2ff9f966f673ca4d237d66ddb899395fd9cd21c77440e1d9109ad44fef5af76`. 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. ## executor\_mail::execute\_create\_mailbox [#executor_mailexecute_create_mailbox] ```rust pub fn execute_create_mailbox( sender: &str, data: &MailCreateMailboxData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `298`. ## executor\_mail::execute\_add\_alias [#executor_mailexecute_add_alias] ```rust pub fn execute_add_alias( sender: &str, data: &MailAddAliasData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `377`. ## executor\_mail::execute\_remove\_alias [#executor_mailexecute_remove_alias] ```rust pub fn execute_remove_alias( sender: &str, data: &MailRemoveAliasData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `436`. ## executor\_mail::execute\_set\_primary\_alias [#executor_mailexecute_set_primary_alias] ```rust pub fn execute_set_primary_alias( sender: &str, data: &MailSetPrimaryAliasData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `483`. ## executor\_mail::execute\_lock\_mailbox [#executor_mailexecute_lock_mailbox] ```rust pub fn execute_lock_mailbox( sender: &str, data: &MailLockMailboxData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `581`. ## executor\_mail::execute\_unlock\_mailbox [#executor_mailexecute_unlock_mailbox] ```rust pub fn execute_unlock_mailbox( sender: &str, data: &MailUnlockMailboxData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `601`. ## executor\_mail::execute\_deactivate\_mailbox [#executor_mailexecute_deactivate_mailbox] ```rust pub fn execute_deactivate_mailbox( sender: &str, data: &MailDeactivateMailboxData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `621`. ## executor\_mail::execute\_recover\_mailbox [#executor_mailexecute_recover_mailbox] ```rust pub fn execute_recover_mailbox( sender: &str, data: &MailRecoverMailboxData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `641`. ## executor\_mail::execute\_update\_policy [#executor_mailexecute_update_policy] ```rust pub fn execute_update_policy( sender: &str, data: &MailUpdateReceivePolicyData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `689`. ## executor\_mail::execute\_revoke\_policy [#executor_mailexecute_revoke_policy] ```rust pub fn execute_revoke_policy( sender: &str, data: &MailRevokeReceivePolicyData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `747`. ## executor\_mail::execute\_publish\_key [#executor_mailexecute_publish_key] ```rust pub fn execute_publish_key( sender: &str, data: &MailPublishKeyData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `803`. ## executor\_mail::execute\_rotate\_key [#executor_mailexecute_rotate_key] ```rust pub fn execute_rotate_key( sender: &str, data: &MailRotateKeyData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `864`. ## executor\_mail::execute\_revoke\_key [#executor_mailexecute_revoke_key] ```rust pub fn execute_revoke_key( sender: &str, data: &MailRevokeKeyData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `946`. ## executor\_mail::execute\_expire\_keys [#executor_mailexecute_expire_keys] ```rust pub fn execute_expire_keys( sender: &str, data: &MailExpireKeysData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1004`. ## executor\_mail::execute\_publish\_delivery [#executor_mailexecute_publish_delivery] ```rust pub fn execute_publish_delivery( sender: &str, data: &MailPublishDeliveryCommitmentData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1060`. ## executor\_mail::execute\_report\_abuse [#executor_mailexecute_report_abuse] ```rust pub fn execute_report_abuse( sender: &str, data: &MailReportAbuseData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1208`. ## executor\_mail::execute\_resolve\_abuse [#executor_mailexecute_resolve_abuse] ```rust pub fn execute_resolve_abuse( sender: &str, data: &MailResolveAbuseData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1260`. ## executor\_mail::execute\_grant\_permission [#executor_mailexecute_grant_permission] ```rust pub fn execute_grant_permission( sender: &str, data: &MailGrantPermissionData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1306`. ## executor\_mail::execute\_revoke\_permission [#executor_mailexecute_revoke_permission] ```rust pub fn execute_revoke_permission( sender: &str, data: &MailRevokePermissionData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1351`. ## executor\_mail::execute\_register\_name [#executor_mailexecute_register_name] ```rust pub fn execute_register_name( sender: &str, data: &RegisterNameData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1402`. ## executor\_mail::execute\_set\_name\_records [#executor_mailexecute_set_name_records] ```rust pub fn execute_set_name_records( sender: &str, data: &SetNameRecordsData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1510`. ## executor\_mail::execute\_renew\_name [#executor_mailexecute_renew_name] ```rust pub fn execute_renew_name( sender: &str, data: &RenewNameData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1562`. ## executor\_mail::execute\_delete\_name\_records [#executor_mailexecute_delete_name_records] ```rust pub fn execute_delete_name_records( sender: &str, data: &DeleteNameRecordsData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1605`. ## executor\_mail::execute\_delegate\_subdomain [#executor_mailexecute_delegate_subdomain] ```rust pub fn execute_delegate_subdomain( sender: &str, data: &DelegateSubdomainData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1654`. ## executor\_mail::execute\_revoke\_delegation [#executor_mailexecute_revoke_delegation] ```rust pub fn execute_revoke_delegation( sender: &str, data: &RevokeDelegationData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1724`. ## executor\_mail::execute\_set\_primary\_name [#executor_mailexecute_set_primary_name] ```rust pub fn execute_set_primary_name( sender: &str, data: &SetPrimaryNameData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1778`. ## executor\_mail::execute\_commit\_name\_registration [#executor_mailexecute_commit_name_registration] ```rust pub fn execute_commit_name_registration( sender: &str, data: &CommitNameRegistrationData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1825`. ## executor\_mail::execute\_commit\_sealed\_name\_bid [#executor_mailexecute_commit_sealed_name_bid] ```rust pub fn execute_commit_sealed_name_bid( sender: &str, data: &CommitSealedNameBidData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1893`. ## executor\_mail::execute\_reveal\_sealed\_name\_bid [#executor_mailexecute_reveal_sealed_name_bid] ```rust pub fn execute_reveal_sealed_name_bid( sender: &str, data: &RevealSealedNameBidData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1954`. ## executor\_mail::execute\_finalize\_sealed\_name\_auction [#executor_mailexecute_finalize_sealed_name_auction] ```rust pub fn execute_finalize_sealed_name_auction( sender: &str, data: &FinalizeSealedNameAuctionData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `2077`. # sigil-node · executor_nft URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_nft Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_nft.md Source declarations, signatures and documentation for executor_nft. Source: `sigil/node/sigil-node/src/executor_nft.rs`. SHA-256: `0eea42880ceed5cb3cb02a03c3cfa94acaaf939614091de60ac280e79d772da3`. 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. ## executor\_nft::execute\_create\_nft\_collection [#executor_nftexecute_create_nft_collection] Create a new NFT collection on-chain. The `sender_did` must match `data.issuer_did` (collections may only be created by the issuer). Duplicate `collection_id`s are rejected. ```rust pub fn execute_create_nft_collection( sender_did: &str, data: &CreateNftCollectionData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `135`. ## executor\_nft::execute\_mint\_nft [#executor_nftexecute_mint_nft] Mint a new NFT token into a collection. Rules enforced: * Collection must exist. * Token id must not already exist in the collection (duplicate prevention). * For identity collections: `identity` binding must be provided. * For identity collections: only one identity token per (subject\_did, collection) is allowed. * `max_supply` is respected if set on the collection policy. * Identity NFTs are always soulbound regardless of policy. * Sender must be the collection issuer (or hold a mint-policy permission — simple issuer check used here; policy delegation is a future extension). ```rust pub fn execute_mint_nft( sender_did: &str, data: &MintNftData, fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `230`. ## executor\_nft::execute\_transfer\_nft [#executor_nftexecute_transfer_nft] Transfer an NFT from one owner to another. Rules enforced (ERC-5192 / identity semantics): * Token must exist. * Current owner must match `data.from_did` and sender must be the current owner. * Token must not be locked (`token.locked == false`). * HMR / MHR / ENR identity tokens are always rejected, regardless of lock state. * Agent identity tokens respect `token.locked`. ```rust pub fn execute_transfer_nft( sender_did: &str, data: &TransferNftData, fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `437`. ## executor\_nft::execute\_burn\_nft [#executor_nftexecute_burn_nft] Burn (destroy) an NFT. ERC-5484 burn authorisation is enforced: * `IssuerOnly`: `authorized_by` must be the collection's `issuer_did`. * `OwnerOnly`: `authorized_by` must be `token.owner_did`. * `Both`: either issuer or owner. * `Neither`: always rejected. ```rust pub fn execute_burn_nft( sender_did: &str, data: &BurnNftData, fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `587`. ## executor\_nft::execute\_set\_nft\_metadata [#executor_nftexecute_set_nft_metadata] Update per-token metadata URI and/or hash (ERC-4906). `allow_metadata_updates` must be `true` on the collection policy. Only the collection controller may update metadata. Emits a `MetadataUpdate` event with old and new URI/hash values. ```rust pub fn execute_set_nft_metadata( sender_did: &str, data: &SetNftMetadataData, fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `718`. ## executor\_nft::execute\_verify\_identity\_nft [#executor_nftexecute_verify_identity_nft] Advance the verification level on an identity NFT. Rules: * Token must be in an identity collection. * `new_verification_level` must be strictly greater than the current level (monotonically increasing — cannot decrease). * Only the collection issuer may call this (the issuer is the authorised attester for v1; multi-party attestation is a future extension). ```rust pub fn execute_verify_identity_nft( sender_did: &str, data: &VerifyIdentityNftData, fee: u64, block_height: u64, tx_hash: &SigilHash, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `854`. # sigil-node · executor_nova URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_nova Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_nova.md Source declarations, signatures and documentation for executor_nova. Source: `sigil/node/sigil-node/src/executor_nova.rs`. SHA-256: `318927cd833bc1864dc62805fd7a4a10da264baaae3fed0533c5a9692d1758ca`. 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. ## executor\_nova::GAS\_NOVA\_CREATE\_WORLD [#executor_novagas_nova_create_world] ```rust pub const GAS_NOVA_CREATE_WORLD: u64; ``` Source line: `24`. ## executor\_nova::GAS\_NOVA\_CLAIM\_PARCEL [#executor_novagas_nova_claim_parcel] ```rust pub const GAS_NOVA_CLAIM_PARCEL: u64; ``` Source line: `25`. ## executor\_nova::GAS\_NOVA\_TRANSFER\_PARCEL [#executor_novagas_nova_transfer_parcel] ```rust pub const GAS_NOVA_TRANSFER_PARCEL: u64; ``` Source line: `26`. ## executor\_nova::GAS\_NOVA\_DEPLOY\_BUILDING [#executor_novagas_nova_deploy_building] ```rust pub const GAS_NOVA_DEPLOY_BUILDING: u64; ``` Source line: `27`. ## executor\_nova::GAS\_NOVA\_REMOVE\_BUILDING [#executor_novagas_nova_remove_building] ```rust pub const GAS_NOVA_REMOVE_BUILDING: u64; ``` Source line: `28`. ## executor\_nova::GAS\_NOVA\_UPDATE\_AVATAR [#executor_novagas_nova_update_avatar] ```rust pub const GAS_NOVA_UPDATE_AVATAR: u64; ``` Source line: `29`. ## executor\_nova::GAS\_NOVA\_CREATE\_AUCTION [#executor_novagas_nova_create_auction] ```rust pub const GAS_NOVA_CREATE_AUCTION: u64; ``` Source line: `30`. ## executor\_nova::GAS\_NOVA\_AUCTION\_BID [#executor_novagas_nova_auction_bid] ```rust pub const GAS_NOVA_AUCTION_BID: u64; ``` Source line: `31`. ## executor\_nova::GAS\_NOVA\_SETTLE\_AUCTION [#executor_novagas_nova_settle_auction] ```rust pub const GAS_NOVA_SETTLE_AUCTION: u64; ``` Source line: `32`. ## executor\_nova::GAS\_NOVA\_SET\_ZONE\_PERMISSIONS [#executor_novagas_nova_set_zone_permissions] ```rust pub const GAS_NOVA_SET_ZONE_PERMISSIONS: u64; ``` Source line: `33`. ## executor\_nova::execute\_create\_world [#executor_novaexecute_create_world] ```rust pub fn execute_create_world( sender_did: &str, data: &NovaCreateWorldData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `39`. ## executor\_nova::execute\_claim\_parcel [#executor_novaexecute_claim_parcel] ```rust pub fn execute_claim_parcel( sender_did: &str, data: &NovaClaimParcelData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `86`. ## executor\_nova::execute\_transfer\_parcel [#executor_novaexecute_transfer_parcel] ```rust pub fn execute_transfer_parcel( sender_did: &str, data: &NovaTransferParcelData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `141`. ## executor\_nova::execute\_deploy\_building [#executor_novaexecute_deploy_building] ```rust pub fn execute_deploy_building( sender_did: &str, data: &NovaDeployBuildingData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `185`. ## executor\_nova::execute\_remove\_building [#executor_novaexecute_remove_building] ```rust pub fn execute_remove_building( sender_did: &str, data: &NovaRemoveBuildingData, tx_fee: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `262`. ## executor\_nova::execute\_update\_avatar [#executor_novaexecute_update_avatar] ```rust pub fn execute_update_avatar( sender_did: &str, data: &NovaUpdateAvatarData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `304`. ## executor\_nova::execute\_create\_auction [#executor_novaexecute_create_auction] ```rust pub fn execute_create_auction( sender_did: &str, data: &NovaCreateAuctionData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `361`. ## executor\_nova::execute\_auction\_bid [#executor_novaexecute_auction_bid] ```rust pub fn execute_auction_bid( sender_did: &str, data: &NovaAuctionBidData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `443`. ## executor\_nova::execute\_settle\_auction [#executor_novaexecute_settle_auction] ```rust pub fn execute_settle_auction( sender_did: &str, data: &NovaSettleAuctionData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `557`. ## executor\_nova::execute\_set\_zone\_permissions [#executor_novaexecute_set_zone_permissions] ```rust pub fn execute_set_zone_permissions( sender_did: &str, data: &NovaSetZonePermissionsData, tx_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `649`. # sigil-node · executor_recovery URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_recovery Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_recovery.md Source declarations, signatures and documentation for executor_recovery. Source: `sigil/node/sigil-node/src/executor_recovery.rs`. SHA-256: `b89b81d27cd400188cbcf9214d0e4aca7023ff1ef4781450bd5c60c767aee9e9`. 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. ## executor\_recovery::execute\_register\_recovery [#executor_recoveryexecute_register_recovery] ```rust pub fn execute_register_recovery( sender: &str, data: &RegisterRecoveryData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `136`. ## executor\_recovery::execute\_register\_recovery\_sponsored [#executor_recoveryexecute_register_recovery_sponsored] ```rust pub fn execute_register_recovery_sponsored( sponsor: &str, subject: &str, data: &RegisterRecoveryData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `185`. ## executor\_recovery::execute\_initiate\_recovery [#executor_recoveryexecute_initiate_recovery] ```rust pub fn execute_initiate_recovery( sender: &str, data: &InitiateRecoveryData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `240`. ## executor\_recovery::execute\_add\_recovery\_authorization [#executor_recoveryexecute_add_recovery_authorization] ```rust pub fn execute_add_recovery_authorization( sender: &str, data: &AddRecoveryAuthorizationData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `318`. ## executor\_recovery::execute\_abort\_recovery [#executor_recoveryexecute_abort_recovery] ```rust pub fn execute_abort_recovery( sender: &str, data: &AbortRecoveryData, base_fee: u64, _block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `434`. ## executor\_recovery::execute\_finalize\_recovery [#executor_recoveryexecute_finalize_recovery] ```rust pub fn execute_finalize_recovery( sender: &str, data: &FinalizeRecoveryData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `521`. # sigil-node · executor_storage URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_storage Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_storage.md Source declarations, signatures and documentation for executor_storage. Source: `sigil/node/sigil-node/src/executor_storage.rs`. SHA-256: `56167f44674d1f07a87153ec4a52182fd3b2b4c6a4b044ebf42213b5d4105026`. 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. ## executor\_storage::execute\_provider\_register [#executor_storageexecute_provider_register] ```rust pub fn execute_provider_register( sender_did: &str, data: &StorageProviderRegisterData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `37`. ## executor\_storage::execute\_provider\_update [#executor_storageexecute_provider_update] ```rust pub fn execute_provider_update( sender_did: &str, data: &StorageProviderUpdateData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `99`. ## executor\_storage::execute\_provider\_exit [#executor_storageexecute_provider_exit] ```rust pub fn execute_provider_exit( sender_did: &str, data: &StorageProviderExitData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `158`. ## executor\_storage::execute\_pin\_request [#executor_storageexecute_pin_request] ```rust pub fn execute_pin_request( sender_did: &str, data: &StoragePinRequestData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result; ``` Source line: `197`. ## executor\_storage::execute\_pin\_accept [#executor_storageexecute_pin_accept] ```rust pub fn execute_pin_accept( sender_did: &str, data: &StoragePinAcceptData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result; ``` Source line: `280`. ## executor\_storage::execute\_receipt\_settle [#executor_storageexecute_receipt_settle] ```rust pub fn execute_receipt_settle( sender_did: &str, data: &StorageReceiptSettleData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `392`. ## executor\_storage::execute\_challenge [#executor_storageexecute_challenge] ```rust pub fn execute_challenge( sender_did: &str, data: &StorageChallengeData, fee: u64, block_height: u64, chain_id: &str, state: &dyn ExecutionState, ) -> Result; ``` Source line: `457`. ## executor\_storage::execute\_challenge\_resolve [#executor_storageexecute_challenge_resolve] ```rust pub fn execute_challenge_resolve( sender_did: &str, data: &StorageChallengeResolveData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result; ``` Source line: `536`. # sigil-node · executor_username URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_username Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_username.md Source declarations, signatures and documentation for executor_username. Source: `sigil/node/sigil-node/src/executor_username.rs`. SHA-256: `1c21f60120d95d795d92f2021a06856a40fe8beb62339e83c5f40b527f9b72e0`. 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. ## executor\_username::execute\_register\_username [#executor_usernameexecute_register_username] Register a new username for `data.years` years to `data.owner_did`. Authority rule: only the owner\_did itself can register a name in their own name (no third-party registration). This mirrors how transfers/etc require sender == current owner. ```rust pub fn execute_register_username( sender: &str, data: &RegisterUsernameData, block_height: u64, base_fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `120`. ## executor\_username::execute\_transfer\_username [#executor_usernameexecute_transfer_username] ```rust pub fn execute_transfer_username( sender: &str, data: &TransferUsernameData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `238`. ## executor\_username::execute\_release\_username [#executor_usernameexecute_release_username] ```rust pub fn execute_release_username( sender: &str, data: &ReleaseUsernameData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `305`. ## executor\_username::execute\_set\_username\_metadata [#executor_usernameexecute_set_username_metadata] ```rust pub fn execute_set_username_metadata( sender: &str, data: &SetUsernameMetadataData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `374`. ## executor\_username::execute\_set\_reverse\_username [#executor_usernameexecute_set_reverse_username] ```rust pub fn execute_set_reverse_username( sender: &str, data: &SetReverseUsernameData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `440`. ## executor\_username::execute\_submit\_auction\_bid [#executor_usernameexecute_submit_auction_bid] Submit a bid against an open premium-name auction. Behaviour per `docs/specs/USERNAMES.md` §4: 1. Validate the canonical name and confirm it's eligible for auction (1- to 4-char name, not currently registered, not reserved). 2. Charge `base_fee` for the transaction itself. 3. Open the auction lazily on the first bid (no separate `OpenAuction` tx). 4. Verify the bid is at least the minimum next bid. 5. Refund the previous high bidder's escrow (if any) by crediting their balance back. Lock the new bid into auction escrow by debiting from the new bidder. 6. If we land within the anti-snipe window, push `closes_at_height` out. ```rust pub fn execute_submit_auction_bid( sender: &str, data: &UsernameAuctionBidData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `516`. ## executor\_username::execute\_finalize\_auction [#executor_usernameexecute_finalize_auction] Finalize an auction whose anti-snipe window has elapsed. Anyone can call finalize — it's a permissionless cleanup transaction. The winning bidder receives the username; the bid amount is forfeited to the `treasury-username-fees` pool. ```rust pub fn execute_finalize_auction( sender: &str, data: &UsernameAuctionFinalizeData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `685`. ## executor\_username::execute\_raise\_dispute [#executor_usernameexecute_raise_dispute] File a UDRP-style dispute against a registered username. Behaviour: 1. Validate that the sender == claimant\_did. 2. Verify the username is currently registered and not already disputed. 3. Charge the per-tx fee + filing fee. 4. Set `is_disputed = true` on the username record (locks it from transfer/release/metadata until the multisig resolves). 5. Insert a `UsernameDispute` record keyed by deterministic dispute\_id. ```rust pub fn execute_raise_dispute( sender: &str, data: &RaiseUsernameDisputeData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `803`. ## executor\_username::execute\_resolve\_dispute [#executor_usernameexecute_resolve_dispute] Resolve a previously-filed dispute. Permissionless to submit; the executor verifies the threshold-of-N multisig signatures over the canonical resolution payload. ```rust pub fn execute_resolve_dispute( sender: &str, data: &ResolveUsernameDisputeData, base_fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `914`. # sigil-node · executor_vigils URL: https://docs.sigil.ml/reference/rust/sigil-node/executor_vigils Markdown: https://docs.sigil.ml/reference/rust/sigil-node/executor_vigils.md Source declarations, signatures and documentation for executor_vigils. Source: `sigil/node/sigil-node/src/executor_vigils.rs`. SHA-256: `c9cf6d18974cd597fa3490d72b37c1f7a1c3a72da772990f657333d8a868005d`. 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. Module condition: ```rust #[cfg(feature = "vigils-v1")] ``` ## executor\_vigils::GAS\_REGISTER\_VIGIL\_SUBSCRIPTION [#executor_vigilsgas_register_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_REGISTER_VIGIL_SUBSCRIPTION: u64; ``` Source line: `20`. ## executor\_vigils::GAS\_UPDATE\_VIGIL\_SUBSCRIPTION [#executor_vigilsgas_update_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_UPDATE_VIGIL_SUBSCRIPTION: u64; ``` Source line: `21`. ## executor\_vigils::GAS\_CANCEL\_VIGIL\_SUBSCRIPTION [#executor_vigilsgas_cancel_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_CANCEL_VIGIL_SUBSCRIPTION: u64; ``` Source line: `22`. ## executor\_vigils::GAS\_VIGIL\_GAS\_ACCOUNTING [#executor_vigilsgas_vigil_gas_accounting] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_VIGIL_GAS_ACCOUNTING: u64; ``` Source line: `23`. ## executor\_vigils::GAS\_EVENT\_DELIVERY\_BASE [#executor_vigilsgas_event_delivery_base] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_EVENT_DELIVERY_BASE: u64; ``` Source line: `24`. ## executor\_vigils::GAS\_REGISTER\_INGESTOR [#executor_vigilsgas_register_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_REGISTER_INGESTOR: u64; ``` Source line: `25`. ## executor\_vigils::GAS\_UPDATE\_INGESTOR [#executor_vigilsgas_update_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_UPDATE_INGESTOR: u64; ``` Source line: `26`. ## executor\_vigils::GAS\_SLASH\_INGESTOR [#executor_vigilsgas_slash_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub const GAS_SLASH_INGESTOR: u64; ``` Source line: `27`. ## executor\_vigils::MAX\_CALLBACKS\_PER\_BLOCK [#executor_vigilsmax_callbacks_per_block] ```rust #[cfg(feature = "vigils-v1")] pub const MAX_CALLBACKS_PER_BLOCK: u32; ``` Source line: `28`. ## executor\_vigils::IN\_ZONE\_EVENT\_ANCHOR\_DOMAIN [#executor_vigilsin_zone_event_anchor_domain] ```rust #[cfg(feature = "vigils-v1")] pub const IN_ZONE_EVENT_ANCHOR_DOMAIN: &[u8]; ``` Source line: `29`. ## executor\_vigils::compute\_completion\_payload [#executor_vigilscompute_completion_payload] ```rust #[cfg(feature = "vigils-v1")] #[cfg(feature = "compute")] pub fn compute_completion_payload( receipt: &sigil_core::transaction::ComputeReceipt, ) -> Result; ``` Source line: `292`. ## executor\_vigils::in\_zone\_event\_anchor [#executor_vigilsin_zone_event_anchor] ```rust #[cfg(feature = "vigils-v1")] pub fn in_zone_event_anchor( block_height: u64, seq: u64, emitter: &str, topic: &str, data: &[u8], ) -> Result; ``` Source line: `489`. ## executor\_vigils::execute\_register\_vigil\_subscription [#executor_vigilsexecute_register_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_register_vigil_subscription( sender_did: &str, data: &RegisterVigilSubscriptionData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `573`. ## executor\_vigils::execute\_update\_vigil\_subscription [#executor_vigilsexecute_update_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_update_vigil_subscription( sender_did: &str, data: &UpdateVigilSubscriptionData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `621`. ## executor\_vigils::execute\_cancel\_vigil\_subscription [#executor_vigilsexecute_cancel_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_cancel_vigil_subscription( sender_did: &str, data: &CancelVigilSubscriptionData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `706`. ## executor\_vigils::execute\_deposit\_vigil\_gas [#executor_vigilsexecute_deposit_vigil_gas] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_deposit_vigil_gas( sender_did: &str, data: &DepositVigilGasData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `738`. ## executor\_vigils::execute\_withdraw\_vigil\_gas [#executor_vigilsexecute_withdraw_vigil_gas] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_withdraw_vigil_gas( sender_did: &str, data: &sigil_core::vigil::WithdrawVigilGasData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `767`. ## executor\_vigils::execute\_register\_ingestor [#executor_vigilsexecute_register_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_register_ingestor( sender_did: &str, data: &RegisterIngestorData, fee: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `804`. ## executor\_vigils::execute\_update\_ingestor\_stake [#executor_vigilsexecute_update_ingestor_stake] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_update_ingestor_stake( sender_did: &str, data: &UpdateIngestorStakeData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `861`. ## executor\_vigils::execute\_deregister\_ingestor [#executor_vigilsexecute_deregister_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_deregister_ingestor( sender_did: &str, data: &DeregisterIngestorData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `923`. ## executor\_vigils::execute\_slash\_ingestor [#executor_vigilsexecute_slash_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_slash_ingestor( sender_did: &str, data: &SlashIngestorData, fee: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `964`. ## executor\_vigils::execute\_event\_delivery [#executor_vigilsexecute_event_delivery] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_event_delivery( sender_did: &str, data: &EventDeliveryData, fee: u64, gas_price: u64, block_height: u64, state: &dyn ExecutionState, ) -> Result<(u64, Vec, Vec), NodeError>; ``` Source line: `1002`. ## executor\_vigils::execute\_vigil\_callback\_pass [#executor_vigilsexecute_vigil_callback_pass] ```rust #[cfg(feature = "vigils-v1")] pub fn execute_vigil_callback_pass( state: &dyn ExecutionState, block_height: u64, ) -> Result<(), NodeError>; ``` Source line: `1161`. # sigil-node · gal_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/gal_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/gal_durable.md Source declarations, signatures and documentation for gal_durable. Source: `sigil/node/sigil-node/src/gal_durable.rs`. SHA-256: `f0cf838f41a3d993bef89516db57fd852e0b0a6f2d20c14690cc5c3e9023a8d4`. 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. Module condition: ```rust #[cfg(feature = "tower")] ``` ## gal\_durable::DurableGalStore [#gal_durabledurablegalstore] ```rust #[cfg(feature = "tower")] pub struct DurableGalStore { } ``` Source line: `97`. ## gal\_durable::DurableGalStore::open [#gal_durabledurablegalstoreopen] ```rust #[cfg(feature = "tower")] pub fn open(path: &Path) -> Result; ``` Source line: `103`. ## gal\_durable::DurableGalStore::put\_hmr [#gal_durabledurablegalstoreput_hmr] ```rust #[cfg(feature = "tower")] pub fn put_hmr(&self, anchor: &HmrAnchor) -> Result<(), NodeError>; ``` Source line: `168`. ## gal\_durable::DurableGalStore::get\_hmr [#gal_durabledurablegalstoreget_hmr] ```rust #[cfg(feature = "tower")] pub fn get_hmr(&self, did: &str) -> Result, NodeError>; ``` Source line: `172`. ## gal\_durable::DurableGalStore::list\_hmrs [#gal_durabledurablegalstorelist_hmrs] ```rust #[cfg(feature = "tower")] pub fn list_hmrs(&self) -> Result, NodeError>; ``` Source line: `178`. ## gal\_durable::DurableGalStore::put\_mhr [#gal_durabledurablegalstoreput_mhr] ```rust #[cfg(feature = "tower")] pub fn put_mhr(&self, anchor: &MhrAnchor) -> Result<(), NodeError>; ``` Source line: `185`. ## gal\_durable::DurableGalStore::get\_mhr [#gal_durabledurablegalstoreget_mhr] ```rust #[cfg(feature = "tower")] pub fn get_mhr(&self, did: &str) -> Result, NodeError>; ``` Source line: `189`. ## gal\_durable::DurableGalStore::list\_mhrs [#gal_durabledurablegalstorelist_mhrs] ```rust #[cfg(feature = "tower")] pub fn list_mhrs(&self) -> Result, NodeError>; ``` Source line: `195`. ## gal\_durable::DurableGalStore::put\_enr [#gal_durabledurablegalstoreput_enr] ```rust #[cfg(feature = "tower")] pub fn put_enr(&self, anchor: &EnrAnchor) -> Result<(), NodeError>; ``` Source line: `202`. ## gal\_durable::DurableGalStore::get\_enr [#gal_durabledurablegalstoreget_enr] ```rust #[cfg(feature = "tower")] pub fn get_enr(&self, did: &str) -> Result, NodeError>; ``` Source line: `206`. ## gal\_durable::DurableGalStore::list\_enrs [#gal_durabledurablegalstorelist_enrs] ```rust #[cfg(feature = "tower")] pub fn list_enrs(&self) -> Result, NodeError>; ``` Source line: `212`. ## gal\_durable::DurableGalStore::put\_org\_root [#gal_durabledurablegalstoreput_org_root] ```rust #[cfg(feature = "tower")] pub fn put_org_root(&self, root: &OrgLineageRoot) -> Result<(), NodeError>; ``` Source line: `219`. ## gal\_durable::DurableGalStore::get\_org\_root [#gal_durabledurablegalstoreget_org_root] ```rust #[cfg(feature = "tower")] pub fn get_org_root(&self, org_did: &str) -> Result, NodeError>; ``` Source line: `223`. ## gal\_durable::DurableGalStore::list\_org\_roots [#gal_durabledurablegalstorelist_org_roots] ```rust #[cfg(feature = "tower")] pub fn list_org_roots(&self) -> Result, NodeError>; ``` Source line: `229`. ## gal\_durable::DurableGalStore::put\_shard\_assignment [#gal_durabledurablegalstoreput_shard_assignment] ```rust #[cfg(feature = "tower")] pub fn put_shard_assignment(&self, assignment: &ShardAssignment) -> Result<(), NodeError>; ``` Source line: `236`. ## gal\_durable::DurableGalStore::get\_shard\_assignment [#gal_durabledurablegalstoreget_shard_assignment] ```rust #[cfg(feature = "tower")] pub fn get_shard_assignment(&self, did: &str) -> Result, NodeError>; ``` Source line: `243`. ## gal\_durable::DurableGalStore::list\_shard\_assignments [#gal_durabledurablegalstorelist_shard_assignments] ```rust #[cfg(feature = "tower")] pub fn list_shard_assignments(&self) -> Result, NodeError>; ``` Source line: `249`. ## gal\_durable::DurableGalStore::put\_revocation [#gal_durabledurablegalstoreput_revocation] ```rust #[cfg(feature = "tower")] pub fn put_revocation(&self, record: &RevocationRecord) -> Result<(), NodeError>; ``` Source line: `256`. ## gal\_durable::DurableGalStore::get\_revocation [#gal_durabledurablegalstoreget_revocation] ```rust #[cfg(feature = "tower")] pub fn get_revocation(&self, did: &str) -> Result, NodeError>; ``` Source line: `260`. ## gal\_durable::DurableGalStore::list\_revocations [#gal_durabledurablegalstorelist_revocations] ```rust #[cfg(feature = "tower")] pub fn list_revocations(&self) -> Result, NodeError>; ``` Source line: `266`. ## gal\_durable::DurableGalStore::put\_topology [#gal_durabledurablegalstoreput_topology] ```rust #[cfg(feature = "tower")] pub fn put_topology(&self, entry: &ShardTopologyEntry) -> Result<(), NodeError>; ``` Source line: `273`. ## gal\_durable::DurableGalStore::list\_topology [#gal_durabledurablegalstorelist_topology] ```rust #[cfg(feature = "tower")] pub fn list_topology(&self) -> Result, NodeError>; ``` Source line: `277`. ## gal\_durable::ArcGalStore [#gal_durablearcgalstore] ```rust #[cfg(feature = "tower")] pub type ArcGalStore = Arc; ``` Source line: `293`. # sigil-node · genesis_loader URL: https://docs.sigil.ml/reference/rust/sigil-node/genesis_loader Markdown: https://docs.sigil.ml/reference/rust/sigil-node/genesis_loader.md Source declarations, signatures and documentation for genesis_loader. Source: `sigil/node/sigil-node/src/genesis_loader.rs`. SHA-256: `8712ecd501685ff1329655cf58e68e87b0598cda670c16460d55dcca4eae7551`. 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. ## genesis\_loader::load\_genesis [#genesis_loaderload_genesis] Load and validate a genesis configuration from a JSON file. # Errors [#errors] Returns \[`NodeError::GenesisLoadFailed`] if the file cannot be read, the JSON cannot be parsed, or the genesis configuration fails validation. ```rust pub fn load_genesis(path: &str) -> Result; ``` Source line: `13`. ## genesis\_loader::load\_genesis\_from\_str [#genesis_loaderload_genesis_from_str] Load a genesis configuration from a JSON string (useful for testing). # Errors [#errors-1] Same as \[`load_genesis`] but operates on a string instead of a file path. ```rust pub fn load_genesis_from_str(json: &str) -> Result; ``` Source line: `29`. # sigil-node · governance_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/governance_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/governance_durable.md Source declarations, signatures and documentation for governance_durable. Source: `sigil/node/sigil-node/src/governance_durable.rs`. SHA-256: `6d95456dd9e8a4b65404307b5dfa4152ce7b921caf1b6db9c461bc6cc704d838`. 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. ## governance\_durable::DurableGovernanceStore [#governance_durabledurablegovernancestore] Durable governance store backed by AkashaKV. Persists proposals, votes, voting tallies, and the execution timelock queue. All multi-write operations must use \[`GovernanceWriteBatch`] + \[`DurableGovernanceStore::commit_batch`] for crash safety. ```rust pub struct DurableGovernanceStore { } ``` Source line: `208`. ## governance\_durable::DurableGovernanceStore::open [#governance_durabledurablegovernancestoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the governance subsystem. Fatal on failure. ```rust pub fn open(path: &Path) -> Result; ``` Source line: `216`. ## governance\_durable::DurableGovernanceStore::get\_proposal [#governance_durabledurablegovernancestoreget_proposal] Fetch a proposal by ID. Returns `None` if not found. ```rust pub fn get_proposal(&self, proposal_id: &str) -> Result, NodeError>; ``` Source line: `291`. ## governance\_durable::DurableGovernanceStore::put\_proposal [#governance_durabledurablegovernancestoreput_proposal] Insert or replace a proposal. ```rust pub fn put_proposal(&self, proposal: &Proposal) -> Result<(), NodeError>; ``` Source line: `299`. ## governance\_durable::DurableGovernanceStore::list\_all\_proposals [#governance_durabledurablegovernancestorelist_all_proposals] Return all proposals in the store (order is lexicographic by id bytes). ```rust pub fn list_all_proposals(&self) -> Result, NodeError>; ``` Source line: `305`. ## governance\_durable::DurableGovernanceStore::list\_active\_proposals [#governance_durabledurablegovernancestorelist_active_proposals] Return proposals that are in an active (non-terminal) state. ```rust pub fn list_active_proposals(&self) -> Result, NodeError>; ``` Source line: `314`. ## governance\_durable::DurableGovernanceStore::get\_vote [#governance_durabledurablegovernancestoreget_vote] Fetch the full \[`Vote`] record cast by `voter_did` on `proposal_id`. Returns `None` if no vote has been recorded. ```rust pub fn get_vote(&self, proposal_id: &str, voter_did: &str) -> Result, NodeError>; ``` Source line: `323`. ## governance\_durable::DurableGovernanceStore::put\_vote [#governance_durabledurablegovernancestoreput_vote] Store a vote record for `(proposal_id, voter_did)`. ```rust pub fn put_vote(&self, vote: &Vote) -> Result<(), NodeError>; ``` Source line: `331`. ## governance\_durable::DurableGovernanceStore::list\_proposal\_votes [#governance_durabledurablegovernancestorelist_proposal_votes] Return all votes cast on a proposal, in lexicographic voter\_did order. ```rust pub fn list_proposal_votes(&self, proposal_id: &str) -> Result, NodeError>; ``` Source line: `338`. ## governance\_durable::DurableGovernanceStore::has\_voted [#governance_durabledurablegovernancestorehas_voted] Returns `true` if `voter_did` has already voted on `proposal_id`. Uses the lightweight voted-marker key (no full deserialisation). ```rust pub fn has_voted(&self, proposal_id: &str, voter_did: &str) -> Result; ``` Source line: `346`. ## governance\_durable::DurableGovernanceStore::mark\_voted [#governance_durabledurablegovernancestoremark_voted] Record the voted marker for `(proposal_id, voter_did)`. Must be committed atomically with the corresponding vote write; use \[`GovernanceWriteBatch`] for this. ```rust pub fn mark_voted(&self, proposal_id: &str, voter_did: &str) -> Result<(), NodeError>; ``` Source line: `353`. ## governance\_durable::DurableGovernanceStore::get\_tally [#governance_durabledurablegovernancestoreget_tally] Fetch the current \[`VotingTally`] for `proposal_id`. Returns `None` if no votes have been tallied yet. ```rust pub fn get_tally(&self, proposal_id: &str) -> Result, NodeError>; ``` Source line: `361`. ## governance\_durable::DurableGovernanceStore::put\_tally [#governance_durabledurablegovernancestoreput_tally] Store the current \[`VotingTally`] for a proposal. ```rust pub fn put_tally(&self, tally: &VotingTally) -> Result<(), NodeError>; ``` Source line: `369`. ## governance\_durable::DurableGovernanceStore::enqueue\_timelock [#governance_durabledurablegovernancestoreenqueue_timelock] Enqueue a timelock entry. Keyed by `(execution_epoch, proposal_id)` so lexicographic scan == chronological execution order. ```rust pub fn enqueue_timelock(&self, entry: &TimelockEntry) -> Result<(), NodeError>; ``` Source line: `379`. ## governance\_durable::DurableGovernanceStore::dequeue\_timelock [#governance_durabledurablegovernancestoredequeue_timelock] Mark a timelock entry as executed (soft-delete). Updates the entry's `status` to \[`TimelockStatus::Executed`] in-place rather than performing a hard delete. This preserves the audit trail and sidesteps the AkashaKV memtable-scan tombstone limitation: the delete API writes a tombstone to the active memtable, but the memtable iterator returns entries in timestamp-ascending order (earliest first), so the tombstone is deduplicated away before the engine-level scan can promote it. The overwrite approach produces a new version with a higher timestamp that IS returned first by the iterator. `list_due_timelocks` and `list_all_timelocks` both filter out entries whose status is `Executed` or `Cancelled`. ```rust pub fn dequeue_timelock( &self, execution_epoch: u64, proposal_id: &str, ) -> Result<(), NodeError>; ``` Source line: `398`. ## governance\_durable::DurableGovernanceStore::list\_due\_timelocks [#governance_durabledurablegovernancestorelist_due_timelocks] Return all timelock entries whose `execution_epoch <= current_epoch` **and** whose status is `Pending`, ordered by epoch ascending (ready-first), then by proposal\_id within the same epoch (lexicographic). ```rust pub fn list_due_timelocks(&self, current_epoch: u64) -> Result, NodeError>; ``` Source line: `418`. ## governance\_durable::DurableGovernanceStore::list\_all\_timelocks [#governance_durabledurablegovernancestorelist_all_timelocks] Return all pending timelock entries in the store (any epoch). Entries whose status is `Executed` or `Cancelled` are excluded. ```rust pub fn list_all_timelocks(&self) -> Result, NodeError>; ``` Source line: `446`. ## governance\_durable::DurableGovernanceStore::set\_executor\_proposal [#governance_durabledurablegovernancestoreset_executor_proposal] Persist the executor-internal \[`crate::executor::Proposal`] under its `u64` ID. These records are stored separately from the `sigil_governance::Proposal` records so the two data models do not interfere with each other. ```rust pub fn set_executor_proposal( &self, proposal: &crate::executor::Proposal, ) -> Result<(), NodeError>; ``` Source line: `467`. ## governance\_durable::DurableGovernanceStore::get\_executor\_proposal [#governance_durabledurablegovernancestoreget_executor_proposal] Return the executor-internal proposal for `id`, or `None` if absent. ```rust pub fn get_executor_proposal( &self, id: u64, ) -> Result, NodeError>; ``` Source line: `477`. ## governance\_durable::DurableGovernanceStore::list\_executor\_proposals [#governance_durabledurablegovernancestorelist_executor_proposals] Return all executor-internal proposals ordered by numeric ID. ```rust pub fn list_executor_proposals(&self) -> Result, NodeError>; ``` Source line: `488`. ## governance\_durable::DurableGovernanceStore::list\_executor\_votes [#governance_durabledurablegovernancestorelist_executor_votes] Return all executor voted markers as `(proposal_id, voter_did)`. ```rust pub fn list_executor_votes(&self) -> Result, NodeError>; ``` Source line: `499`. ## governance\_durable::DurableGovernanceStore::record\_executor\_vote [#governance_durabledurablegovernancestorerecord_executor_vote] Record that `voter_did` has voted on `proposal_id`. ```rust pub fn record_executor_vote(&self, proposal_id: u64, voter_did: &str) -> Result<(), NodeError>; ``` Source line: `521`. ## governance\_durable::DurableGovernanceStore::has\_executor\_voted [#governance_durabledurablegovernancestorehas_executor_voted] Return `true` if `voter_did` has already voted on `proposal_id`. ```rust pub fn has_executor_voted(&self, proposal_id: u64, voter_did: &str) -> Result; ``` Source line: `526`. ## governance\_durable::DurableGovernanceStore::flush [#governance_durabledurablegovernancestoreflush] Force a flush of AkashaKV memtables to SSTables. Useful in tests. ```rust pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `535`. ## governance\_durable::DurableGovernanceStore::close [#governance_durabledurablegovernancestoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `542`. ## governance\_durable::DurableGovernanceStore::commit\_batch [#governance_durabledurablegovernancestorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails the transaction is dropped (auto-aborted via `Drop`) before commit, leaving zero partial state visible. Either every operation in the batch lands or none do. ```rust pub fn commit_batch(&self, batch: &GovernanceWriteBatch) -> Result<(), NodeError>; ``` Source line: `556`. ## governance\_durable::DurableGovernanceStore::namespace\_prefix [#governance_durabledurablegovernancestorenamespace_prefix] Test helper: return the root namespace prefix for governance keys. ```rust pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `615`. ## governance\_durable::ArcGovernanceStore [#governance_durablearcgovernancestore] Convenience type alias for a shared durable governance store. ```rust pub type ArcGovernanceStore = Arc; ``` Source line: `621`. ## governance\_durable::GovernanceBatchOp [#governance_durablegovernancebatchop] An individual operation inside a \[`GovernanceWriteBatch`]. ```rust #[derive(Clone)] pub enum GovernanceBatchOp { /// Insert or replace a governance proposal. PutProposal(Proposal), /// Record a full vote payload. PutVote(Vote), /// Set the lightweight voted-marker for `(proposal_id, voter_did)`. MarkVoted { proposal_id: String, voter_did: String, }, /// Store the current voting tally for a proposal. PutTally(VotingTally), /// Enqueue a timelock entry for execution. EnqueueTimelock(TimelockEntry), /// Insert or replace an executor-internal [`crate::executor::Proposal`]. /// /// Stored in the `gov/exec/proposal/` keyspace so it does not collide /// with `sigil_governance::Proposal` records in `gov/proposal/`. SetExecutorProposal(Box), /// Record that `voter_did` has voted on `proposal_id` (u64 key). /// /// Stored in the `gov/exec/voted/` keyspace. RecordExecutorVote { proposal_id: u64, voter_did: String }, } ``` Source line: `629`. ## governance\_durable::GovernanceWriteBatch [#governance_durablegovernancewritebatch] Write batch accumulating all mutations for a single governance transition. Build the batch inside the transaction handler, then pass it to \[`crate::executor::ExecutionState::commit_governance_tx`]. A crash before `commit_governance_tx` returns leaves zero partial state on disk. ```rust #[derive(Default)] pub struct GovernanceWriteBatch { } ``` Source line: `660`. ## governance\_durable::GovernanceWriteBatch::new [#governance_durablegovernancewritebatchnew] Create an empty write batch. ```rust pub fn new() -> Self; ``` Source line: `666`. ## governance\_durable::GovernanceWriteBatch::put\_proposal [#governance_durablegovernancewritebatchput_proposal] Queue a proposal write. ```rust pub fn put_proposal(&mut self, proposal: Proposal); ``` Source line: `671`. ## governance\_durable::GovernanceWriteBatch::put\_vote [#governance_durablegovernancewritebatchput_vote] Queue a full vote record write. ```rust pub fn put_vote(&mut self, vote: Vote); ``` Source line: `676`. ## governance\_durable::GovernanceWriteBatch::mark\_voted [#governance_durablegovernancewritebatchmark_voted] Queue a voted-marker write for `(proposal_id, voter_did)`. ```rust pub fn mark_voted(&mut self, proposal_id: impl Into, voter_did: impl Into); ``` Source line: `681`. ## governance\_durable::GovernanceWriteBatch::put\_tally [#governance_durablegovernancewritebatchput_tally] Queue a tally write. ```rust pub fn put_tally(&mut self, tally: VotingTally); ``` Source line: `689`. ## governance\_durable::GovernanceWriteBatch::enqueue\_timelock [#governance_durablegovernancewritebatchenqueue_timelock] Queue a timelock enqueue operation. ```rust pub fn enqueue_timelock(&mut self, entry: TimelockEntry); ``` Source line: `694`. ## governance\_durable::GovernanceWriteBatch::set\_executor\_proposal [#governance_durablegovernancewritebatchset_executor_proposal] Queue an executor-internal proposal write. Use this (not `put_proposal`) when the proposal is represented by \[`crate::executor::Proposal`] rather than \[`sigil_governance::Proposal`]. ```rust pub fn set_executor_proposal(&mut self, proposal: crate::executor::Proposal); ``` Source line: `702`. ## governance\_durable::GovernanceWriteBatch::record\_executor\_vote [#governance_durablegovernancewritebatchrecord_executor_vote] Queue an executor voted-marker write for `(proposal_id: u64, voter_did)`. ```rust pub fn record_executor_vote(&mut self, proposal_id: u64, voter_did: impl Into); ``` Source line: `708`. ## governance\_durable::GovernanceWriteBatch::len [#governance_durablegovernancewritebatchlen] Number of operations queued. ```rust pub fn len(&self) -> usize; ``` Source line: `716`. ## governance\_durable::GovernanceWriteBatch::is\_empty [#governance_durablegovernancewritebatchis_empty] Returns `true` if no operations have been queued. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `721`. ## governance\_durable::GovernanceWriteBatch::into\_ops [#governance_durablegovernancewritebatchinto_ops] Consume the batch and return the inner op list. ```rust pub fn into_ops(self) -> Vec; ``` Source line: `726`. # sigil-node · health URL: https://docs.sigil.ml/reference/rust/sigil-node/health Markdown: https://docs.sigil.ml/reference/rust/sigil-node/health.md Source declarations, signatures and documentation for health. Source: `sigil/node/sigil-node/src/health.rs`. SHA-256: `2cd193841fbc67320b80063b3d58ce98c8c1042b06b02fba7df3f885a86a2752`. 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. ## health::HealthStatus [#healthhealthstatus] Overall health status of the node. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum HealthStatus { /// Node is healthy, synced, and participating normally. Healthy, /// Node is syncing and not yet caught up to the network tip. Syncing, /// Node is degraded — operational but experiencing issues. Degraded, /// Node is not operational. Unhealthy, } ``` Source line: `11`. ## health::HealthStatus::is\_serving [#healthhealthstatusis_serving] Returns `true` if the node is in a state where it can serve requests. ```rust pub fn is_serving(&self) -> bool; ``` Source line: `24`. ## health::HealthStatus::is\_healthy [#healthhealthstatusis_healthy] Returns `true` if the node is fully healthy. ```rust pub fn is_healthy(&self) -> bool; ``` Source line: `29`. ## health::SyncState [#healthsyncstate] Sync state of the node relative to the network. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SyncState { /// Whether the node has completed initial sync. pub synced: bool, /// Current block height on this node. pub current_height: u64, /// Highest block height known from peers. pub highest_known_height: u64, /// Number of blocks remaining to sync. pub blocks_behind: u64, /// Current epoch number. pub current_epoch: u64 } ``` Source line: `48`. ## health::SyncState::progress [#healthsyncstateprogress] Returns the sync progress as a fraction in `[0.0, 1.0]`. Returns `1.0` if synced or if the highest known height is 0. ```rust pub fn progress(&self) -> f64; ``` Source line: `65`. ## health::NodeMetrics [#healthnodemetrics] Counters tracking node activity since startup. ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct NodeMetrics { /// Total blocks processed (produced + validated + synced). pub blocks_processed: u64, /// Total transactions processed across all blocks. pub transactions_processed: u64, /// Number of blocks this node proposed (validator/producer modes only). pub blocks_proposed: u64, /// Number of consensus votes cast (validator/producer modes only). pub votes_cast: u64, /// Number of peers currently connected. pub peer_count: u32, /// Number of transactions in the mempool. pub mempool_size: u32, /// Total bytes received from the P2P network. pub bytes_received: u64, /// Total bytes sent on the P2P network. pub bytes_sent: u64 } ``` Source line: `78`. ## health::NodeMetrics::new [#healthnodemetricsnew] Create a new zeroed metrics instance. ```rust pub fn new() -> Self; ``` Source line: `99`. ## health::NodeMetrics::record\_block [#healthnodemetricsrecord_block] Record that a block was processed. ```rust pub fn record_block(&mut self, tx_count: u64); ``` Source line: `104`. ## health::NodeMetrics::record\_proposal [#healthnodemetricsrecord_proposal] Record that this node proposed a block. ```rust pub fn record_proposal(&mut self); ``` Source line: `110`. ## health::NodeMetrics::record\_vote [#healthnodemetricsrecord_vote] Record that a consensus vote was cast. ```rust pub fn record_vote(&mut self); ``` Source line: `115`. ## health::TowerMetrics [#healthtowermetrics] Tower chain metrics (only populated in validator/producer/tower modes). ```rust #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerMetrics { /// Current Tower slot number. pub current_slot: u64, /// Current Tower epoch. pub current_epoch: u64, /// Latest finalized epoch via Casper FFG. pub finalized_epoch: u64, /// Total finality votes this node has cast. pub finality_votes_cast: u64, /// Total committee attestations this node has produced. pub attestations_produced: u64 } ``` Source line: `122`. ## health::HealthCheck [#healthhealthcheck] Complete health check response combining status, sync, and metrics. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct HealthCheck { /// Overall health status. pub status: HealthStatus, /// Software version. pub version: String, /// Chain ID. pub chain_id: String, /// Node operating mode. pub node_mode: String, /// Sync state relative to the network. pub sync: SyncState, /// Activity counters. pub metrics: NodeMetrics, /// Tower chain metrics (present only for Tower-aware modes). #[serde(default, skip_serializing_if = "Option::is_none")] pub tower: Option, /// Unix timestamp of this health check. pub timestamp: u64, /// Node uptime in seconds. pub uptime_secs: u64 } ``` Source line: `137`. ## health::HealthCheck::compute\_status [#healthhealthcheckcompute_status] Determine the overall health status from the current state. The status is derived from: * `Healthy`: synced, has peers, no degradation signals * `Syncing`: not yet synced * `Degraded`: synced but zero peers * `Unhealthy`: none of the above ```rust pub fn compute_status(synced: bool, peer_count: u32) -> HealthStatus; ``` Source line: `167`. # sigil-node · host_backend URL: https://docs.sigil.ml/reference/rust/sigil-node/host_backend Markdown: https://docs.sigil.ml/reference/rust/sigil-node/host_backend.md Source declarations, signatures and documentation for host_backend. Source: `sigil/node/sigil-node/src/host_backend.rs`. SHA-256: `da16072dc665dcfde19acd7f02ff72bd9f999a00b52063082521b474e5ca38af`. 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. Module condition: ```rust #[cfg(feature = "wasm")] ``` ## host\_backend::ChainHostBackend [#host_backendchainhostbackend] Per-call backend. Borrows the chain state, snapshots the contract record, and stages all mutations in an in-memory overlay until the executor either `commit()`s the call or drops the backend (trap rollback). ```rust #[cfg(feature = "wasm")] pub struct ChainHostBackend<'a> { } ``` Source line: `40`. ## host\_backend::ChainHostBackend\<'a>::new [#host_backendchainhostbackendanew] ```rust #[cfg(feature = "wasm")] pub fn new( state: &'a dyn ExecutionState, record: ContractRecord, caller_did: impl Into, ) -> Self; ``` Source line: `72`. ## host\_backend::ChainHostBackend\<'a>::with\_declared\_access [#host_backendchainhostbackendawith_declared_access] Attach the transaction's declared read/write sets. Contract-local reads must be present in `reads` or `writes`; contract-local writes and external host effects must be present in `writes`. ```rust #[cfg(feature = "wasm")] pub fn with_declared_access(mut self, reads: &[StateAccess], writes: &[StateAccess]) -> Self; ``` Source line: `100`. ## host\_backend::ChainHostBackend\<'a>::with\_declared\_writes [#host_backendchainhostbackendawith_declared_writes] Attach the transaction's declared write set. Host functions with side effects outside the contract-local overlay reject undeclared writes before staging any mutation. ```rust #[cfg(feature = "wasm")] pub fn with_declared_writes(mut self, writes: &[StateAccess]) -> Self; ``` Source line: `109`. ## host\_backend::ChainHostBackend\<'a>::dry\_run [#host_backendchainhostbackendadry_run] Construct a dry-run backend. `commit()` becomes a no-op so any staged mutations are discarded by the caller's drop. ```rust #[cfg(feature = "wasm")] pub fn dry_run( state: &'a dyn ExecutionState, record: ContractRecord, caller_did: impl Into, ) -> Self; ``` Source line: `116`. ## host\_backend::ChainHostBackend\<'a>::commit [#host_backendchainhostbackendacommit] Flush staged mutations to the underlying `ExecutionState`. The executor calls this only on a successful WASM invocation. ```rust #[cfg(feature = "wasm")] pub fn commit(self) -> Result<(), HostError>; ``` Source line: `128`. ## host\_backend::ChainHostBackend\<'a>::record [#host_backendchainhostbackendarecord] Used by the executor after a successful run to compute the post-call state-root from the merged base + overlay view. ```rust #[cfg(feature = "wasm")] pub fn record(&self) -> &ContractRecord; ``` Source line: `215`. # sigil-node URL: https://docs.sigil.ml/reference/rust/sigil-node Markdown: https://docs.sigil.ml/reference/rust/sigil-node.md Sigil blockchain node binary — multi-mode validator/RPC/archive Sigil blockchain node binary — multi-mode validator/RPC/archive | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-node` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-node/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_node` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-node = { path = "../sigil-node" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | ----------------------- | ------------------------------------------------------------------------------------- | | `default` | `compute`, `vigils-v1`, `labor-bounty` | | `legacy-rocksdb-import` | `dep:rocksdb`, `sigil-storage/legacy-rocksdb-import` | | `labor-bounty` | No additional feature dependencies | | `compute` | `sigil-core/compute`, `sigil-consensus/compute`, `sigil-execution/compute` | | `tower` | `sigil-core/tower`, `sigil-consensus/tower` | | `czac` | `sigil-core/czac` | | `nova` | `sigil-core/nova` | | `governance` | `sigil-core/governance` | | `contracts` | `compute`, `sigil-consensus/contracts` | | `wasm` | `contracts`, `dep:sigil-wasm` | | `vigils-v1` | `wasm` | | `tee-verify` | `compute` | | `tee-verify-sev-snp` | `tee-verify`, `dep:p384`, `dep:sha2`, `dep:x509-parser`, `dep:der-parser`, `dep:ring` | | `tee-verify-sgx-dcap` | `tee-verify`, `dep:p256`, `dep:sha2`, `dep:x509-parser`, `dep:der-parser` | | `tee-verify-tdx` | `tee-verify`, `dep:p256`, `dep:sha2`, `dep:x509-parser`, `dep:der-parser` | | `tee-verify-arm-cca` | `tee-verify`, `dep:p384`, `dep:sha2`, `dep:coset`, `dep:ciborium` | | `dao-validators` | `sigil-state/dao-validators`, `dep:async-trait`, `dep:oas-resolve` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-node/crate) — 82 declarations * [admission](/reference/rust/sigil-node/admission) — 15 declarations * [bootstrap](/reference/rust/sigil-node/bootstrap) — 18 declarations * [compute\_durable](/reference/rust/sigil-node/compute_durable) — 116 declarations * [compute\_state](/reference/rust/sigil-node/compute_state) — 46 declarations * [consensus\_coordinator](/reference/rust/sigil-node/consensus_coordinator) — 7 declarations * [contract\_durable](/reference/rust/sigil-node/contract_durable) — 47 declarations * [crucible\_durable](/reference/rust/sigil-node/crucible_durable) — 31 declarations * [dex\_durable](/reference/rust/sigil-node/dex_durable) — 25 declarations * [engine](/reference/rust/sigil-node/engine) — 34 declarations * [error](/reference/rust/sigil-node/error) — 2 declarations * [executor](/reference/rust/sigil-node/executor) — 24 declarations * [executor\_compute](/reference/rust/sigil-node/executor_compute) — 16 declarations * [executor\_contract](/reference/rust/sigil-node/executor_contract) — 16 declarations * [executor\_crucible](/reference/rust/sigil-node/executor_crucible) — 12 declarations * [executor\_dao](/reference/rust/sigil-node/executor_dao) — 13 declarations * [executor\_dex](/reference/rust/sigil-node/executor_dex) — 10 declarations * [executor\_evidence](/reference/rust/sigil-node/executor_evidence) — 1 declarations * [executor\_gal](/reference/rust/sigil-node/executor_gal) — 11 declarations * [executor\_labor](/reference/rust/sigil-node/executor_labor) — 34 declarations * [executor\_mail](/reference/rust/sigil-node/executor_mail) — 30 declarations * [executor\_nft](/reference/rust/sigil-node/executor_nft) — 6 declarations * [executor\_nova](/reference/rust/sigil-node/executor_nova) — 20 declarations * [executor\_recovery](/reference/rust/sigil-node/executor_recovery) — 6 declarations * [executor\_storage](/reference/rust/sigil-node/executor_storage) — 8 declarations * [executor\_username](/reference/rust/sigil-node/executor_username) — 9 declarations * [executor\_vigils](/reference/rust/sigil-node/executor_vigils) — 23 declarations * [gal\_durable](/reference/rust/sigil-node/gal_durable) — 23 declarations * [genesis\_loader](/reference/rust/sigil-node/genesis_loader) — 2 declarations * [governance\_durable](/reference/rust/sigil-node/governance_durable) — 41 declarations * [health](/reference/rust/sigil-node/health) — 13 declarations * [host\_backend](/reference/rust/sigil-node/host_backend) — 7 declarations * [labor\_durable](/reference/rust/sigil-node/labor_durable) — 66 declarations * [logging](/reference/rust/sigil-node/logging) — 13 declarations * [mail\_durable](/reference/rust/sigil-node/mail_durable) — 41 declarations * [mempool](/reference/rust/sigil-node/mempool) — 27 declarations * [metrics](/reference/rust/sigil-node/metrics) — 39 declarations * [nft\_durable](/reference/rust/sigil-node/nft_durable) — 36 declarations * [nova\_durable](/reference/rust/sigil-node/nova_durable) — 30 declarations * [recovery\_durable](/reference/rust/sigil-node/recovery_durable) — 24 declarations * [rpc\_compute](/reference/rust/sigil-node/rpc_compute) — 20 declarations * [rpc\_contract](/reference/rust/sigil-node/rpc_contract) — 8 declarations * [rpc\_crucible](/reference/rust/sigil-node/rpc_crucible) — 7 declarations * [rpc\_dex](/reference/rust/sigil-node/rpc_dex) — 10 declarations * [rpc\_evidence](/reference/rust/sigil-node/rpc_evidence) — 2 declarations * [rpc\_gal](/reference/rust/sigil-node/rpc_gal) — 7 declarations * [rpc\_labor](/reference/rust/sigil-node/rpc_labor) — 14 declarations * [rpc\_mail](/reference/rust/sigil-node/rpc_mail) — 14 declarations * [rpc\_middleware](/reference/rust/sigil-node/rpc_middleware) — 12 declarations * [rpc\_nft](/reference/rust/sigil-node/rpc_nft) — 5 declarations * [rpc\_nova](/reference/rust/sigil-node/rpc_nova) — 6 declarations * [rpc\_server](/reference/rust/sigil-node/rpc_server) — 12 declarations * [rpc\_storage\_market](/reference/rust/sigil-node/rpc_storage_market) — 8 declarations * [rpc\_sync](/reference/rust/sigil-node/rpc_sync) — 7 declarations * [rpc\_username](/reference/rust/sigil-node/rpc_username) — 6 declarations * [rpc\_vigils](/reference/rust/sigil-node/rpc_vigils) — 5 declarations * [snapshot](/reference/rust/sigil-node/snapshot) — 5 declarations * [staking](/reference/rust/sigil-node/staking) — 1 declarations * [storage\_market\_durable](/reference/rust/sigil-node/storage_market_durable) — 29 declarations * [storage\_migration](/reference/rust/sigil-node/storage_migration) — 2 declarations * [tee\_verify](/reference/rust/sigil-node/tee_verify) — 14 declarations * [tee\_verify::arm\_cca](/reference/rust/sigil-node/tee_verify-arm_cca) — 2 declarations * [tee\_verify::sev\_snp](/reference/rust/sigil-node/tee_verify-sev_snp) — 2 declarations * [tee\_verify::sgx\_dcap](/reference/rust/sigil-node/tee_verify-sgx_dcap) — 2 declarations * [tee\_verify::tdx](/reference/rust/sigil-node/tee_verify-tdx) — 2 declarations * [tower\_durable](/reference/rust/sigil-node/tower_durable) — 39 declarations * [tower\_runtime](/reference/rust/sigil-node/tower_runtime) — 6 declarations * [username\_durable](/reference/rust/sigil-node/username_durable) — 34 declarations * [validator\_agent](/reference/rust/sigil-node/validator_agent) — 23 declarations * [weave](/reference/rust/sigil-node/weave) — 12 declarations * [ws](/reference/rust/sigil-node/ws) — 15 declarations # sigil-node · labor_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/labor_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/labor_durable.md Source declarations, signatures and documentation for labor_durable. Source: `sigil/node/sigil-node/src/labor_durable.rs`. SHA-256: `20cb878ad0c83c6bfb6dd421a1a63e3ff4d14302123ae2d2a0b79f795c5153e0`. 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. ## labor\_durable::LaborEvent [#labor_durablelaborevent] A lightweight audit event appended to the labor event log on every state-changing labor transaction. ```rust #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct LaborEvent { /// Block at which the event was emitted. pub block_height: u64, /// Sequence number within the block (for ordering). pub seq: u64, /// Contract ID this event relates to. pub contract_id: String, /// Kind of event (e.g. `"contract_created"`, `"milestone_released"`). pub kind: String, /// Free-form JSON payload (actor DIDs, amounts, etc.). pub payload: serde_json::Value } ``` Source line: `335`. ## labor\_durable::DurableLaborStore [#labor_durabledurablelaborstore] Durable labor marketplace store backed by AkashaKV. Persists \[`LaborContract`] records, per-milestone state, worker assignment indexes, and an append-only audit event log. All multi-write operations must use \[`LaborWriteBatch`] + \[`DurableLaborStore::commit_batch`] for crash safety. ```rust pub struct DurableLaborStore { } ``` Source line: `358`. ## labor\_durable::DurableLaborStore::open [#labor_durabledurablelaborstoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the labor subsystem. Fatal on failure. ```rust pub fn open(path: &Path) -> Result; ``` Source line: `366`. ## labor\_durable::DurableLaborStore::get\_contract [#labor_durabledurablelaborstoreget_contract] Fetch a labor contract by ID. Returns `None` if not found. ```rust pub fn get_contract(&self, contract_id: &str) -> Result, NodeError>; ``` Source line: `435`. ## labor\_durable::DurableLaborStore::put\_contract [#labor_durabledurablelaborstoreput_contract] Insert or replace a labor contract (top-level record only, without persisting individual milestones separately). Prefer [`commit_batch`](Self::commit_batch) for multi-write atomicity. ```rust pub fn put_contract(&self, contract: &LaborContract) -> Result<(), NodeError>; ``` Source line: `445`. ## labor\_durable::DurableLaborStore::list\_all\_contracts [#labor_durabledurablelaborstorelist_all_contracts] Return all contracts in the store. ```rust pub fn list_all_contracts(&self) -> Result, NodeError>; ``` Source line: `451`. ## labor\_durable::DurableLaborStore::list\_contracts\_by\_state [#labor_durabledurablelaborstorelist_contracts_by_state] Return all contracts in a given state. ```rust pub fn list_contracts_by_state( &self, state: ContractState, ) -> Result, NodeError>; ``` Source line: `460`. ## labor\_durable::DurableLaborStore::get\_job [#labor_durabledurablelaborstoreget_job] Fetch a labor job posting by ID. Returns `None` if not found. ```rust pub fn get_job(&self, job_id: &str) -> Result, NodeError>; ``` Source line: `471`. ## labor\_durable::DurableLaborStore::put\_job [#labor_durabledurablelaborstoreput_job] Insert or replace a job record. ```rust pub fn put_job(&self, job: &LaborJob) -> Result<(), NodeError>; ``` Source line: `479`. ## labor\_durable::DurableLaborStore::list\_all\_jobs [#labor_durabledurablelaborstorelist_all_jobs] Return all job postings in the store. ```rust pub fn list_all_jobs(&self) -> Result, NodeError>; ``` Source line: `485`. ## labor\_durable::DurableLaborStore::get\_bid [#labor_durabledurablelaborstoreget_bid] Fetch a labor bid by ID. Returns `None` if not found. ```rust pub fn get_bid(&self, bid_id: &str) -> Result, NodeError>; ``` Source line: `496`. ## labor\_durable::DurableLaborStore::put\_bid [#labor_durabledurablelaborstoreput_bid] Insert or replace a bid record. ```rust pub fn put_bid(&self, bid: &LaborBid) -> Result<(), NodeError>; ``` Source line: `504`. ## labor\_durable::DurableLaborStore::list\_all\_bids [#labor_durabledurablelaborstorelist_all_bids] Return all bids in the store. ```rust pub fn list_all_bids(&self) -> Result, NodeError>; ``` Source line: `510`. ## labor\_durable::DurableLaborStore::list\_job\_bids [#labor_durabledurablelaborstorelist_job_bids] Return all bid IDs for a given job. ```rust pub fn list_job_bids(&self, job_id: &str) -> Result, NodeError>; ``` Source line: `519`. ## labor\_durable::DurableLaborStore::get\_milestone [#labor_durabledurablelaborstoreget_milestone] Fetch a single milestone by contract + index. ```rust pub fn get_milestone( &self, contract_id: &str, milestone_index: u32, ) -> Result, NodeError>; ``` Source line: `542`. ## labor\_durable::DurableLaborStore::put\_milestone [#labor_durabledurablelaborstoreput_milestone] Store a milestone record. ```rust pub fn put_milestone(&self, contract_id: &str, milestone: &Milestone) -> Result<(), NodeError>; ``` Source line: `555`. ## labor\_durable::DurableLaborStore::list\_milestones [#labor_durabledurablelaborstorelist_milestones] Return all milestones for a contract, ordered by index (ascending via big-endian key ordering). ```rust pub fn list_milestones(&self, contract_id: &str) -> Result, NodeError>; ``` Source line: `563`. ## labor\_durable::DurableLaborStore::list\_milestones\_by\_state [#labor_durabledurablelaborstorelist_milestones_by_state] Return all milestones for a contract that are in a given state. ```rust pub fn list_milestones_by_state( &self, contract_id: &str, state: MilestoneState, ) -> Result, NodeError>; ``` Source line: `573`. ## labor\_durable::DurableLaborStore::index\_worker\_contract [#labor_durabledurablelaborstoreindex_worker_contract] Record that `worker_did` is a party to `contract_id`. Value is presence-only (b"1"); use [`commit_batch`](Self::commit_batch) to write this atomically with the contract record. ```rust pub fn index_worker_contract( &self, worker_did: &str, contract_id: &str, ) -> Result<(), NodeError>; ``` Source line: `587`. ## labor\_durable::DurableLaborStore::list\_worker\_contracts [#labor_durabledurablelaborstorelist_worker_contracts] Return all contract IDs for which `worker_did` has an index entry. ```rust pub fn list_worker_contracts(&self, worker_did: &str) -> Result, NodeError>; ``` Source line: `597`. ## labor\_durable::DurableLaborStore::put\_dispute\_index [#labor_durabledurablelaborstoreput_dispute_index] Write a dispute\_id → contract\_id mapping to the dispute index. Called atomically when a dispute is raised. ```rust pub fn put_dispute_index(&self, dispute_id: &str, contract_id: &str) -> Result<(), NodeError>; ``` Source line: `624`. ## labor\_durable::DurableLaborStore::get\_dispute\_contract\_id [#labor_durabledurablelaborstoreget_dispute_contract_id] Look up the contract\_id for a given dispute\_id. ```rust pub fn get_dispute_contract_id(&self, dispute_id: &str) -> Result, NodeError>; ``` Source line: `630`. ## labor\_durable::DurableLaborStore::get\_dispute [#labor_durabledurablelaborstoreget_dispute] Fetch the full durable dispute record. ```rust pub fn get_dispute(&self, dispute_id: &str) -> Result, NodeError>; ``` Source line: `641`. ## labor\_durable::DurableLaborStore::put\_dispute [#labor_durabledurablelaborstoreput_dispute] Insert or replace a durable dispute record. ```rust pub fn put_dispute(&self, dispute: &Dispute) -> Result<(), NodeError>; ``` Source line: `649`. ## labor\_durable::DurableLaborStore::list\_disputes [#labor_durabledurablelaborstorelist_disputes] Return all disputes, optionally filtered by state. ```rust pub fn list_disputes(&self, state: Option) -> Result, NodeError>; ``` Source line: `655`. ## labor\_durable::DurableLaborStore::get\_escrow [#labor_durabledurablelaborstoreget_escrow] Fetch exact labor escrow accounting for a contract. ```rust pub fn get_escrow(&self, contract_id: &str) -> Result, NodeError>; ``` Source line: `670`. ## labor\_durable::DurableLaborStore::put\_escrow [#labor_durabledurablelaborstoreput_escrow] Insert or replace a labor escrow accounting record. ```rust pub fn put_escrow(&self, escrow: &LaborEscrow) -> Result<(), NodeError>; ``` Source line: `678`. ## labor\_durable::DurableLaborStore::list\_all\_escrows [#labor_durabledurablelaborstorelist_all_escrows] Return all labor escrow records. ```rust pub fn list_all_escrows(&self) -> Result, NodeError>; ``` Source line: `684`. ## labor\_durable::DurableLaborStore::append\_event [#labor_durabledurablelaborstoreappend_event] Append an audit event to the event log. Events are immutable once written; there is no delete. ```rust pub fn append_event(&self, event: &LaborEvent) -> Result<(), NodeError>; ``` Source line: `696`. ## labor\_durable::DurableLaborStore::list\_events\_in\_range [#labor_durabledurablelaborstorelist_events_in_range] Return events in `[from_height, to_height]` (inclusive), ordered chronologically (block height ascending, then seq ascending). ```rust pub fn list_events_in_range( &self, from_height: u64, to_height: u64, ) -> Result, NodeError>; ``` Source line: `704`. ## labor\_durable::DurableLaborStore::get\_offer [#labor_durabledurablelaborstoreget_offer] Fetch an open bounty offer by ID. ```rust pub fn get_offer(&self, offer_id: &str) -> Result, NodeError>; ``` Source line: `729`. ## labor\_durable::DurableLaborStore::put\_offer [#labor_durabledurablelaborstoreput_offer] Insert or replace a bounty offer record. ```rust pub fn put_offer(&self, offer: &BountyOffer) -> Result<(), NodeError>; ``` Source line: `737`. ## labor\_durable::DurableLaborStore::list\_offers [#labor_durabledurablelaborstorelist_offers] Return bounty offers, optionally filtered by state. ```rust pub fn list_offers(&self, state: Option) -> Result, NodeError>; ``` Source line: `743`. ## labor\_durable::DurableLaborStore::get\_claim [#labor_durabledurablelaborstoreget_claim] Fetch a bounty claim by ID. ```rust pub fn get_claim(&self, claim_id: &str) -> Result, NodeError>; ``` Source line: `756`. ## labor\_durable::DurableLaborStore::put\_claim [#labor_durabledurablelaborstoreput_claim] Insert or replace a bounty claim. ```rust pub fn put_claim(&self, claim: &BountyClaim) -> Result<(), NodeError>; ``` Source line: `764`. ## labor\_durable::DurableLaborStore::list\_claims [#labor_durabledurablelaborstorelist_claims] Return bounty claims, optionally filtered by offer and claimant. ```rust pub fn list_claims( &self, offer_id: Option<&str>, claimant_did: Option<&str>, ) -> Result, NodeError>; ``` Source line: `770`. ## labor\_durable::DurableLaborStore::get\_claim\_index [#labor_durabledurablelaborstoreget_claim_index] Lookup the replay/equivocation guard index for claimant deliverables. ```rust pub fn get_claim_index( &self, offer_id: &str, claimant_did: &str, deliverable_hash: &str, ) -> Result, NodeError>; ``` Source line: `806`. ## labor\_durable::DurableLaborStore::get\_claim\_attestation [#labor_durabledurablelaborstoreget_claim_attestation] Fetch a claim attestation by ID. ```rust pub fn get_claim_attestation( &self, attestation_id: &str, ) -> Result, NodeError>; ``` Source line: `825`. ## labor\_durable::DurableLaborStore::put\_claim\_attestation [#labor_durabledurablelaborstoreput_claim_attestation] Insert or replace a claim attestation. ```rust pub fn put_claim_attestation(&self, attestation: &ClaimAttestation) -> Result<(), NodeError>; ``` Source line: `836`. ## labor\_durable::DurableLaborStore::list\_claim\_attestations [#labor_durabledurablelaborstorelist_claim_attestations] List attestations for one claim in deterministic ID order. ```rust pub fn list_claim_attestations( &self, claim_id: &str, ) -> Result, NodeError>; ``` Source line: `842`. ## labor\_durable::DurableLaborStore::flush [#labor_durabledurablelaborstoreflush] Force a flush of AkashaKV memtables to SSTables. Useful in tests. ```rust pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `866`. ## labor\_durable::DurableLaborStore::close [#labor_durabledurablelaborstoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `873`. ## labor\_durable::DurableLaborStore::commit\_batch [#labor_durabledurablelaborstorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails, the transaction is dropped (auto-aborted) before commit, leaving zero partial state. Either every operation in the batch lands or none do. ```rust pub fn commit_batch(&self, batch: &LaborWriteBatch) -> Result<(), NodeError>; ``` Source line: `887`. ## labor\_durable::DurableLaborStore::namespace\_prefix [#labor_durabledurablelaborstorenamespace_prefix] Test helper: return the root namespace prefix for labor keys. ```rust pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `1007`. ## labor\_durable::ArcLaborStore [#labor_durablearclaborstore] Convenience type alias for a shared durable labor store. ```rust pub type ArcLaborStore = Arc; ``` Source line: `1013`. ## labor\_durable::LaborBatchOp [#labor_durablelaborbatchop] An individual operation inside a \[`LaborWriteBatch`]. ```rust #[derive(Clone)] pub enum LaborBatchOp { /// Insert or replace a labor job posting. /// /// Boxed to reduce enum variant size — `LaborJob` is large. PutJob(Box), /// Insert or replace a labor bid. /// /// Boxed to reduce enum variant size — `LaborBid` is large. PutBid(Box), /// Write a job→bid index entry (presence marker). IndexJobBid { job_id: String, bid_id: String }, /// Insert or replace a labor contract record. /// /// Boxed to reduce enum variant size — `LaborContract` is large. PutContract(Box), /// Insert or replace a single milestone for a contract. PutMilestone { contract_id: String, milestone: Milestone, }, /// Write a worker→contract index entry (presence marker). IndexWorker { worker_did: String, contract_id: String, }, /// Write a dispute_id → contract_id index entry. IndexDispute { dispute_id: String, contract_id: String, }, /// Insert or replace a full dispute record. PutDispute(Box), /// Insert or replace exact escrow accounting for a contract. PutEscrow(Box), /// Append an immutable audit event. AppendEvent(LaborEvent), /// Insert or replace an open bounty offer. PutOffer(Box), /// Insert or replace an open bounty claim. PutClaim(Box), /// Write the claimant+deliverable replay guard for a claim. IndexClaim { offer_id: String, claimant_did: String, deliverable_hash: String, claim_id: String, }, /// Write deterministic per-offer claim ordering. IndexOfferClaim { offer_id: String, claim_sequence: u32, claim_id: String, }, /// Insert or replace a claim attestation and its claim index. PutClaimAttestation(Box), } ``` Source line: `1021`. ## labor\_durable::LaborWriteBatch [#labor_durablelaborwritebatch] Write batch accumulating all mutations for a single labor state transition. Build the batch inside the transaction handler, then pass it to \[`crate::executor::ExecutionState::commit_labor_tx`]. A crash before `commit_labor_tx` returns leaves zero partial state on disk — eliminating the create\_contract fund-loss window and milestone\_release double-pay window. ```rust #[derive(Default)] pub struct LaborWriteBatch { } ``` Source line: `1085`. ## labor\_durable::LaborWriteBatch::new [#labor_durablelaborwritebatchnew] Create an empty write batch. ```rust pub fn new() -> Self; ``` Source line: `1091`. ## labor\_durable::LaborWriteBatch::put\_job [#labor_durablelaborwritebatchput_job] Queue a job posting write. ```rust pub fn put_job(&mut self, job: LaborJob); ``` Source line: `1096`. ## labor\_durable::LaborWriteBatch::put\_bid [#labor_durablelaborwritebatchput_bid] Queue a bid write. ```rust pub fn put_bid(&mut self, bid: LaborBid); ``` Source line: `1101`. ## labor\_durable::LaborWriteBatch::index\_job\_bid [#labor_durablelaborwritebatchindex_job_bid] Queue a job→bid index write. ```rust pub fn index_job_bid(&mut self, job_id: impl Into, bid_id: impl Into); ``` Source line: `1106`. ## labor\_durable::LaborWriteBatch::put\_contract [#labor_durablelaborwritebatchput_contract] Queue a contract record write. ```rust pub fn put_contract(&mut self, contract: LaborContract); ``` Source line: `1114`. ## labor\_durable::LaborWriteBatch::put\_milestone [#labor_durablelaborwritebatchput_milestone] Queue a milestone write for `contract_id`. ```rust pub fn put_milestone(&mut self, contract_id: impl Into, milestone: Milestone); ``` Source line: `1119`. ## labor\_durable::LaborWriteBatch::index\_worker [#labor_durablelaborwritebatchindex_worker] Queue a worker→contract index write. ```rust pub fn index_worker(&mut self, worker_did: impl Into, contract_id: impl Into); ``` Source line: `1127`. ## labor\_durable::LaborWriteBatch::index\_dispute [#labor_durablelaborwritebatchindex_dispute] Queue a dispute\_id → contract\_id index write. ```rust pub fn index_dispute(&mut self, dispute_id: impl Into, contract_id: impl Into); ``` Source line: `1135`. ## labor\_durable::LaborWriteBatch::put\_dispute [#labor_durablelaborwritebatchput_dispute] Queue a full dispute record write. ```rust pub fn put_dispute(&mut self, dispute: Dispute); ``` Source line: `1143`. ## labor\_durable::LaborWriteBatch::put\_escrow [#labor_durablelaborwritebatchput_escrow] Queue an escrow accounting write. ```rust pub fn put_escrow(&mut self, escrow: LaborEscrow); ``` Source line: `1148`. ## labor\_durable::LaborWriteBatch::append\_event [#labor_durablelaborwritebatchappend_event] Queue an audit event append. ```rust pub fn append_event(&mut self, event: LaborEvent); ``` Source line: `1153`. ## labor\_durable::LaborWriteBatch::put\_offer [#labor_durablelaborwritebatchput_offer] Queue an open bounty offer write. ```rust pub fn put_offer(&mut self, offer: BountyOffer); ``` Source line: `1158`. ## labor\_durable::LaborWriteBatch::put\_claim [#labor_durablelaborwritebatchput_claim] Queue an open bounty claim write. ```rust pub fn put_claim(&mut self, claim: BountyClaim); ``` Source line: `1163`. ## labor\_durable::LaborWriteBatch::index\_claim [#labor_durablelaborwritebatchindex_claim] Queue the claimant+deliverable replay guard. ```rust pub fn index_claim( &mut self, offer_id: impl Into, claimant_did: impl Into, deliverable_hash: impl Into, claim_id: impl Into, ); ``` Source line: `1168`. ## labor\_durable::LaborWriteBatch::index\_offer\_claim [#labor_durablelaborwritebatchindex_offer_claim] Queue deterministic per-offer claim ordering. ```rust pub fn index_offer_claim( &mut self, offer_id: impl Into, claim_sequence: u32, claim_id: impl Into, ); ``` Source line: `1184`. ## labor\_durable::LaborWriteBatch::put\_claim\_attestation [#labor_durablelaborwritebatchput_claim_attestation] Queue a claim attestation write. ```rust pub fn put_claim_attestation(&mut self, attestation: ClaimAttestation); ``` Source line: `1198`. ## labor\_durable::LaborWriteBatch::len [#labor_durablelaborwritebatchlen] Number of operations queued. ```rust pub fn len(&self) -> usize; ``` Source line: `1204`. ## labor\_durable::LaborWriteBatch::is\_empty [#labor_durablelaborwritebatchis_empty] Returns `true` if no operations have been queued. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `1209`. ## labor\_durable::LaborWriteBatch::into\_ops [#labor_durablelaborwritebatchinto_ops] Consume the batch and return the inner op list. ```rust pub fn into_ops(self) -> Vec; ``` Source line: `1214`. # sigil-node · logging URL: https://docs.sigil.ml/reference/rust/sigil-node/logging Markdown: https://docs.sigil.ml/reference/rust/sigil-node/logging.md Source declarations, signatures and documentation for logging. Source: `sigil/node/sigil-node/src/logging.rs`. SHA-256: `9b239c22d4f4685b1db0edff6d11e9e9fdfc29239d324a1ea9460680a7c9aa55`. 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. ## logging::print\_banner [#loggingprint_banner] Print the SIGIL ASCII art banner and version string. Silently skipped when stdout is not a terminal (e.g. piped to a file). ```rust pub fn print_banner(version: &str); ``` Source line: `38`. ## logging::section [#loggingsection] Print a section header with a green bullet. ```text ● Loading genesis ``` ```rust pub fn section(title: &str); ``` Source line: `58`. ## logging::item [#loggingitem] Print a tree item (non-last). ```text ├─ Chain ID sigil-testnet-1 ``` ```rust pub fn item(label: &str, value: &str); ``` Source line: `67`. ## logging::last\_item [#logginglast_item] Print the last tree item. ```text └─ Data Directory /tmp/sigil-testnet ``` ```rust pub fn last_item(label: &str, value: &str); ``` Source line: `76`. ## logging::success [#loggingsuccess] Print a success message with a green checkmark. ```text ✓ Genesis loaded ``` ```rust pub fn success(msg: &str); ``` Source line: `85`. ## logging::subsystem\_ok [#loggingsubsystem_ok] Print a subsystem that started successfully (non-last). ```text ├─ ✓ Mempool (capacity: 10,000 txs) ``` ```rust pub fn subsystem_ok(label: &str, detail: &str); ``` Source line: `96`. ## logging::subsystem\_ok\_last [#loggingsubsystem_ok_last] Print the last subsystem that started successfully. ```text └─ ✓ Block production (enabled) ``` ```rust pub fn subsystem_ok_last(label: &str, detail: &str); ``` Source line: `107`. ## logging::subsystem\_skip [#loggingsubsystem_skip] Print a skipped/disabled subsystem (always last). ```text └─ ○ Block production (rpc mode) ``` ```rust pub fn subsystem_skip(label: &str, reason: &str); ``` Source line: `118`. ## logging::ready [#loggingready] Print the "node ready" banner with double-line dividers. ```rust pub fn ready(); ``` Source line: `123`. ## logging::shutdown\_begin [#loggingshutdown_begin] Print shutdown header. ```rust pub fn shutdown_begin(); ``` Source line: `133`. ## logging::shutdown\_complete [#loggingshutdown_complete] Print shutdown complete message. ```rust pub fn shutdown_complete(); ``` Source line: `139`. ## logging::format\_number [#loggingformat_number] Format a u64 with comma separators (e.g. `1,234,567`). ```rust pub fn format_number(n: u64) -> String; ``` Source line: `147`. ## logging::init\_tracing [#logginginit_tracing] Initialize the `tracing` subscriber with a compact, colored format. Respects the `RUST_LOG` environment variable if set; otherwise falls back to the provided `log_level` (e.g. "info", "debug", "trace"). ```rust pub fn init_tracing(log_level: &str); ``` Source line: `170`. # sigil-node · mail_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/mail_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/mail_durable.md Source declarations, signatures and documentation for mail_durable. Source: `sigil/node/sigil-node/src/mail_durable.rs`. SHA-256: `d3fc8654dda4fed777e4aebb1fab38b3dc7cd285e2a429b449718b9e2fe63ca4`. 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. ## mail\_durable::ArcMailStore [#mail_durablearcmailstore] ```rust pub type ArcMailStore = Arc; ``` Source line: `18`. ## mail\_durable::MailEvent [#mail_durablemailevent] ```rust #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct MailEvent { pub block_height: u64, pub seq: u64, pub topic: String, pub actor_did: String, pub mailbox_id: Option, pub name: Option, pub payload: serde_json::Value } ``` Source line: `83`. ## mail\_durable::MailBatchOp [#mail_durablemailbatchop] ```rust #[derive(Debug, Clone)] pub enum MailBatchOp { PutMailbox(Arc), IndexOwner { owner_did: String, mailbox_id: String, }, IndexWallet { wallet_address: String, mailbox_id: String, }, PutAlias(Arc), PutPolicy(Arc), SetCurrentPolicy { mailbox_id: String, version: u64, }, PutKey(Arc), SetCurrentKey { mailbox_id: String, purpose: String, device_commitment: String, key_id: String, }, PutDelivery(Arc), IndexDeliveryRecipient { mailbox_id: String, height: u64, delivery_id: String, }, IndexDeliverySender { sender_route_id: String, height: u64, delivery_id: String, }, PutEconomics(Arc), PutDelegation(Arc), IndexDelegationMailbox { mailbox_id: String, grant_id: String, }, PutAbuse(Arc), PutSnsName(Arc), IndexSnsOwner { owner_did: String, name_hash: String, }, SetSnsPrimary { subject_did: String, name_hash: String, }, PutSnsRecord(Arc), DeleteSnsRecord { name_hash: String, kind: String, }, PutSnsDelegation(Arc), PutSnsRegistrationCommitment(Arc), PutSnsSealedBid(Arc), PutSnsAuction(Arc), PutNonce { actor_did: String, nonce: String, }, AppendEvent(Arc), } ``` Source line: `94`. ## mail\_durable::MailWriteBatch [#mail_durablemailwritebatch] ```rust #[derive(Debug, Default, Clone)] pub struct MailWriteBatch { pub ops: Vec } ``` Source line: `161`. ## mail\_durable::MailWriteBatch::new [#mail_durablemailwritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `166`. ## mail\_durable::MailWriteBatch::push [#mail_durablemailwritebatchpush] ```rust pub fn push(&mut self, op: MailBatchOp); ``` Source line: `170`. ## mail\_durable::DurableMailStore [#mail_durabledurablemailstore] ```rust pub struct DurableMailStore { } ``` Source line: `198`. ## mail\_durable::DurableMailStore::open [#mail_durabledurablemailstoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `204`. ## mail\_durable::DurableMailStore::get\_mailbox [#mail_durabledurablemailstoreget_mailbox] ```rust pub fn get_mailbox( &self, mailbox_id: &str, ) -> Result, NodeError>; ``` Source line: `258`. ## mail\_durable::DurableMailStore::list\_all\_mailboxes [#mail_durabledurablemailstorelist_all_mailboxes] ```rust pub fn list_all_mailboxes(&self) -> Result, NodeError>; ``` Source line: `267`. ## mail\_durable::DurableMailStore::list\_all\_aliases [#mail_durabledurablemailstorelist_all_aliases] ```rust pub fn list_all_aliases(&self) -> Result, NodeError>; ``` Source line: `276`. ## mail\_durable::DurableMailStore::list\_mailboxes\_by\_owner [#mail_durabledurablemailstorelist_mailboxes_by_owner] ```rust pub fn list_mailboxes_by_owner( &self, subject_did: &str, ) -> Result, NodeError>; ``` Source line: `285`. ## mail\_durable::DurableMailStore::get\_policy [#mail_durabledurablemailstoreget_policy] ```rust pub fn get_policy( &self, mailbox_id: &str, version: Option, ) -> Result, NodeError>; ``` Source line: `302`. ## mail\_durable::DurableMailStore::list\_all\_policies [#mail_durabledurablemailstorelist_all_policies] ```rust pub fn list_all_policies(&self) -> Result, NodeError>; ``` Source line: `328`. ## mail\_durable::DurableMailStore::list\_keys [#mail_durabledurablemailstorelist_keys] ```rust pub fn list_keys( &self, mailbox_id: &str, purpose: Option<&str>, ) -> Result, NodeError>; ``` Source line: `337`. ## mail\_durable::DurableMailStore::list\_all\_keys [#mail_durabledurablemailstorelist_all_keys] ```rust pub fn list_all_keys(&self) -> Result, NodeError>; ``` Source line: `354`. ## mail\_durable::DurableMailStore::get\_key [#mail_durabledurablemailstoreget_key] ```rust pub fn get_key( &self, mailbox_id: &str, key_id: &str, ) -> Result, NodeError>; ``` Source line: `363`. ## mail\_durable::DurableMailStore::get\_delivery [#mail_durabledurablemailstoreget_delivery] ```rust pub fn get_delivery( &self, delivery_id: &str, ) -> Result, NodeError>; ``` Source line: `373`. ## mail\_durable::DurableMailStore::list\_all\_deliveries [#mail_durabledurablemailstorelist_all_deliveries] ```rust pub fn list_all_deliveries(&self) -> Result, NodeError>; ``` Source line: `382`. ## mail\_durable::DurableMailStore::list\_deliveries\_by\_recipient [#mail_durabledurablemailstorelist_deliveries_by_recipient] ```rust pub fn list_deliveries_by_recipient( &self, mailbox_id: &str, ) -> Result, NodeError>; ``` Source line: `391`. ## mail\_durable::DurableMailStore::list\_deliveries\_by\_sender [#mail_durabledurablemailstorelist_deliveries_by_sender] ```rust pub fn list_deliveries_by_sender( &self, sender_route_id: &str, ) -> Result, NodeError>; ``` Source line: `398`. ## mail\_durable::DurableMailStore::get\_economics [#mail_durabledurablemailstoreget_economics] ```rust pub fn get_economics( &self, sender_route_id: &str, recipient_mailbox_id: &str, ) -> Result, NodeError>; ``` Source line: `421`. ## mail\_durable::DurableMailStore::list\_all\_economics [#mail_durabledurablemailstorelist_all_economics] ```rust pub fn list_all_economics(&self) -> Result, NodeError>; ``` Source line: `434`. ## mail\_durable::DurableMailStore::get\_delegation [#mail_durabledurablemailstoreget_delegation] ```rust pub fn get_delegation(&self, grant_id: &str) -> Result, NodeError>; ``` Source line: `443`. ## mail\_durable::DurableMailStore::list\_all\_delegations [#mail_durabledurablemailstorelist_all_delegations] ```rust pub fn list_all_delegations(&self) -> Result, NodeError>; ``` Source line: `449`. ## mail\_durable::DurableMailStore::list\_delegations [#mail_durabledurablemailstorelist_delegations] ```rust pub fn list_delegations( &self, mailbox_id: &str, ) -> Result, NodeError>; ``` Source line: `458`. ## mail\_durable::DurableMailStore::get\_abuse [#mail_durabledurablemailstoreget_abuse] ```rust pub fn get_abuse(&self, abuse_id: &str) -> Result, NodeError>; ``` Source line: `476`. ## mail\_durable::DurableMailStore::list\_all\_abuse [#mail_durabledurablemailstorelist_all_abuse] ```rust pub fn list_all_abuse(&self) -> Result, NodeError>; ``` Source line: `482`. ## mail\_durable::DurableMailStore::has\_nonce [#mail_durabledurablemailstorehas_nonce] ```rust pub fn has_nonce(&self, actor_did: &str, nonce: &str) -> Result; ``` Source line: `491`. ## mail\_durable::DurableMailStore::get\_sns\_name [#mail_durabledurablemailstoreget_sns_name] ```rust pub fn get_sns_name(&self, name_hash: &str) -> Result, NodeError>; ``` Source line: `497`. ## mail\_durable::DurableMailStore::list\_all\_sns\_names [#mail_durabledurablemailstorelist_all_sns_names] ```rust pub fn list_all_sns_names(&self) -> Result, NodeError>; ``` Source line: `503`. ## mail\_durable::DurableMailStore::get\_sns\_records [#mail_durabledurablemailstoreget_sns_records] ```rust pub fn get_sns_records(&self, name_hash: &str) -> Result, NodeError>; ``` Source line: `512`. ## mail\_durable::DurableMailStore::list\_all\_sns\_records [#mail_durabledurablemailstorelist_all_sns_records] ```rust pub fn list_all_sns_records(&self) -> Result, NodeError>; ``` Source line: `522`. ## mail\_durable::DurableMailStore::list\_all\_sns\_delegations [#mail_durabledurablemailstorelist_all_sns_delegations] ```rust pub fn list_all_sns_delegations(&self) -> Result, NodeError>; ``` Source line: `531`. ## mail\_durable::DurableMailStore::get\_sns\_registration\_commitment [#mail_durabledurablemailstoreget_sns_registration_commitment] ```rust pub fn get_sns_registration_commitment( &self, commitment: &str, ) -> Result, NodeError>; ``` Source line: `540`. ## mail\_durable::DurableMailStore::list\_all\_sns\_registration\_commitments [#mail_durabledurablemailstorelist_all_sns_registration_commitments] ```rust pub fn list_all_sns_registration_commitments( &self, ) -> Result, NodeError>; ``` Source line: `549`. ## mail\_durable::DurableMailStore::get\_sns\_sealed\_bid [#mail_durabledurablemailstoreget_sns_sealed_bid] ```rust pub fn get_sns_sealed_bid( &self, commitment: &str, ) -> Result, NodeError>; ``` Source line: `560`. ## mail\_durable::DurableMailStore::list\_all\_sns\_sealed\_bids [#mail_durabledurablemailstorelist_all_sns_sealed_bids] ```rust pub fn list_all_sns_sealed_bids(&self) -> Result, NodeError>; ``` Source line: `569`. ## mail\_durable::DurableMailStore::get\_sns\_auction [#mail_durabledurablemailstoreget_sns_auction] ```rust pub fn get_sns_auction(&self, auction_id: &str) -> Result, NodeError>; ``` Source line: `578`. ## mail\_durable::DurableMailStore::list\_all\_sns\_auctions [#mail_durabledurablemailstorelist_all_sns_auctions] ```rust pub fn list_all_sns_auctions(&self) -> Result, NodeError>; ``` Source line: `584`. ## mail\_durable::DurableMailStore::commit\_batch [#mail_durabledurablemailstorecommit_batch] ```rust pub fn commit_batch(&self, batch: &MailWriteBatch) -> Result<(), NodeError>; ``` Source line: `593`. # sigil-node · mempool URL: https://docs.sigil.ml/reference/rust/sigil-node/mempool Markdown: https://docs.sigil.ml/reference/rust/sigil-node/mempool.md Source declarations, signatures and documentation for mempool. Source: `sigil/node/sigil-node/src/mempool.rs`. SHA-256: `c555aae6b9ab47f89fb78cd0c50fd8afeb0fb78b8eadfaedbf5844f148e0446f`. 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. ## mempool::MAX\_MEMPOOL\_SIZE [#mempoolmax_mempool_size] Maximum number of transactions the mempool will hold. ```rust pub const MAX_MEMPOOL_SIZE: usize; ``` Source line: `13`. ## mempool::DEFAULT\_MAX\_TX\_BYTES [#mempooldefault_max_tx_bytes] Default maximum serialized transaction size: 256 KiB. ```rust pub const DEFAULT_MAX_TX_BYTES: usize; ``` Source line: `15`. ## mempool::DEFAULT\_MAX\_MEMPOOL\_BYTES [#mempooldefault_max_mempool_bytes] Default total serialized mempool memory cap: 256 MiB. ```rust pub const DEFAULT_MAX_MEMPOOL_BYTES: usize; ``` Source line: `17`. ## mempool::DEFAULT\_MIN\_GAS\_PRICE [#mempooldefault_min_gas_price] Default minimum gas price accepted into the mempool. ```rust pub const DEFAULT_MIN_GAS_PRICE: u64; ``` Source line: `19`. ## mempool::DEFAULT\_PER\_SENDER\_TX\_PER\_WINDOW [#mempooldefault_per_sender_tx_per_window] Default per-sender admission rate in a one-second window. ```rust pub const DEFAULT_PER_SENDER_TX_PER_WINDOW: u32; ``` Source line: `21`. ## mempool::DEFAULT\_PER\_SENDER\_IN\_FLIGHT [#mempooldefault_per_sender_in_flight] Default per-sender in-flight transaction cap. ```rust pub const DEFAULT_PER_SENDER_IN_FLIGHT: usize; ``` Source line: `23`. ## mempool::DEFAULT\_RATE\_WINDOW [#mempooldefault_rate_window] Default per-sender rate window. ```rust pub const DEFAULT_RATE_WINDOW: Duration; ``` Source line: `25`. ## mempool::DEFAULT\_LOCAL\_FEE\_MARKET\_HOT\_ACCOUNT\_THRESHOLD [#mempooldefault_local_fee_market_hot_account_threshold] Default local fee-market contention threshold per write-locked key. ```rust pub const DEFAULT_LOCAL_FEE_MARKET_HOT_ACCOUNT_THRESHOLD: usize; ``` Source line: `27`. ## mempool::DEFAULT\_LOCAL\_FEE\_MARKET\_STEP [#mempooldefault_local_fee_market_step] Default local fee-market gas-price increment per threshold step. ```rust pub const DEFAULT_LOCAL_FEE_MARKET_STEP: u64; ``` Source line: `29`. ## mempool::MempoolConfig [#mempoolmempoolconfig] ```rust #[derive(Debug, Clone)] pub struct MempoolConfig { /// Chain ID the mempool accepts. `None` is only for legacy tests/tools. pub expected_chain_id: Option, /// Maximum transaction count. pub max_transactions: usize, /// Maximum serialized transaction size. pub max_tx_bytes: usize, /// Minimum accepted gas price. pub min_gas_price: u64, /// Optional maximum gas limit for a single transaction. pub max_tx_gas: Option, /// Per-sender accepted transaction count per `sender_rate_window`. pub per_sender_tx_per_window: u32, /// Per-sender in-flight transaction cap. pub per_sender_in_flight: usize, /// Total serialized transaction memory cap. pub max_memory_bytes: usize, /// Per-sender admission rate window. pub sender_rate_window: Duration, /// Enable per-write-key local fee floors. pub local_fee_markets_enabled: bool, /// Number of in-flight txs touching the same local fee key before the /// account-local floor increases by one step. pub local_fee_market_hot_account_threshold: usize, /// Gas-price increment per local fee-market threshold step. pub local_fee_market_step: u64, /// Stake-weighted sender quota policy for validator/RPC ingress. pub stake_weighted_ingress: StakeWeightedIngressConfig } ``` Source line: `41`. ## mempool::MempoolConfig::for\_chain\_with\_block\_time [#mempoolmempoolconfigfor_chain_with_block_time] Create a chain-bound mempool config whose sender admission window tracks the configured block cadence. This keeps the default sender allowance at 64 tx/sec while making accounting align with proposer drain cadence on 1.0s/1.5s launch networks. ```rust pub fn for_chain_with_block_time( chain_id: impl Into, target_block_time_ms: u64, ) -> Self; ``` Source line: `96`. ## mempool::Mempool [#mempoolmempool] In-memory transaction pool with fee-ordered draining. ```rust pub struct Mempool { } ``` Source line: `154`. ## mempool::Mempool::new [#mempoolmempoolnew] Create a new empty mempool. ```rust pub fn new() -> Self; ``` Source line: `182`. ## mempool::Mempool::for\_chain [#mempoolmempoolfor_chain] Create a new mempool bound to a specific chain ID. ```rust pub fn for_chain(chain_id: impl Into) -> Self; ``` Source line: `187`. ## mempool::Mempool::for\_chain\_with\_block\_time [#mempoolmempoolfor_chain_with_block_time] Create a chain-bound mempool whose sender admission window matches the configured block time. ```rust pub fn for_chain_with_block_time( chain_id: impl Into, target_block_time_ms: u64, ) -> Self; ``` Source line: `197`. ## mempool::Mempool::with\_config [#mempoolmempoolwith_config] Create a new mempool with explicit admission limits. ```rust pub fn with_config(config: MempoolConfig) -> Self; ``` Source line: `208`. ## mempool::Mempool::insert [#mempoolmempoolinsert] Insert a transaction into the mempool. Returns an error if the mempool is full or the transaction is a duplicate. Note: `tx_hash()` returns `Result` after Task 3 changes. ```rust pub fn insert(&mut self, tx: SignedTransaction) -> Result<(), NodeError>; ``` Source line: `229`. ## mempool::Mempool::insert\_with\_sender\_stake [#mempoolmempoolinsert_with_sender_stake] Insert a transaction with the sender's effective validator stake. Validator RPC ingress calls this so staked senders receive deterministic quota priority under flood. Plain `insert` remains available for tests and transports that have not supplied stake metadata yet. ```rust pub fn insert_with_sender_stake( &mut self, tx: SignedTransaction, sender_effective_stake: u64, ) -> Result<(), NodeError>; ``` Source line: `238`. ## mempool::Mempool::requeue\_transactions [#mempoolmempoolrequeue_transactions] Requeue transactions that were already admitted and drained for a local proposal that did not finalize. Requeue still enforces chain ID, size, gas-price, signature, nonce, and memory limits, but it does not count against the fresh-submission rate window because these transactions already paid that admission cost. Duplicate hashes are skipped because another path may already have restored the same transaction. ```rust pub fn requeue_transactions(&mut self, txs: I) -> Result where I: IntoIterator,; ``` Source line: `255`. ## mempool::Mempool::remove [#mempoolmempoolremove] Remove a transaction by hash. ```rust pub fn remove(&mut self, hash: &SigilHash); ``` Source line: `405`. ## mempool::Mempool::drain\_for\_block [#mempoolmempooldrain_for_block] Drain transactions for block production. Selection preserves per-sender nonce order by only considering each sender's next nonce as a candidate. Across candidate senders it chooses higher fee first, with transaction hash as the deterministic tie-break. Returns up to `max_gas` worth of transactions. ```rust pub fn drain_for_block(&mut self, max_gas: u64) -> Vec; ``` Source line: `523`. ## mempool::Mempool::len [#mempoolmempoollen] Returns the number of transactions in the mempool. ```rust pub fn len(&self) -> usize; ``` Source line: `625`. ## mempool::Mempool::current\_bytes [#mempoolmempoolcurrent_bytes] Returns approximate serialized transaction bytes currently held. ```rust pub fn current_bytes(&self) -> usize; ``` Source line: `630`. ## mempool::Mempool::is\_empty [#mempoolmempoolis_empty] Returns true if the mempool is empty. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `635`. ## mempool::Mempool::contains [#mempoolmempoolcontains] Returns true if the mempool contains a transaction with the given hash. ```rust pub fn contains(&self, hash: &SigilHash) -> bool; ``` Source line: `640`. ## mempool::Mempool::local\_fee\_floor [#mempoolmempoollocal_fee_floor] Current account-local admission floor for a write-locked key. ```rust pub fn local_fee_floor(&self, account: &str) -> u64; ``` Source line: `645`. ## mempool::Mempool::get [#mempoolmempoolget] Returns the transaction with the given hash, if present. ```rust pub fn get(&self, hash: &SigilHash) -> Option<&SignedTransaction>; ``` Source line: `653`. # sigil-node · metrics URL: https://docs.sigil.ml/reference/rust/sigil-node/metrics Markdown: https://docs.sigil.ml/reference/rust/sigil-node/metrics.md Source declarations, signatures and documentation for metrics. Source: `sigil/node/sigil-node/src/metrics.rs`. SHA-256: `bcf1a6b4ba89d75b14520d279d1b3ead20f924a29619219019381e0f2d9e1e8d`. 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. ## metrics::REGISTRY [#metricsregistry] Global metrics registry. Cloned cheaply via `Arc` semantics inside `prometheus::Registry`; one process-wide instance is sufficient. ```rust pub static REGISTRY: Lazy; ``` Source line: `43`. ## metrics::CURRENT\_HEIGHT [#metricscurrent_height] Local block height as observed by this node's persistent block store. ```rust pub static CURRENT_HEIGHT: Lazy; ``` Source line: `50`. ## metrics::HIGHEST\_KNOWN\_HEIGHT [#metricshighest_known_height] Highest peer-reported height observed via libp2p block-sync. Until Agent 05 D5 wires the peer-height path, this gauge mirrors `CURRENT_HEIGHT` and `peer_height_available` is exposed separately in `sigil_getSyncStatus` so consumers can detect the limitation. ```rust pub static HIGHEST_KNOWN_HEIGHT: Lazy; ``` Source line: `67`. ## metrics::SYNC\_STATE [#metricssync_state] Sync state as a one-hot gauge by `state` label. Exactly one of `synced|syncing|halted` is `1` at any moment; the others are `0`. Alertmanager rules key on `synced{state="halted"}`. ```rust pub static SYNC_STATE: Lazy; ``` Source line: `84`. ## metrics::LAST\_BLOCK\_TIME\_SECS [#metricslast_block_time_secs] Unix timestamp (seconds) of the most recent finalized block. Set by `record_block_finalized`. The `/health` probe compares `now() - LAST_BLOCK_TIME_SECS` against `5 × TARGET_BLOCK_TIME_SECS` to decide whether the node is healthy. `0` means no block has been finalized yet (or the engine has not booted). ```rust pub static LAST_BLOCK_TIME_SECS: Lazy; ``` Source line: `106`. ## metrics::TARGET\_BLOCK\_TIME\_SECS [#metricstarget_block_time_secs] Configured target block time, in seconds, from genesis. Set once at node startup from `genesis.params.target_block_time_seconds()`. Read by `/health` to compute the staleness tolerance window. ```rust pub static TARGET_BLOCK_TIME_SECS: Lazy; ``` Source line: `122`. ## metrics::BLOCK\_PRODUCTION\_DURATION\_SECONDS [#metricsblock_production_duration_seconds] Observed interval, in seconds, between the two most recent block timestamp updates seen by this process. Validators update this on finalized blocks; RPC pods update it on imported blocks. It is intentionally process-local because the alert answers "is this pod seeing blocks at the expected cadence?". ```rust pub static BLOCK_PRODUCTION_DURATION_SECONDS: Lazy; ``` Source line: `140`. ## metrics::BLOCKS\_FINALIZED\_TOTAL [#metricsblocks_finalized_total] Total finalized blocks since process start. ```rust pub static BLOCKS_FINALIZED_TOTAL: Lazy; ``` Source line: `153`. ## metrics::BLOCKS\_IMPORTED\_TOTAL [#metricsblocks_imported_total] Total blocks imported from peers via the RPC archive-sync loop. Distinct from `BLOCKS_FINALIZED_TOTAL` (which the engine increments on locally-produced blocks) because RPC pods do not finalize — they import. Operators correlate this against `BLOCKS_FINALIZED_TOTAL` on validators to spot sync drift. ```rust pub static BLOCKS_IMPORTED_TOTAL: Lazy; ``` Source line: `171`. ## metrics::PEER\_COUNT [#metricspeer_count] Number of peers the sync task observed responding successfully on the most recent tick. Zero means we are running blind. ```rust pub static PEER_COUNT: Lazy; ``` Source line: `185`. ## metrics::PEER\_HEIGHT\_AVAILABLE [#metricspeer_height_available] `1` once the sync task has observed at least one peer-reported height; `0` otherwise. Surfaced in `sigil_getSyncStatus` as `peer_height_available` so callers can detect the limitation without parsing free-form text. ```rust pub static PEER_HEIGHT_AVAILABLE: Lazy; ``` Source line: `201`. ## metrics::record\_block\_finalized [#metricsrecord_block_finalized] Update height gauges and the last-block timestamp. Called once per finalized block from `engine::persist_and_advance`. `now_secs` is the unix timestamp at which the block was committed; passing it explicitly makes the operation deterministic for tests (callers in production use `SystemTime::now`). ```rust pub fn record_block_finalized(height: u64, now_secs: u64); ``` Source line: `219`. ## metrics::record\_block\_imported [#metricsrecord_block_imported] Update height gauges + counters when an RPC pod imports a block from a peer via the archive-sync loop. Distinct from `record_block_finalized` because the RPC sync path does NOT re-execute transactions; the executor's `ExecutionState` stays at genesis (this is a known Phase 1 limitation, documented in `rpc_sync.rs`). The sync task itself owns the `SYNC_STATE` label — this helper does not flip it because catching up is a process, not an event. ```rust pub fn record_block_imported(height: u64, now_secs: u64); ``` Source line: `238`. ## metrics::init\_target\_block\_time [#metricsinit_target_block_time] Set the configured target block time at startup. ```rust pub fn init_target_block_time(secs: f64); ``` Source line: `257`. ## metrics::block\_production\_staleness [#metricsblock_production_staleness] Snapshot of the staleness probe used by `/health`. Returns `(stale, last_block_age_secs, target_block_time_seconds)`. `stale` is `true` if no block has been finalized in the last `5 × target_block_time_seconds`. The 5-block window matches `SYNC_TOLERANCE_BLOCKS_DEFAULT` so `/health` and `sigil_getSyncStatus` agree on what "behind" means. ```rust pub fn block_production_staleness(now_secs: u64) -> (bool, i64, f64); ``` Source line: `268`. ## metrics::block\_production\_staleness\_with\_fallback [#metricsblock_production_staleness_with_fallback] Snapshot of the staleness probe with a persisted latest block timestamp fallback. Process-local gauges start empty after restart. When a node restarts with a non-empty block store but has not finalized a fresh block yet, callers can pass the persisted tip timestamp so `/health` still reports a stale chain. ```rust pub fn block_production_staleness_with_fallback( now_secs: u64, persisted_latest_block_time_secs: Option, ) -> (bool, i64, f64); ``` Source line: `277`. ## metrics::MEMPOOL\_SIZE [#metricsmempool_size] Number of transactions currently held in the mempool. ```rust pub static MEMPOOL_SIZE: Lazy; ``` Source line: `299`. ## metrics::MEMPOOL\_ADMIT\_TOTAL [#metricsmempool_admit_total] Mempool admission outcomes by reason. `result` is enum-bounded by `MempoolAdmitResult`. ```rust pub static MEMPOOL_ADMIT_TOTAL: Lazy; ``` Source line: `314`. ## metrics::MempoolAdmitResult [#metricsmempooladmitresult] Bounded set of mempool-admit results emitted by `handle_send_transaction`. Adding a variant requires updating the cardinality budget in `docs/launch/agent-05/DESIGN.md` §2.1. ```rust #[derive(Debug, Clone, Copy)] pub enum MempoolAdmitResult { Ok, RejectChainId, RejectSignature, RejectMalformed, RejectFull, } ``` Source line: `334`. ## metrics::MempoolAdmitResult::label [#metricsmempooladmitresultlabel] ```rust pub fn label(self) -> &'static str; ``` Source line: `343`. ## metrics::record\_mempool\_admit [#metricsrecord_mempool_admit] ```rust pub fn record_mempool_admit(result: MempoolAdmitResult); ``` Source line: `354`. ## metrics::RPC\_REQUEST\_TOTAL [#metricsrpc_request_total] Total RPC requests by canonical method name and outcome. `method` is bounded by the canonical method table in `sigil-rpc::RpcMethod`. `result` is `ok|error|method_not_found`. ```rust pub static RPC_REQUEST_TOTAL: Lazy; ``` Source line: `368`. ## metrics::RPC\_REQUEST\_DURATION [#metricsrpc_request_duration] RPC request latency histogram by canonical method name. ```rust pub static RPC_REQUEST_DURATION: Lazy; ``` Source line: `384`. ## metrics::RPC\_REQUEST\_ERRORS\_TOTAL [#metricsrpc_request_errors_total] Total RPC requests that returned an error response. This single-series counter backs coarse production alerting. Method- level breakdown remains available via `sigil_rpc_request_total`. ```rust pub static RPC_REQUEST_ERRORS_TOTAL: Lazy; ``` Source line: `406`. ## metrics::RPC\_RATE\_LIMITED\_TOTAL [#metricsrpc_rate_limited_total] RPC requests rejected by the rate limiter (HTTP 429). Wired by D4 hardening; exposed here so dashboards work the moment the middleware lands. Until then this counter stays at 0. ```rust pub static RPC_RATE_LIMITED_TOTAL: Lazy; ``` Source line: `422`. ## metrics::record\_rpc [#metricsrecord_rpc] Record an RPC request outcome and elapsed duration. `method` should be the *canonical* method name. Aliases must be normalized at the dispatch boundary so cardinality stays bounded. ```rust pub fn record_rpc(method: &str, ok: bool, elapsed_secs: f64); ``` Source line: `441`. ## metrics::CONSENSUS\_PROPOSAL\_REJECT\_TOTAL [#metricsconsensus_proposal_reject_total] Consensus proposals rejected before this validator signs a prevote. `reason` must be an enum-shaped label from Agent 01's `RejectedReason`; never pass DIDs, hashes, or free-form error strings. ```rust pub static CONSENSUS_PROPOSAL_REJECT_TOTAL: Lazy; ``` Source line: `460`. ## metrics::record\_consensus\_proposal\_reject [#metricsrecord_consensus_proposal_reject] ```rust pub fn record_consensus_proposal_reject(reason: &'static str); ``` Source line: `475`. ## metrics::CROSS\_ZONE\_DELIVERY\_TOTAL [#metricscross_zone_delivery_total] Cross-zone delivery outcomes by bounded result label. ```rust pub static CROSS_ZONE_DELIVERY_TOTAL: Lazy; ``` Source line: `486`. ## metrics::CrossZoneDeliveryResult [#metricscrosszonedeliveryresult] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CrossZoneDeliveryResult { Delivered, Failed, InvalidPayload, SkippedInactiveZone, } ``` Source line: `502`. ## metrics::CrossZoneDeliveryResult::label [#metricscrosszonedeliveryresultlabel] ```rust pub fn label(self) -> &'static str; ``` Source line: `510`. ## metrics::record\_cross\_zone\_delivery [#metricsrecord_cross_zone_delivery] ```rust pub fn record_cross_zone_delivery(result: CrossZoneDeliveryResult); ``` Source line: `520`. ## metrics::BUILD\_INFO [#metricsbuild_info] Static gauge always set to 1, with build identity in labels. `version`, `commit`, `build_time` are bounded — there is exactly one combination per binary. ```rust pub static BUILD_INFO: Lazy; ``` Source line: `534`. ## metrics::init\_build\_info [#metricsinit_build_info] Mark the build info gauge with this binary's version and commit. Call once at startup. Idempotent if called multiple times. ```rust pub fn init_build_info(version: &str, commit: &str, build_time: &str); ``` Source line: `551`. ## metrics::set\_sync\_state [#metricsset_sync_state] Set the one-hot sync-state gauge. Sets the named state to 1 and the other two to 0 atomically (well — as atomically as three sequential `set` calls can be; transient double-zero windows during a state flip are acceptable for monitoring). ```rust pub fn set_sync_state(state: SyncStateLabel); ``` Source line: `574`. ## metrics::SyncStateLabel [#metricssyncstatelabel] Bounded sync-state labels. `Halted` is reserved for the case where block production has not advanced for `> halt_threshold * target_block_time_seconds`; wiring is owned by Agent 01's halt detector. Until then nodes flip between `Synced` and `Syncing` only. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum SyncStateLabel { Synced, Syncing, Halted, } ``` Source line: `589`. ## metrics::SyncStateLabel::ALL [#metricssyncstatelabelall] ```rust pub const ALL: &'static [Self]; ``` Source line: `596`. ## metrics::SyncStateLabel::as\_str [#metricssyncstatelabelas_str] ```rust pub fn as_str(self) -> &'static str; ``` Source line: `598`. ## metrics::render [#metricsrender] Render the registry to Prometheus text format. Returns the rendered body and the canonical content-type header. Errors stringify any encoder failure rather than panic so a metrics scrape never crashes the node. ```rust pub fn render() -> Result<(String, &'static str), String>; ``` Source line: `616`. # sigil-node · nft_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/nft_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/nft_durable.md Source declarations, signatures and documentation for nft_durable. Source: `sigil/node/sigil-node/src/nft_durable.rs`. SHA-256: `47bdcd44a82496345acb259a2987af4f4d3ec60f4f21cb2fd987292750993d22`. 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. ## nft\_durable::DurableNftStore [#nft_durabledurablenftstore] Durable NFT state store backed by AkashaKV. All public methods are synchronous — they bridge into the async AkashaKV API via a dedicated tokio runtime. `block_on` uses a spawn+channel so it works whether or not the caller is inside another tokio runtime. ```rust pub struct DurableNftStore { } ``` Source line: `209`. ## nft\_durable::DurableNftStore::open [#nft_durabledurablenftstoreopen] Open (or create) the NFT durable store at `path`. The directory becomes the AkashaKV data root for all NFT records. Multiple `DurableNftStore` instances must NOT share the same path concurrently. ```rust pub fn open(path: &Path) -> Result; ``` Source line: `220`. ## nft\_durable::DurableNftStore::put\_collection [#nft_durabledurablenftstoreput_collection] Write (insert or replace) a collection record. ```rust pub fn put_collection(&self, collection: &NftCollection) -> Result<(), NodeError>; ``` Source line: `300`. ## nft\_durable::DurableNftStore::get\_collection [#nft_durabledurablenftstoreget_collection] Fetch a collection by id, or `None` if not found. ```rust pub fn get_collection( &self, collection_id: &CollectionId, ) -> Result, NodeError>; ``` Source line: `307`. ## nft\_durable::DurableNftStore::put\_token [#nft_durabledurablenftstoreput_token] Write (insert or replace) a token record. ```rust pub fn put_token(&self, token: &NftToken) -> Result<(), NodeError>; ``` Source line: `321`. ## nft\_durable::DurableNftStore::get\_token [#nft_durabledurablenftstoreget_token] Fetch a single token, or `None` if not found. ```rust pub fn get_token( &self, collection_id: &CollectionId, token_id: TokenId, ) -> Result, NodeError>; ``` Source line: `328`. ## nft\_durable::DurableNftStore::delete\_token [#nft_durabledurablenftstoredelete_token] Delete a token record. No-op if the token does not exist. ```rust pub fn delete_token( &self, collection_id: &CollectionId, token_id: TokenId, ) -> Result<(), NodeError>; ``` Source line: `341`. ## nft\_durable::DurableNftStore::put\_owner\_index [#nft_durabledurablenftstoreput_owner_index] Write (insert or replace) an owner-index entry. ```rust pub fn put_owner_index(&self, entry: &OwnerIndexEntry) -> Result<(), NodeError>; ``` Source line: `353`. ## nft\_durable::DurableNftStore::get\_owner\_index [#nft_durabledurablenftstoreget_owner_index] Fetch the owner-index entry for `(owner_did, collection_id)`, or `None`. ```rust pub fn get_owner_index( &self, owner_did: &str, collection_id: &CollectionId, ) -> Result, NodeError>; ``` Source line: `360`. ## nft\_durable::DurableNftStore::delete\_owner\_index [#nft_durabledurablenftstoredelete_owner_index] Delete the owner-index entry for `(owner_did, collection_id)`. ```rust pub fn delete_owner_index( &self, owner_did: &str, collection_id: &CollectionId, ) -> Result<(), NodeError>; ``` Source line: `373`. ## nft\_durable::DurableNftStore::list\_owner\_index [#nft_durabledurablenftstorelist_owner_index] List all owner-index entries for `owner_did`, with optional pagination. `limit = 0` returns all entries. Results are key-sorted (lexicographic by collection\_id) because AkashaKV returns keys in sorted order. ```rust pub fn list_owner_index( &self, owner_did: &str, limit: usize, offset: usize, ) -> Result, NodeError>; ``` Source line: `386`. ## nft\_durable::DurableNftStore::put\_did\_identity [#nft_durabledurablenftstoreput_did_identity] Write (insert or replace) a DID-identity index record. ```rust pub fn put_did_identity(&self, index: &DidIdentityIndex) -> Result<(), NodeError>; ``` Source line: `410`. ## nft\_durable::DurableNftStore::get\_did\_identity [#nft_durabledurablenftstoreget_did_identity] Fetch the DID-identity index for `subject_did`, or `None`. ```rust pub fn get_did_identity( &self, subject_did: &str, ) -> Result, NodeError>; ``` Source line: `417`. ## nft\_durable::DurableNftStore::delete\_did\_identity [#nft_durabledurablenftstoredelete_did_identity] Delete the DID-identity index for `subject_did`. ```rust pub fn delete_did_identity(&self, subject_did: &str) -> Result<(), NodeError>; ``` Source line: `429`. ## nft\_durable::DurableNftStore::append\_event [#nft_durabledurablenftstoreappend_event] Append an NFT lifecycle event. The key is derived from `block_height`, `token_id`, and `tx_hash`, so repeated appends for the same event are idempotent (last-write-wins on an identical key). Returns the number of events already present before this write as a monotonic sequence number approximation. ```rust pub fn append_event(&self, event: &NftEvent) -> Result; ``` Source line: `442`. ## nft\_durable::DurableNftStore::list\_events [#nft_durabledurablenftstorelist_events] List events, optionally filtered by `collection_id`. Results are in block-height order because the key encodes `block_height` as BE. ```rust pub fn list_events( &self, collection_id: Option<&CollectionId>, ) -> Result, NodeError>; ``` Source line: `458`. ## nft\_durable::DurableNftStore::flush [#nft_durabledurablenftstoreflush] Force a flush of AkashaKV memtables to SSTables. Useful in tests that drop and reopen the store at the same path to verify durability without waiting for the background flush interval. ```rust pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `479`. ## nft\_durable::DurableNftStore::close [#nft_durabledurablenftstoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `486`. ## nft\_durable::DurableNftStore::commit\_batch [#nft_durabledurablenftstorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails (encoding error or storage error), the transaction is dropped (auto-aborted via `Drop`) before it can be committed, leaving zero partial state visible. Either every operation in the batch lands or none of them do. ```rust pub fn commit_batch(&self, batch: &NftWriteBatch) -> Result<(), NodeError>; ``` Source line: `501`. ## nft\_durable::DurableNftStore::get\_account\_nonce [#nft_durabledurablenftstoreget_account_nonce] Read the durable per-account nonce written by `commit_batch`. Returns `None` for accounts that have never executed an NFT transaction; the caller is expected to fall back to other nonce sources (e.g. the `compute_durable` mirror used by Transfer txs) or to 0 for fresh accounts. Round-6 P0-I1 read path. ```rust pub fn get_account_nonce(&self, sender_did: &str) -> Result, NodeError>; ``` Source line: `606`. ## nft\_durable::ArcNftStore [#nft_durablearcnftstore] Reference-counted handle to a \[`DurableNftStore`]. ```rust pub type ArcNftStore = Arc; ``` Source line: `628`. ## nft\_durable::NftBatchOp [#nft_durablenftbatchop] An individual operation inside a \[`NftWriteBatch`]. Cloning is cheap because the inner domain types (`NftCollection`, `NftToken`, etc.) already derive `Clone`. ```rust #[derive(Clone)] pub enum NftBatchOp { PutCollection(NftCollection), PutToken(NftToken), DeleteToken(CollectionId, TokenId), PutOwnerIndex(OwnerIndexEntry), RemoveOwnerIndex { collection_id: CollectionId, owner_did: String, token_id: TokenId, }, PutDidIdentity(DidIdentityIndex), RemoveDidIdentity { subject_did: String, collection_id: CollectionId, token_id: TokenId, }, AppendEvent(NftEvent), } ``` Source line: `639`. ## nft\_durable::NftWriteBatch [#nft_durablenftwritebatch] A write batch that accumulates all mutations for a single NFT executor handler. Commit the batch via \[`ExecutionState::commit_nft_tx`] at the end of the handler to apply all mutations atomically. ```rust #[derive(Default)] pub struct NftWriteBatch { } ``` Source line: `663`. ## nft\_durable::NftWriteBatch::new [#nft_durablenftwritebatchnew] Create an empty write batch. ```rust pub fn new() -> Self; ``` Source line: `676`. ## nft\_durable::NftWriteBatch::put\_account\_nonce [#nft_durablenftwritebatchput_account_nonce] Fold an atomic nonce update into the batch. The given `(sender_did, new_nonce)` is committed inside the same AkashaKV transaction as the NFT ops, so on success both land together; on failure neither lands. Round-6 P0-I1: prevents the post-execution `put_nonce` race where state could commit while the nonce write was lost to a crash. ```rust pub fn put_account_nonce(&mut self, sender_did: impl Into, new_nonce: u64); ``` Source line: `688`. ## nft\_durable::NftWriteBatch::put\_collection [#nft_durablenftwritebatchput_collection] ```rust pub fn put_collection(&mut self, col: NftCollection); ``` Source line: `692`. ## nft\_durable::NftWriteBatch::put\_token [#nft_durablenftwritebatchput_token] ```rust pub fn put_token(&mut self, tok: NftToken); ``` Source line: `696`. ## nft\_durable::NftWriteBatch::delete\_token [#nft_durablenftwritebatchdelete_token] ```rust pub fn delete_token(&mut self, collection_id: CollectionId, token_id: TokenId); ``` Source line: `700`. ## nft\_durable::NftWriteBatch::put\_owner\_index [#nft_durablenftwritebatchput_owner_index] ```rust pub fn put_owner_index(&mut self, entry: OwnerIndexEntry); ``` Source line: `705`. ## nft\_durable::NftWriteBatch::remove\_owner\_index [#nft_durablenftwritebatchremove_owner_index] ```rust pub fn remove_owner_index( &mut self, collection_id: CollectionId, owner_did: String, token_id: TokenId, ); ``` Source line: `709`. ## nft\_durable::NftWriteBatch::put\_did\_identity [#nft_durablenftwritebatchput_did_identity] ```rust pub fn put_did_identity(&mut self, idx: DidIdentityIndex); ``` Source line: `722`. ## nft\_durable::NftWriteBatch::remove\_did\_identity [#nft_durablenftwritebatchremove_did_identity] ```rust pub fn remove_did_identity( &mut self, subject_did: String, collection_id: CollectionId, token_id: TokenId, ); ``` Source line: `726`. ## nft\_durable::NftWriteBatch::append\_event [#nft_durablenftwritebatchappend_event] ```rust pub fn append_event(&mut self, evt: NftEvent); ``` Source line: `739`. ## nft\_durable::NftWriteBatch::len [#nft_durablenftwritebatchlen] Number of operations queued in this batch. ```rust pub fn len(&self) -> usize; ``` Source line: `744`. ## nft\_durable::NftWriteBatch::is\_empty [#nft_durablenftwritebatchis_empty] Returns `true` if no operations have been queued. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `749`. ## nft\_durable::NftWriteBatch::into\_ops [#nft_durablenftwritebatchinto_ops] Consume the batch and return the inner op list. Used by the in-memory `MemoryExecutionState::commit_nft_tx` path to iterate over ops without an extra clone. ```rust pub fn into_ops(self) -> Vec; ``` Source line: `757`. # sigil-node · nova_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/nova_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/nova_durable.md Source declarations, signatures and documentation for nova_durable. Source: `sigil/node/sigil-node/src/nova_durable.rs`. SHA-256: `e5ff087a5b96cee60eac839afc139e34b8153dd275217bda8c38d13b15c1b87f`. 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. ## nova\_durable::DurableNovaStore [#nova_durabledurablenovastore] ```rust pub struct DurableNovaStore { } ``` Source line: `115`. ## nova\_durable::DurableNovaStore::open [#nova_durabledurablenovastoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `121`. ## nova\_durable::DurableNovaStore::get\_world [#nova_durabledurablenovastoreget_world] ```rust pub fn get_world(&self, world_id: &str) -> Result, NodeError>; ``` Source line: `193`. ## nova\_durable::DurableNovaStore::put\_world [#nova_durabledurablenovastoreput_world] ```rust pub fn put_world(&self, world: &NovaWorldConfig) -> Result<(), NodeError>; ``` Source line: `200`. ## nova\_durable::DurableNovaStore::list\_worlds [#nova_durabledurablenovastorelist_worlds] ```rust pub fn list_worlds(&self) -> Result, NodeError>; ``` Source line: `204`. ## nova\_durable::DurableNovaStore::get\_parcel [#nova_durabledurablenovastoreget_parcel] ```rust pub fn get_parcel(&self, parcel_id: &str) -> Result, NodeError>; ``` Source line: `213`. ## nova\_durable::DurableNovaStore::put\_parcel [#nova_durabledurablenovastoreput_parcel] ```rust pub fn put_parcel(&self, parcel: &NovaParcelRecord) -> Result<(), NodeError>; ``` Source line: `220`. ## nova\_durable::DurableNovaStore::list\_parcels\_in\_region [#nova_durabledurablenovastorelist_parcels_in_region] ```rust pub fn list_parcels_in_region( &self, world_id: &str, region_x: i32, region_z: i32, ) -> Result, NodeError>; ``` Source line: `226`. ## nova\_durable::DurableNovaStore::list\_parcels [#nova_durabledurablenovastorelist_parcels] ```rust pub fn list_parcels(&self) -> Result, NodeError>; ``` Source line: `246`. ## nova\_durable::DurableNovaStore::get\_building [#nova_durabledurablenovastoreget_building] ```rust pub fn get_building(&self, building_id: &str) -> Result, NodeError>; ``` Source line: `255`. ## nova\_durable::DurableNovaStore::put\_building [#nova_durabledurablenovastoreput_building] ```rust pub fn put_building(&self, building: &NovaBuildingRecord) -> Result<(), NodeError>; ``` Source line: `262`. ## nova\_durable::DurableNovaStore::delete\_building [#nova_durabledurablenovastoredelete_building] ```rust pub fn delete_building(&self, building_id: &str) -> Result<(), NodeError>; ``` Source line: `266`. ## nova\_durable::DurableNovaStore::list\_buildings [#nova_durabledurablenovastorelist_buildings] ```rust pub fn list_buildings(&self) -> Result, NodeError>; ``` Source line: `270`. ## nova\_durable::DurableNovaStore::get\_avatar [#nova_durabledurablenovastoreget_avatar] ```rust pub fn get_avatar(&self, avatar_id: &str) -> Result, NodeError>; ``` Source line: `279`. ## nova\_durable::DurableNovaStore::put\_avatar [#nova_durabledurablenovastoreput_avatar] ```rust pub fn put_avatar(&self, avatar: &NovaAvatarRecord) -> Result<(), NodeError>; ``` Source line: `286`. ## nova\_durable::DurableNovaStore::list\_avatars [#nova_durabledurablenovastorelist_avatars] ```rust pub fn list_avatars(&self) -> Result, NodeError>; ``` Source line: `290`. ## nova\_durable::DurableNovaStore::get\_auction [#nova_durabledurablenovastoreget_auction] ```rust pub fn get_auction(&self, auction_id: &str) -> Result, NodeError>; ``` Source line: `299`. ## nova\_durable::DurableNovaStore::put\_auction [#nova_durabledurablenovastoreput_auction] ```rust pub fn put_auction(&self, auction: &NovaAuctionRecord) -> Result<(), NodeError>; ``` Source line: `306`. ## nova\_durable::DurableNovaStore::list\_auctions [#nova_durabledurablenovastorelist_auctions] ```rust pub fn list_auctions(&self) -> Result, NodeError>; ``` Source line: `310`. ## nova\_durable::DurableNovaStore::commit\_batch [#nova_durabledurablenovastorecommit_batch] ```rust pub fn commit_batch(&self, batch: &NovaWriteBatch) -> Result<(), NodeError>; ``` Source line: `319`. ## nova\_durable::ArcNovaStore [#nova_durablearcnovastore] ```rust pub type ArcNovaStore = Arc; ``` Source line: `365`. ## nova\_durable::NovaBatchOp [#nova_durablenovabatchop] ```rust #[derive(Clone)] pub enum NovaBatchOp { PutWorld(NovaWorldConfig), PutParcel(NovaParcelRecord), PutBuilding(NovaBuildingRecord), DeleteBuilding(String), PutAvatar(NovaAvatarRecord), PutAuction(NovaAuctionRecord), } ``` Source line: `368`. ## nova\_durable::NovaWriteBatch [#nova_durablenovawritebatch] ```rust #[derive(Default)] pub struct NovaWriteBatch { } ``` Source line: `378`. ## nova\_durable::NovaWriteBatch::new [#nova_durablenovawritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `383`. ## nova\_durable::NovaWriteBatch::put\_world [#nova_durablenovawritebatchput_world] ```rust pub fn put_world(&mut self, world: NovaWorldConfig); ``` Source line: `387`. ## nova\_durable::NovaWriteBatch::put\_parcel [#nova_durablenovawritebatchput_parcel] ```rust pub fn put_parcel(&mut self, parcel: NovaParcelRecord); ``` Source line: `391`. ## nova\_durable::NovaWriteBatch::put\_building [#nova_durablenovawritebatchput_building] ```rust pub fn put_building(&mut self, building: NovaBuildingRecord); ``` Source line: `395`. ## nova\_durable::NovaWriteBatch::delete\_building [#nova_durablenovawritebatchdelete_building] ```rust pub fn delete_building(&mut self, building_id: impl Into); ``` Source line: `399`. ## nova\_durable::NovaWriteBatch::put\_avatar [#nova_durablenovawritebatchput_avatar] ```rust pub fn put_avatar(&mut self, avatar: NovaAvatarRecord); ``` Source line: `404`. ## nova\_durable::NovaWriteBatch::put\_auction [#nova_durablenovawritebatchput_auction] ```rust pub fn put_auction(&mut self, auction: NovaAuctionRecord); ``` Source line: `408`. # sigil-node · recovery_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/recovery_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/recovery_durable.md Source declarations, signatures and documentation for recovery_durable. Source: `sigil/node/sigil-node/src/recovery_durable.rs`. SHA-256: `96b5b247a098db1812015948d221104a00453bc9d53884ea28209a078f96af0e`. 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. ## recovery\_durable::DurableRecoveryStore [#recovery_durabledurablerecoverystore] ```rust pub struct DurableRecoveryStore { } ``` Source line: `116`. ## recovery\_durable::DurableRecoveryStore::open [#recovery_durabledurablerecoverystoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `122`. ## recovery\_durable::DurableRecoveryStore::get\_config [#recovery_durabledurablerecoverystoreget_config] ```rust pub fn get_config(&self, subject_did: &str) -> Result, NodeError>; ``` Source line: `187`. ## recovery\_durable::DurableRecoveryStore::get\_ceremony [#recovery_durabledurablerecoverystoreget_ceremony] ```rust pub fn get_ceremony(&self, ceremony_id: &str) -> Result, NodeError>; ``` Source line: `194`. ## recovery\_durable::DurableRecoveryStore::get\_active\_ceremony\_id [#recovery_durabledurablerecoverystoreget_active_ceremony_id] Look up the active ceremony (if any) for a subject DID. ```rust pub fn get_active_ceremony_id(&self, subject_did: &str) -> Result, NodeError>; ``` Source line: `202`. ## recovery\_durable::DurableRecoveryStore::commit\_batch [#recovery_durabledurablerecoverystorecommit_batch] ```rust pub fn commit_batch(&self, batch: &RecoveryWriteBatch) -> Result<(), NodeError>; ``` Source line: `213`. ## recovery\_durable::DurableRecoveryStore::put\_config [#recovery_durabledurablerecoverystoreput_config] One-op convenience write — used for tests and bootstrap; production always batches via `commit_batch`. ```rust pub fn put_config(&self, config: &RecoveryConfig) -> Result<(), NodeError>; ``` Source line: `263`. ## recovery\_durable::DurableRecoveryStore::put\_ceremony [#recovery_durabledurablerecoverystoreput_ceremony] ```rust pub fn put_ceremony(&self, ceremony: &RecoveryCeremony) -> Result<(), NodeError>; ``` Source line: `267`. ## recovery\_durable::DurableRecoveryStore::delete\_config [#recovery_durabledurablerecoverystoredelete_config] ```rust pub fn delete_config(&self, subject_did: &str) -> Result<(), NodeError>; ``` Source line: `271`. ## recovery\_durable::DurableRecoveryStore::delete\_ceremony [#recovery_durabledurablerecoverystoredelete_ceremony] ```rust pub fn delete_ceremony(&self, ceremony_id: &str) -> Result<(), NodeError>; ``` Source line: `275`. ## recovery\_durable::DurableRecoveryStore::close [#recovery_durabledurablerecoverystoreclose] ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `279`. ## recovery\_durable::DurableRecoveryStore::namespace\_prefix [#recovery_durabledurablerecoverystorenamespace_prefix] ```rust pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `285`. ## recovery\_durable::ArcRecoveryStore [#recovery_durablearcrecoverystore] ```rust pub type ArcRecoveryStore = Arc; ``` Source line: `290`. ## recovery\_durable::RecoveryBatchOp [#recovery_durablerecoverybatchop] ```rust #[derive(Clone)] pub enum RecoveryBatchOp { PutConfig(Box), DeleteConfig { subject_did: String, }, PutCeremony(Box), DeleteCeremony { ceremony_id: String, }, SetActiveCeremony { subject_did: String, ceremony_id: String, }, ClearActiveCeremony { subject_did: String, }, } ``` Source line: `297`. ## recovery\_durable::RecoveryWriteBatch [#recovery_durablerecoverywritebatch] ```rust #[derive(Default)] pub struct RecoveryWriteBatch { } ``` Source line: `316`. ## recovery\_durable::RecoveryWriteBatch::new [#recovery_durablerecoverywritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `321`. ## recovery\_durable::RecoveryWriteBatch::put\_config [#recovery_durablerecoverywritebatchput_config] ```rust pub fn put_config(&mut self, config: RecoveryConfig); ``` Source line: `325`. ## recovery\_durable::RecoveryWriteBatch::delete\_config [#recovery_durablerecoverywritebatchdelete_config] ```rust pub fn delete_config(&mut self, subject_did: impl Into); ``` Source line: `329`. ## recovery\_durable::RecoveryWriteBatch::put\_ceremony [#recovery_durablerecoverywritebatchput_ceremony] ```rust pub fn put_ceremony(&mut self, ceremony: RecoveryCeremony); ``` Source line: `335`. ## recovery\_durable::RecoveryWriteBatch::delete\_ceremony [#recovery_durablerecoverywritebatchdelete_ceremony] ```rust pub fn delete_ceremony(&mut self, ceremony_id: impl Into); ``` Source line: `340`. ## recovery\_durable::RecoveryWriteBatch::set\_active\_ceremony [#recovery_durablerecoverywritebatchset_active_ceremony] ```rust pub fn set_active_ceremony( &mut self, subject_did: impl Into, ceremony_id: impl Into, ); ``` Source line: `346`. ## recovery\_durable::RecoveryWriteBatch::clear\_active\_ceremony [#recovery_durablerecoverywritebatchclear_active_ceremony] ```rust pub fn clear_active_ceremony(&mut self, subject_did: impl Into); ``` Source line: `357`. ## recovery\_durable::RecoveryWriteBatch::len [#recovery_durablerecoverywritebatchlen] ```rust pub fn len(&self) -> usize; ``` Source line: `363`. ## recovery\_durable::RecoveryWriteBatch::is\_empty [#recovery_durablerecoverywritebatchis_empty] ```rust pub fn is_empty(&self) -> bool; ``` Source line: `367`. # sigil-node · rpc_compute URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_compute Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_compute.md Source declarations, signatures and documentation for rpc_compute. Source: `sigil/node/sigil-node/src/rpc_compute.rs`. SHA-256: `b75c4730486fd631b067002d098f4310af09a50036921b483fb66abbb29dc14f`. 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. Module condition: ```rust #[cfg(feature = "compute")] ``` ## rpc\_compute::handle\_get\_provider [#rpc_computehandle_get_provider] ```rust #[cfg(feature = "compute")] pub async fn handle_get_provider(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `75`. ## rpc\_compute::handle\_list\_providers [#rpc_computehandle_list_providers] ```rust #[cfg(feature = "compute")] pub async fn handle_list_providers(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `91`. ## rpc\_compute::handle\_get\_provider\_reputation [#rpc_computehandle_get_provider_reputation] ```rust #[cfg(feature = "compute")] pub async fn handle_get_provider_reputation(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `108`. ## rpc\_compute::handle\_get\_escrow\_balance [#rpc_computehandle_get_escrow_balance] ```rust #[cfg(feature = "compute")] pub async fn handle_get_escrow_balance(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `137`. ## rpc\_compute::handle\_get\_compute\_job [#rpc_computehandle_get_compute_job] ```rust #[cfg(feature = "compute")] pub async fn handle_get_compute_job(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `177`. ## rpc\_compute::handle\_list\_compute\_jobs [#rpc_computehandle_list_compute_jobs] ```rust #[cfg(feature = "compute")] pub async fn handle_list_compute_jobs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `192`. ## rpc\_compute::handle\_get\_compute\_receipt [#rpc_computehandle_get_compute_receipt] ```rust #[cfg(feature = "compute")] pub async fn handle_get_compute_receipt(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `227`. ## rpc\_compute::handle\_get\_compute\_proof [#rpc_computehandle_get_compute_proof] ```rust #[cfg(feature = "compute")] pub async fn handle_get_compute_proof(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `251`. ## rpc\_compute::handle\_verify\_lumen\_attestation [#rpc_computehandle_verify_lumen_attestation] ```rust #[cfg(feature = "compute")] pub async fn handle_verify_lumen_attestation(_state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `291`. ## rpc\_compute::handle\_get\_compute\_challenge [#rpc_computehandle_get_compute_challenge] ```rust #[cfg(feature = "compute")] pub async fn handle_get_compute_challenge(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `345`. ## rpc\_compute::handle\_list\_compute\_challenges [#rpc_computehandle_list_compute_challenges] ```rust #[cfg(feature = "compute")] pub async fn handle_list_compute_challenges(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `364`. ## rpc\_compute::handle\_get\_compute\_audit\_trail [#rpc_computehandle_get_compute_audit_trail] ```rust #[cfg(feature = "compute")] pub async fn handle_get_compute_audit_trail(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `404`. ## rpc\_compute::handle\_get\_maca\_work\_claim [#rpc_computehandle_get_maca_work_claim] ```rust #[cfg(feature = "compute")] pub async fn handle_get_maca_work_claim(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `439`. ## rpc\_compute::handle\_list\_maca\_validation\_records [#rpc_computehandle_list_maca_validation_records] ```rust #[cfg(feature = "compute")] pub async fn handle_list_maca_validation_records( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `460`. ## rpc\_compute::handle\_select\_compute\_provider [#rpc_computehandle_select_compute_provider] ```rust #[cfg(feature = "compute")] pub async fn handle_select_compute_provider(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `495`. ## rpc\_compute::handle\_get\_validator\_agent [#rpc_computehandle_get_validator_agent] ```rust #[cfg(feature = "compute")] pub async fn handle_get_validator_agent(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `561`. ## rpc\_compute::handle\_get\_maca\_epoch [#rpc_computehandle_get_maca_epoch] ```rust #[cfg(feature = "compute")] pub async fn handle_get_maca_epoch(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `576`. ## rpc\_compute::handle\_list\_maca\_epochs [#rpc_computehandle_list_maca_epochs] ```rust #[cfg(feature = "compute")] pub async fn handle_list_maca_epochs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `593`. ## rpc\_compute::handle\_get\_maca\_quorum\_proof [#rpc_computehandle_get_maca_quorum_proof] ```rust #[cfg(feature = "compute")] pub async fn handle_get_maca_quorum_proof(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `625`. ## rpc\_compute::handle\_list\_maca\_quorum\_proofs [#rpc_computehandle_list_maca_quorum_proofs] ```rust #[cfg(feature = "compute")] pub async fn handle_list_maca_quorum_proofs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `656`. # sigil-node · rpc_contract URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_contract Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_contract.md Source declarations, signatures and documentation for rpc_contract. Source: `sigil/node/sigil-node/src/rpc_contract.rs`. SHA-256: `d0ea2e91a6f82c3a2ed76338adb1d10462899046ab0c51aafbaabd50d51ac285`. 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. Module condition: ```rust #[cfg(feature = "contracts")] ``` ## rpc\_contract::handle\_register\_contract\_code [#rpc_contracthandle_register_contract_code] ```rust #[cfg(feature = "contracts")] pub async fn handle_register_contract_code(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `123`. ## rpc\_contract::handle\_get\_contract [#rpc_contracthandle_get_contract] ```rust #[cfg(feature = "contracts")] pub async fn handle_get_contract(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `226`. ## rpc\_contract::handle\_get\_contract\_state [#rpc_contracthandle_get_contract_state] ```rust #[cfg(feature = "contracts")] pub async fn handle_get_contract_state(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `246`. ## rpc\_contract::handle\_get\_contract\_events [#rpc_contracthandle_get_contract_events] ```rust #[cfg(feature = "contracts")] pub async fn handle_get_contract_events(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `277`. ## rpc\_contract::handle\_list\_zone\_contracts [#rpc_contracthandle_list_zone_contracts] ```rust #[cfg(feature = "contracts")] pub async fn handle_list_zone_contracts(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `311`. ## rpc\_contract::handle\_get\_zone [#rpc_contracthandle_get_zone] ```rust #[cfg(feature = "contracts")] pub async fn handle_get_zone(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `336`. ## rpc\_contract::handle\_call\_contract\_dry\_run [#rpc_contracthandle_call_contract_dry_run] ```rust #[cfg(feature = "contracts")] #[cfg(feature = "wasm")] pub async fn handle_call_contract_dry_run(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `369`. ## rpc\_contract::handle\_call\_contract\_dry\_run [#rpc_contracthandle_call_contract_dry_run-1] ```rust #[cfg(feature = "contracts")] #[cfg(not(feature = "wasm"))] pub async fn handle_call_contract_dry_run(_state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `496`. # sigil-node · rpc_crucible URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_crucible Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_crucible.md Source declarations, signatures and documentation for rpc_crucible. Source: `sigil/node/sigil-node/src/rpc_crucible.rs`. SHA-256: `6dda18bc2876ca4f59138551c8012e88d6667520de5f1bea919e5fc627fb564c`. 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. ## rpc\_crucible::handle\_get\_training\_run [#rpc_cruciblehandle_get_training_run] ```rust pub async fn handle_get_training_run(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `19`. ## rpc\_crucible::handle\_list\_training\_runs [#rpc_cruciblehandle_list_training_runs] ```rust pub async fn handle_list_training_runs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `34`. ## rpc\_crucible::handle\_get\_training\_rollout\_batch [#rpc_cruciblehandle_get_training_rollout_batch] ```rust pub async fn handle_get_training_rollout_batch(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `51`. ## rpc\_crucible::handle\_get\_training\_weights [#rpc_cruciblehandle_get_training_weights] ```rust pub async fn handle_get_training_weights(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `74`. ## rpc\_crucible::handle\_get\_training\_rewards [#rpc_cruciblehandle_get_training_rewards] ```rust pub async fn handle_get_training_rewards(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `113`. ## rpc\_crucible::handle\_get\_training\_slashes [#rpc_cruciblehandle_get_training_slashes] ```rust pub async fn handle_get_training_slashes(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `131`. ## rpc\_crucible::handle\_get\_training\_events [#rpc_cruciblehandle_get_training_events] ```rust pub async fn handle_get_training_events(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `149`. # sigil-node · rpc_dex URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_dex Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_dex.md Source declarations, signatures and documentation for rpc_dex. Source: `sigil/node/sigil-node/src/rpc_dex.rs`. SHA-256: `6fed58a1a7a38c394037619429cd2c69cd218bb83a41d78b53152f29702a3254`. 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. ## rpc\_dex::handle\_get\_dex\_pool [#rpc_dexhandle_get_dex_pool] ```rust pub async fn handle_get_dex_pool(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `80`. ## rpc\_dex::handle\_list\_dex\_pools [#rpc_dexhandle_list_dex_pools] ```rust pub async fn handle_list_dex_pools(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `96`. ## rpc\_dex::handle\_quote\_dex\_swap\_exact\_in [#rpc_dexhandle_quote_dex_swap_exact_in] ```rust pub async fn handle_quote_dex_swap_exact_in(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `111`. ## rpc\_dex::handle\_quote\_dex\_swap\_exact\_out [#rpc_dexhandle_quote_dex_swap_exact_out] ```rust pub async fn handle_quote_dex_swap_exact_out(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `143`. ## rpc\_dex::handle\_get\_dex\_position [#rpc_dexhandle_get_dex_position] ```rust pub async fn handle_get_dex_position(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `182`. ## rpc\_dex::handle\_list\_dex\_positions [#rpc_dexhandle_list_dex_positions] ```rust pub async fn handle_list_dex_positions(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `206`. ## rpc\_dex::handle\_get\_dex\_events [#rpc_dexhandle_get_dex_events] ```rust pub async fn handle_get_dex_events(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `223`. ## rpc\_dex::handle\_list\_dex\_pairs [#rpc_dexhandle_list_dex_pairs] ```rust pub async fn handle_list_dex_pairs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `242`. ## rpc\_dex::handle\_get\_token\_class [#rpc_dexhandle_get_token_class] ```rust pub async fn handle_get_token_class(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `268`. ## rpc\_dex::handle\_get\_token\_balance [#rpc_dexhandle_get_token_balance] ```rust pub async fn handle_get_token_balance(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `288`. # sigil-node · rpc_evidence URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_evidence Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_evidence.md Source declarations, signatures and documentation for rpc_evidence. Source: `sigil/node/sigil-node/src/rpc_evidence.rs`. SHA-256: `fa5fedd769aa5762daddc7c52153a4512c602983a34bc19426d5ec581ef5788e`. 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. ## rpc\_evidence::handle\_get\_evidence\_anchor [#rpc_evidencehandle_get_evidence_anchor] `sigil_getEvidenceAnchor` — fetch one anchor record by deterministic anchor ID (`evidence:anchor:`). Returns `null` when not found. ```rust pub async fn handle_get_evidence_anchor(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `11`. ## rpc\_evidence::handle\_list\_evidence\_anchors\_by\_digest [#rpc_evidencehandle_list_evidence_anchors_by_digest] `sigil_listEvidenceAnchorsByDigest` — list every anchor record for a lowercase hex BLAKE3 digest. Returns an empty array when none exist. ```rust pub async fn handle_list_evidence_anchors_by_digest( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `33`. # sigil-node · rpc_gal URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_gal Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_gal.md Source declarations, signatures and documentation for rpc_gal. Source: `sigil/node/sigil-node/src/rpc_gal.rs`. SHA-256: `695c37f381a227929ce1c0daed93e5d8125682de2b68fe6a0ea21f14f8c52ba9`. 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. Module condition: ```rust #[cfg(feature = "tower")] ``` ## rpc\_gal::handle\_get\_hmr [#rpc_galhandle_get_hmr] ```rust #[cfg(feature = "tower")] pub async fn handle_get_hmr(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `20`. ## rpc\_gal::handle\_get\_mhr [#rpc_galhandle_get_mhr] ```rust #[cfg(feature = "tower")] pub async fn handle_get_mhr(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `36`. ## rpc\_gal::handle\_get\_enr [#rpc_galhandle_get_enr] ```rust #[cfg(feature = "tower")] pub async fn handle_get_enr(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `52`. ## rpc\_gal::handle\_get\_org\_root [#rpc_galhandle_get_org_root] ```rust #[cfg(feature = "tower")] pub async fn handle_get_org_root(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `68`. ## rpc\_gal::handle\_get\_shard [#rpc_galhandle_get_shard] ```rust #[cfg(feature = "tower")] pub async fn handle_get_shard(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `88`. ## rpc\_gal::handle\_check\_revocation [#rpc_galhandle_check_revocation] ```rust #[cfg(feature = "tower")] pub async fn handle_check_revocation(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `104`. ## rpc\_gal::handle\_get\_shard\_topology [#rpc_galhandle_get_shard_topology] ```rust #[cfg(feature = "tower")] pub async fn handle_get_shard_topology(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `123`. # sigil-node · rpc_labor URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_labor Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_labor.md Source declarations, signatures and documentation for rpc_labor. Source: `sigil/node/sigil-node/src/rpc_labor.rs`. SHA-256: `19f0d2421f74a05b1ebff1aa1eb4a71c80facf89ad927d47d9b9769b121c0494`. 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. ## rpc\_labor::handle\_get\_labor\_job [#rpc_laborhandle_get_labor_job] ```rust pub async fn handle_get_labor_job(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `29`. ## rpc\_labor::handle\_list\_labor\_jobs [#rpc_laborhandle_list_labor_jobs] ```rust pub async fn handle_list_labor_jobs(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `44`. ## rpc\_labor::handle\_get\_labor\_bid [#rpc_laborhandle_get_labor_bid] ```rust pub async fn handle_get_labor_bid(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `61`. ## rpc\_labor::handle\_list\_labor\_bids [#rpc_laborhandle_list_labor_bids] ```rust pub async fn handle_list_labor_bids(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `76`. ## rpc\_labor::handle\_get\_labor\_contract [#rpc_laborhandle_get_labor_contract] ```rust pub async fn handle_get_labor_contract(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `112`. ## rpc\_labor::handle\_get\_labor\_milestones [#rpc_laborhandle_get_labor_milestones] ```rust pub async fn handle_get_labor_milestones(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `127`. ## rpc\_labor::handle\_get\_labor\_escrow [#rpc_laborhandle_get_labor_escrow] ```rust pub async fn handle_get_labor_escrow(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `145`. ## rpc\_labor::handle\_get\_labor\_dispute [#rpc_laborhandle_get_labor_dispute] ```rust pub async fn handle_get_labor_dispute(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `160`. ## rpc\_labor::handle\_get\_account\_labor\_history [#rpc_laborhandle_get_account_labor_history] ```rust pub async fn handle_get_account_labor_history(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `175`. ## rpc\_labor::handle\_get\_labor\_offer [#rpc_laborhandle_get_labor_offer] ```rust pub async fn handle_get_labor_offer(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `235`. ## rpc\_labor::handle\_list\_labor\_offers [#rpc_laborhandle_list_labor_offers] ```rust pub async fn handle_list_labor_offers(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `250`. ## rpc\_labor::handle\_get\_labor\_claim [#rpc_laborhandle_get_labor_claim] ```rust pub async fn handle_get_labor_claim(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `278`. ## rpc\_labor::handle\_list\_labor\_claims [#rpc_laborhandle_list_labor_claims] ```rust pub async fn handle_list_labor_claims(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `293`. ## rpc\_labor::handle\_get\_labor\_offer\_events [#rpc_laborhandle_get_labor_offer_events] ```rust pub async fn handle_get_labor_offer_events(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `309`. # sigil-node · rpc_mail URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_mail Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_mail.md Source declarations, signatures and documentation for rpc_mail. Source: `sigil/node/sigil-node/src/rpc_mail.rs`. SHA-256: `f04b51f7ddb83e08e95e2754576b8c8d5c80c246a907627c621c13b0ede5fefc`. 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. ## rpc\_mail::handle\_get\_mailbox [#rpc_mailhandle_get_mailbox] ```rust pub async fn handle_get_mailbox(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `16`. ## rpc\_mail::handle\_list\_mailboxes\_by\_owner [#rpc_mailhandle_list_mailboxes_by_owner] ```rust pub async fn handle_list_mailboxes_by_owner(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `31`. ## rpc\_mail::handle\_get\_mail\_policy [#rpc_mailhandle_get_mail_policy] ```rust pub async fn handle_get_mail_policy(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `54`. ## rpc\_mail::handle\_get\_mail\_keys [#rpc_mailhandle_get_mail_keys] ```rust pub async fn handle_get_mail_keys(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `70`. ## rpc\_mail::handle\_get\_mail\_delivery [#rpc_mailhandle_get_mail_delivery] ```rust pub async fn handle_get_mail_delivery(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `90`. ## rpc\_mail::handle\_list\_mail\_deliveries\_by\_recipient [#rpc_mailhandle_list_mail_deliveries_by_recipient] ```rust pub async fn handle_list_mail_deliveries_by_recipient( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `106`. ## rpc\_mail::handle\_list\_mail\_deliveries\_by\_sender [#rpc_mailhandle_list_mail_deliveries_by_sender] ```rust pub async fn handle_list_mail_deliveries_by_sender( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `137`. ## rpc\_mail::handle\_get\_mail\_delegation [#rpc_mailhandle_get_mail_delegation] ```rust pub async fn handle_get_mail_delegation(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `168`. ## rpc\_mail::handle\_list\_mail\_delegations [#rpc_mailhandle_list_mail_delegations] ```rust pub async fn handle_list_mail_delegations(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `191`. ## rpc\_mail::handle\_get\_mail\_abuse\_report [#rpc_mailhandle_get_mail_abuse_report] ```rust pub async fn handle_get_mail_abuse_report(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `214`. ## rpc\_mail::handle\_resolve\_name [#rpc_mailhandle_resolve_name] ```rust pub async fn handle_resolve_name(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `233`. ## rpc\_mail::handle\_get\_name\_records [#rpc_mailhandle_get_name_records] ```rust pub async fn handle_get_name_records(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `248`. ## rpc\_mail::handle\_resolve\_mail [#rpc_mailhandle_resolve_mail] ```rust pub async fn handle_resolve_mail(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `267`. ## rpc\_mail::handle\_resolve\_website [#rpc_mailhandle_resolve_website] ```rust pub async fn handle_resolve_website(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `284`. # sigil-node · rpc_middleware URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_middleware Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_middleware.md Source declarations, signatures and documentation for rpc_middleware. Source: `sigil/node/sigil-node/src/rpc_middleware.rs`. SHA-256: `8755b619728b188efb35ba9400439c077a6f4127ed3eb8d89099178815076bb8`. 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. ## rpc\_middleware::RpcProfile [#rpc_middlewarerpcprofile] RPC profile — public read-only or full validator. Default: `Validator` so existing single-binary deployments are unchanged. Public-RPC pods set `--rpc-profile public` explicitly in `30-rpc-service.yaml`. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum RpcProfile { /// Public, read-only profile served at `rpc.sigil.ml`. Rejects /// validator-internal methods (`sigil_consensus_*`, /// `sigil_tower_attestation`) with `MethodNotFound`. Public, /// Full validator profile — every dispatched method is callable. #[default] Validator, } ``` Source line: `39`. ## rpc\_middleware::RpcProfile::allows [#rpc_middlewarerpcprofileallows] Returns `true` if the given canonical method name is allowed to be served on this profile. Methods not in the canonical table are caller-checked elsewhere. ```rust pub fn allows(self, method: &str) -> bool; ``` Source line: `53`. ## rpc\_middleware::RPC\_BODY\_LIMIT\_BYTES [#rpc_middlewarerpc_body_limit_bytes] Application-layer body cap on the JSON-RPC envelope. 4 MiB. The *per-method* tightening (64 KiB default, 4 MiB only on `sigil_sendTransaction`) is enforced inside the handlers in `rpc_server.rs` — once the request body has been parsed we know the method, so we can reject oversized non-write requests with a JSON-RPC error rather than an HTTP 413. Why 4 MiB at the envelope: `MAX_CODE_SIZE = 2 MiB` (`sigil-wasm/engine.rs:11`); a contract-deploy `sigil_sendTransaction` is `MAX_CODE_SIZE` plus envelope plus signature, \~2.3 MiB worst case. Doubling that gives 4 MiB of headroom before the request is rejected at the HTTP layer. ```rust pub const RPC_BODY_LIMIT_BYTES: usize; ``` Source line: `113`. ## rpc\_middleware::RPC\_DEFAULT\_REQUEST\_LIMIT\_BYTES [#rpc_middlewarerpc_default_request_limit_bytes] Default per-request body cap when the method is not `sigil_sendTransaction`. Enforced inside handlers, not at the HTTP layer (which only sees the outer envelope). ```rust pub const RPC_DEFAULT_REQUEST_LIMIT_BYTES: usize; ``` Source line: `118`. ## rpc\_middleware::RPC\_BATCH\_LIMIT\_BYTES [#rpc_middlewarerpc_batch_limit_bytes] Per-batch envelope cap. Matches the dispatched D4.3 batch size cap (32 requests × 4 MiB / 8 = 16 MiB). ```rust pub const RPC_BATCH_LIMIT_BYTES: usize; ``` Source line: `122`. ## rpc\_middleware::RateLimitConfig [#rpc_middlewareratelimitconfig] Rate-limit configuration for the public RPC surface. Defaults reject the dispatched 100/500 (botnet ceiling) per counterargument CA-1; benchmarked against Alchemy 25 req/s, Infura \~10 req/s, QuickNode 25 req/s, Solana public RPC \~4 req/s. ```rust #[derive(Debug, Clone, Copy)] pub struct RateLimitConfig { /// Sustained requests per second per IP. pub per_ip_rps: u32, /// Burst capacity per IP. pub per_ip_burst: u32 } ``` Source line: `134`. ## rpc\_middleware::RateLimitConfig::PUBLIC\_DEFAULT [#rpc_middlewareratelimitconfigpublic_default] Public unauth defaults from CA-1. ```rust pub const PUBLIC_DEFAULT: Self; ``` Source line: `143`. ## rpc\_middleware::RateLimitConfig::VALIDATOR\_DEFAULT [#rpc_middlewareratelimitconfigvalidator_default] Validator profile default — effectively unlimited inside the k8s control plane. Operators can override via env if needed. ```rust pub const VALIDATOR_DEFAULT: Self; ``` Source line: `150`. ## rpc\_middleware::RateLimitConfig::from\_env [#rpc_middlewareratelimitconfigfrom_env] Resolve from env vars, falling back to the profile default. ```rust pub fn from_env(profile: RpcProfile) -> Self; ``` Source line: `156`. ## rpc\_middleware::RateLimitConfig::replenish\_period [#rpc_middlewareratelimitconfigreplenish_period] Convert requests-per-second into tower-governor's token replenishment period. `tower_governor::GovernorConfigBuilder::per_second(n)` means "add one token every n seconds", not "allow n requests per second". Keep the env/config model expressed as RPS and convert explicitly before wiring the layer. ```rust pub fn replenish_period(self) -> Duration; ``` Source line: `182`. ## rpc\_middleware::cors\_layer [#rpc_middlewarecors_layer] The hosts allowed to make cross-origin RPC calls. Replaces `tower_http::cors::CorsLayer::permissive()`. Configured via `SIGIL_RPC_CORS_ORIGINS` env var (comma-separated). When unset, the public profile uses the canonical Sigil hosts; the validator profile defaults to permissive because validator-to-validator traffic is on the cluster's private network anyway. ```rust pub fn cors_layer(profile: RpcProfile) -> tower_http::cors::CorsLayer; ``` Source line: `199`. ## rpc\_middleware::sanitize\_error\_message [#rpc_middlewaresanitize_error_message] Strip likely-internal substrings from a JSON-RPC error message before it leaves the process. Heuristic, not a security boundary on its own — handlers must also be careful what they put in error messages. This is the last-line defence per `docs/launch/agent-05/DESIGN.md` §2.4.7. ```rust pub fn sanitize_error_message(message: &str) -> String; ``` Source line: `249`. # sigil-node · rpc_nft URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_nft Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_nft.md Source declarations, signatures and documentation for rpc_nft. Source: `sigil/node/sigil-node/src/rpc_nft.rs`. SHA-256: `fb53a370a92106c3027aa28fb80dec8df28e5bc056e0344b7f666fa8fbbba3b7`. 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. ## rpc\_nft::handle\_get\_nft\_collection [#rpc_nfthandle_get_nft_collection] `sigil_getNftCollection` — fetch a collection by its string ID. Params: `{ "collection_id": "" }` or positional `[""]`. ```rust pub async fn handle_get_nft_collection(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `29`. ## rpc\_nft::handle\_get\_nft\_token [#rpc_nfthandle_get_nft_token] `sigil_getNftToken` — fetch a single token within a collection. Params: `{ "collection_id": "", "token_id": "" }`. ```rust pub async fn handle_get_nft_token(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `74`. ## rpc\_nft::handle\_get\_owner\_nfts [#rpc_nfthandle_get_owner_nfts] `sigil_getOwnerNfts` — list all NFTs owned by a DID. Params: `{ "owner_did": "", "limit": , "offset": }` or positional `["", , ]`. ```rust pub async fn handle_get_owner_nfts(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `141`. ## rpc\_nft::handle\_get\_did\_identity\_nft [#rpc_nfthandle_get_did_identity_nft] `sigil_getDidIdentityNft` — fetch DID-identity index for a subject DID. Params: `{ "subject_did": "" }` or positional `[""]`. ```rust pub async fn handle_get_did_identity_nft(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `185`. ## rpc\_nft::handle\_get\_nft\_events [#rpc_nfthandle_get_nft_events] `sigil_getNftEvents` — list NFT lifecycle events with optional filters. Params: an \[`NftEventFilter`] object or `{}` for all events. The `list_nft_events` trait method accepts an optional `collection_id` filter. Client-side filtering for `owner_did` and `kind` is applied after retrieval, since the `ExecutionState` trait only exposes collection-level filtering. ```rust pub async fn handle_get_nft_events(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `222`. # sigil-node · rpc_nova URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_nova Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_nova.md Source declarations, signatures and documentation for rpc_nova. Source: `sigil/node/sigil-node/src/rpc_nova.rs`. SHA-256: `c54bfcd19f58a398a637ec59eb621f3e4d37d3ced833dd1d11daa4ff6771c297`. 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. ## rpc\_nova::handle\_get\_parcel [#rpc_novahandle_get_parcel] ```rust pub async fn handle_get_parcel(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `7`. ## rpc\_nova::handle\_get\_building [#rpc_novahandle_get_building] ```rust pub async fn handle_get_building(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `36`. ## rpc\_nova::handle\_get\_avatar [#rpc_novahandle_get_avatar] ```rust pub async fn handle_get_avatar(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `58`. ## rpc\_nova::handle\_get\_world\_config [#rpc_novahandle_get_world_config] ```rust pub async fn handle_get_world_config(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `100`. ## rpc\_nova::handle\_list\_parcels\_in\_region [#rpc_novahandle_list_parcels_in_region] ```rust pub async fn handle_list_parcels_in_region(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `120`. ## rpc\_nova::handle\_get\_auction\_status [#rpc_novahandle_get_auction_status] ```rust pub async fn handle_get_auction_status(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `147`. # sigil-node · rpc_server URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_server Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_server.md Source declarations, signatures and documentation for rpc_server. Source: `sigil/node/sigil-node/src/rpc_server.rs`. SHA-256: `41199e81730e6a55193ebc3d9503a2fe660313d46c295eb2a81ecf62023d6882`. 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. ## rpc\_server::RpcRequest [#rpc_serverrpcrequest] JSON-RPC request envelope. ```rust #[derive(Debug, Deserialize)] pub struct RpcRequest { /// JSON-RPC version (always "2.0"). pub jsonrpc: String, /// Method name. pub method: String, /// Request parameters (optional). #[serde(default)] pub params: serde_json::Value, /// Request ID. pub id: serde_json::Value } ``` Source line: `18`. ## rpc\_server::RpcResponse [#rpc_serverrpcresponse] JSON-RPC response envelope. ```rust #[derive(Debug, Serialize)] pub struct RpcResponse { /// JSON-RPC version. pub jsonrpc: String, /// Result (mutually exclusive with error). #[serde(skip_serializing_if = "Option::is_none")] pub result: Option>, /// Error (mutually exclusive with result). #[serde(skip_serializing_if = "Option::is_none")] pub error: Option>, /// Request ID echoed back. pub id: Box } ``` Source line: `32`. ## rpc\_server::RpcError [#rpc_serverrpcerror] JSON-RPC error object. ```rust #[derive(Debug, Serialize)] pub struct RpcError { pub code: i64, pub message: String, #[serde(skip_serializing_if = "Option::is_none")] pub data: Option } ``` Source line: `47`. ## rpc\_server::StateQueryGate [#rpc_serverstatequerygate] Shared fail-closed gate for state-backed RPC queries. ```rust #[derive(Clone, Debug)] pub struct StateQueryGate(std::sync::Arc); ``` Source line: `80`. ## rpc\_server::StateQueryGate::new [#rpc_serverstatequerygatenew] ```rust pub fn new(safe: bool) -> Self; ``` Source line: `83`. ## rpc\_server::StateQueryGate::is\_safe [#rpc_serverstatequerygateis_safe] ```rust pub fn is_safe(&self) -> bool; ``` Source line: `89`. ## rpc\_server::StateQueryGate::set\_safe [#rpc_serverstatequerygateset_safe] ```rust pub fn set_safe(&self, safe: bool); ``` Source line: `93`. ## rpc\_server::RpcState [#rpc_serverrpcstate] Shared state for RPC handlers. ```rust #[derive(Clone)] pub struct RpcState { pub mempool: Arc>, pub chain_id: String, pub node_version: String, /// Optional execution state for query methods (identity, validator, etc.). pub execution_state: Option>, /// Whether state-backed RPC queries may be served from `execution_state`. /// /// Validator/producer nodes execute the canonical chain locally, so this is /// true there. RPC/archive mirrors that only pulled block headers/bodies but /// have not replayed state must set this false and fail closed. pub state_queries_safe: StateQueryGate, /// Channel for forwarding consensus messages to the coordinator. pub consensus_tx: Option>, /// Optional block store for block queries. pub block_store: Option>, /// Local Weft publish/fetch/serve substrate for off-chain artifacts. pub weft_store: Arc, /// Engine reference for Tower attestation dispatch. /// /// When set, the `sigil_tower_attestation` RPC method delivers inbound /// attestations directly into `BlockEngine::on_tower_attestation_received`, /// which verifies the signature and advances the Casper FFG finality state. pub tower_engine: Option>, /// Agent 05 D4 — RPC profile (`public` or `validator`). Defaults to /// `Validator` for backwards compatibility with existing single-binary /// deployments. Public-RPC pods set `--rpc-profile public` so /// validator-internal methods (`sigil_consensus_*`, /// `sigil_tower_attestation`) return `MethodNotFound`. pub rpc_profile: crate::rpc_middleware::RpcProfile } ``` Source line: `106`. ## rpc\_server::serve [#rpc_serverserve] Start the RPC server on the given address. This function blocks until the server is shut down. ```rust pub async fn serve(addr: String, state: RpcState) -> Result<(), NodeError>; ``` Source line: `159`. ## rpc\_server::bind [#rpc_serverbind] Bind the RPC listener before spawning the server task. `sigil-node` uses this in `main.rs` so startup fails if the configured address is already occupied. ```rust pub async fn bind(addr: &str) -> Result; ``` Source line: `168`. ## rpc\_server::serve\_listener [#rpc_serverserve_listener] Serve RPC traffic on an already-bound listener. Splitting bind from serve lets startup propagate bind failures while still running the HTTP server concurrently with the node engine. ```rust pub async fn serve_listener( listener: tokio::net::TcpListener, state: RpcState, ) -> Result<(), NodeError>; ``` Source line: `178`. ## rpc\_server::router [#rpc_serverrouter] Build the axum `Router` for the Sigil RPC surface. Extracted from `serve_listener` so the conformance test in `tests/rpc_conformance.rs` can exercise the dispatcher without binding a TCP listener. Returns an `Err` only if the rate-limit configuration is invalid (`per_second × burst_size` rejects). ```rust pub fn router(state: RpcState) -> Result; ``` Source line: `206`. # sigil-node · rpc_storage_market URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_storage_market Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_storage_market.md Source declarations, signatures and documentation for rpc_storage_market. Source: `sigil/node/sigil-node/src/rpc_storage_market.rs`. SHA-256: `640a7ea869026cc196760a266f8ae7a767dd2e27b341c41fbab6e05b228e47b0`. 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. ## rpc\_storage\_market::handle\_list\_storage\_providers [#rpc_storage_markethandle_list_storage_providers] ```rust pub async fn handle_list_storage_providers(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `5`. ## rpc\_storage\_market::handle\_get\_storage\_provider [#rpc_storage_markethandle_get_storage_provider] ```rust pub async fn handle_get_storage_provider(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `20`. ## rpc\_storage\_market::handle\_get\_storage\_pin\_request [#rpc_storage_markethandle_get_storage_pin_request] ```rust pub async fn handle_get_storage_pin_request(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `42`. ## rpc\_storage\_market::handle\_list\_storage\_pin\_requests\_by\_owner [#rpc_storage_markethandle_list_storage_pin_requests_by_owner] ```rust pub async fn handle_list_storage_pin_requests_by_owner( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `64`. ## rpc\_storage\_market::handle\_get\_storage\_pin\_contract [#rpc_storage_markethandle_get_storage_pin_contract] ```rust pub async fn handle_get_storage_pin_contract(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `86`. ## rpc\_storage\_market::handle\_list\_storage\_pin\_contracts\_by\_provider [#rpc_storage_markethandle_list_storage_pin_contracts_by_provider] ```rust pub async fn handle_list_storage_pin_contracts_by_provider( state: &RpcState, req: &RpcRequest, ) -> RpcResponse; ``` Source line: `108`. ## rpc\_storage\_market::handle\_get\_storage\_pin\_receipt [#rpc_storage_markethandle_get_storage_pin_receipt] ```rust pub async fn handle_get_storage_pin_receipt(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `132`. ## rpc\_storage\_market::handle\_get\_storage\_challenge [#rpc_storage_markethandle_get_storage_challenge] ```rust pub async fn handle_get_storage_challenge(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `154`. # sigil-node · rpc_sync URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_sync Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_sync.md Source declarations, signatures and documentation for rpc_sync. Source: `sigil/node/sigil-node/src/rpc_sync.rs`. SHA-256: `6af5449c2c1e49e760696ff72c02cec61cfbc0ecfa7df91dbbddc14615485eaa`. 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. ## rpc\_sync::SyncTaskConfig [#rpc_syncsynctaskconfig] Per-task configuration. ```rust #[derive(Debug, Clone)] pub struct SyncTaskConfig { /// Full URLs of peer JSON-RPC endpoints to poll, e.g. /// `["http://sigil-val-1:26657/rpc"]`. Order matters: peers are /// tried in order until one responds successfully. pub peer_urls: Vec, /// How often to poll for new blocks. Defaults to 2 s — well /// inside the 6 s canary block time, so an RPC pod typically /// observes a new block within 2–4 s of its finalization. pub poll_interval: Duration, /// HTTP request timeout for a single RPC call. Defaults to 5 s. pub request_timeout: Duration, /// Maximum number of blocks pulled in a single batch when /// catching up. Larger batches reduce RPC overhead during /// initial sync; smaller batches keep memory bounded. pub max_batch_blocks: u64, /// Trusted parent hash for height 1. Sigil stores genesis as an initial /// state root, not as a height-0 block, so first-block continuity needs /// this root explicitly. pub initial_parent_hash: Option } ``` Source line: `51`. ## rpc\_sync::SyncTaskConfig::from\_peers\_env [#rpc_syncsynctaskconfigfrom_peers_env] Construct from `SIGIL_PEERS` (comma-separated `host:port` list, matching the validator gossip env var) by appending `/rpc`. ```rust pub fn from_peers_env() -> Self; ``` Source line: `87`. ## rpc\_sync::SyncTaskConfig::with\_initial\_parent\_hash [#rpc_syncsynctaskconfigwith_initial_parent_hash] ```rust pub fn with_initial_parent_hash(mut self, hash: SigilHash) -> Self; ``` Source line: `168`. ## rpc\_sync::StateReplayConfig [#rpc_syncstatereplayconfig] ```rust #[derive(Clone)] pub struct StateReplayConfig { } ``` Source line: `175`. ## rpc\_sync::StateReplayConfig::new [#rpc_syncstatereplayconfignew] ```rust pub fn new( state: Arc, expected_chain_id: String, state_queries_safe: StateQueryGate, ) -> Self; ``` Source line: `182`. ## rpc\_sync::spawn\_sync\_task [#rpc_syncspawn_sync_task] Spawn the sync task. Returns the JoinHandle so the caller can abort it on shutdown. If `config.peer_urls` is empty the task logs a warning and exits immediately. ```rust pub fn spawn_sync_task(store: Arc, config: SyncTaskConfig) -> JoinHandle<()>; ``` Source line: `231`. ## rpc\_sync::spawn\_state\_replay\_sync\_task [#rpc_syncspawn_state_replay_sync_task] ```rust pub fn spawn_state_replay_sync_task( store: Arc, state: Arc, expected_chain_id: String, state_queries_safe: StateQueryGate, config: SyncTaskConfig, ) -> JoinHandle<()>; ``` Source line: `245`. # sigil-node · rpc_username URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_username Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_username.md Source declarations, signatures and documentation for rpc_username. Source: `sigil/node/sigil-node/src/rpc_username.rs`. SHA-256: `140f03080ea6f535a4f751136436743bd96e3fd16d91d3eb42d3f5c5f8bf2322`. 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. ## rpc\_username::handle\_resolve\_username [#rpc_usernamehandle_resolve_username] `sigil_resolveUsername` — return the canonical record for a name. Params: `{ "name": "" }` or positional `[""]`. Returns `null` if the name is not registered. ```rust pub async fn handle_resolve_username(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `22`. ## rpc\_username::handle\_lookup\_username [#rpc_usernamehandle_lookup_username] `sigil_lookupUsername` — reverse-lookup a DID's primary `@username`. Params: `{ "did": "did:oas:..." }` or positional `["did:oas:..."]`. Returns the canonical username string, or `null` if no primary is set. ```rust pub async fn handle_lookup_username(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `57`. ## rpc\_username::handle\_list\_usernames [#rpc_usernamehandle_list_usernames] `sigil_listUsernames` — return all usernames owned by a DID. Params: `{ "owner_did": "did:oas:..." }` or positional `["did:oas:..."]`. ```rust pub async fn handle_list_usernames(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `83`. ## rpc\_username::handle\_search\_username [#rpc_usernamehandle_search_username] `sigil_searchUsername` — prefix search the username space. Params: `{ "prefix": "ali", "limit": 50 }` or positional `["ali", 50]`. Limit defaults to 50 and caps at 200. Returns up to `limit` records whose canonical name starts with the (canonicalized) prefix. ```rust pub async fn handle_search_username(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `110`. ## rpc\_username::handle\_get\_username\_auction [#rpc_usernamehandle_get_username_auction] `sigil_getUsernameAuction` — fetch a single premium-name auction. Params: `{ "name": "" }` or positional `[""]`. Returns `null` if no auction exists for that name. ```rust pub async fn handle_get_username_auction(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `163`. ## rpc\_username::handle\_list\_open\_auctions [#rpc_usernamehandle_list_open_auctions] `sigil_listOpenUsernameAuctions` — return all currently-open auctions. ```rust pub async fn handle_list_open_auctions(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `194`. # sigil-node · rpc_vigils URL: https://docs.sigil.ml/reference/rust/sigil-node/rpc_vigils Markdown: https://docs.sigil.ml/reference/rust/sigil-node/rpc_vigils.md Source declarations, signatures and documentation for rpc_vigils. Source: `sigil/node/sigil-node/src/rpc_vigils.rs`. SHA-256: `4d4be28363a25a54b172f3a9431589cf33099a1e7c880f6ea2baae24395bbf41`. 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. Module condition: ```rust #[cfg(feature = "vigils-v1")] ``` ## rpc\_vigils::handle\_get\_vigil\_subscription [#rpc_vigilshandle_get_vigil_subscription] ```rust #[cfg(feature = "vigils-v1")] pub async fn handle_get_vigil_subscription(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `11`. ## rpc\_vigils::handle\_list\_vigil\_subscriptions [#rpc_vigilshandle_list_vigil_subscriptions] ```rust #[cfg(feature = "vigils-v1")] pub async fn handle_list_vigil_subscriptions(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `33`. ## rpc\_vigils::handle\_get\_vigil\_delivery\_history [#rpc_vigilshandle_get_vigil_delivery_history] ```rust #[cfg(feature = "vigils-v1")] pub async fn handle_get_vigil_delivery_history(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `53`. ## rpc\_vigils::handle\_list\_ingestors [#rpc_vigilshandle_list_ingestors] ```rust #[cfg(feature = "vigils-v1")] pub async fn handle_list_ingestors(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `76`. ## rpc\_vigils::handle\_get\_ingestor [#rpc_vigilshandle_get_ingestor] ```rust #[cfg(feature = "vigils-v1")] pub async fn handle_get_ingestor(state: &RpcState, req: &RpcRequest) -> RpcResponse; ``` Source line: `90`. # sigil-node · snapshot URL: https://docs.sigil.ml/reference/rust/sigil-node/snapshot Markdown: https://docs.sigil.ml/reference/rust/sigil-node/snapshot.md Source declarations, signatures and documentation for snapshot. Source: `sigil/node/sigil-node/src/snapshot.rs`. SHA-256: `597583224e0430ac01045fa4e9be21904462f2e39529bd55a93862753fab7cc6`. 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. ## snapshot::SnapshotManifest [#snapshotsnapshotmanifest] Manifest committed next to every published snapshot. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SnapshotManifest { /// Manifest schema version. Version 1 is the launch format. pub schema_version: u32, /// Chain ID this snapshot belongs to. pub chain_id: String, /// Finalized block height captured by the snapshot. pub height: u64, /// Hex-encoded state root at `height`. pub state_root: String, /// Optional canonical block hash at `height`. #[serde(default, skip_serializing_if = "Option::is_none")] pub block_hash: Option, /// Optional archive payload URI, used by `latest.json` indirection. #[serde(default, skip_serializing_if = "Option::is_none")] pub payload_uri: Option, /// Snapshot components present in the payload. #[serde(default)] pub components: Vec } ``` Source line: `31`. ## snapshot::SnapshotRestoreOutcome [#snapshotsnapshotrestoreoutcome] Result returned after a successful restore. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct SnapshotRestoreOutcome { /// Restored snapshot manifest. pub manifest: SnapshotManifest, /// Final data directory populated by the restore. pub data_dir: PathBuf } ``` Source line: `53`. ## snapshot::SnapshotManifest::validate\_for\_chain [#snapshotsnapshotmanifestvalidate_for_chain] Validate static manifest fields before trusting payload bytes. ```rust pub fn validate_for_chain(&self, chain_id: &str) -> Result<(), NodeError>; ``` Source line: `62`. ## snapshot::restore\_snapshot\_from\_uri [#snapshotrestore_snapshot_from_uri] Restore a snapshot URI into `data_dir` and verify its committed state root. ```rust pub async fn restore_snapshot_from_uri( uri: &str, data_dir: &Path, chain_id: &str, genesis: &GenesisConfig, ) -> Result; ``` Source line: `84`. ## snapshot::data\_dir\_empty\_or\_missing [#snapshotdata_dir_empty_or_missing] Return true when startup may safely auto-restore into `data_dir`. ```rust pub fn data_dir_empty_or_missing(data_dir: &Path) -> Result; ``` Source line: `99`. # sigil-node · staking URL: https://docs.sigil.ml/reference/rust/sigil-node/staking Markdown: https://docs.sigil.ml/reference/rust/sigil-node/staking.md Source declarations, signatures and documentation for staking. Source: `sigil/node/sigil-node/src/staking.rs`. SHA-256: `2a8b60b540bdf5d2110c261c729b80c8d17844c00bbec6fdeff8a7b3374d136a`. 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. ## staking::NetworkActivationPolicy [#stakingnetworkactivationpolicy] ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct NetworkActivationPolicy { pub required_validators: usize, pub required_block_producers: usize, pub required_block_validators: usize, pub min_block_producer_self_bond: u64, pub min_block_validator_self_bond: u64, pub min_total_eligible_stake: u64, pub min_independent_stake_bps: Option, pub l1fe_validator_dids: HashSet, pub protocol_upgrade_activation_height: Option, pub enforce_activation_gate: bool } ``` Source line: `219`. # sigil-node · storage_market_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/storage_market_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/storage_market_durable.md Source declarations, signatures and documentation for storage_market_durable. Source: `sigil/node/sigil-node/src/storage_market_durable.rs`. SHA-256: `8fc26fa367e5859cf4e89035eb1f4830f5c349e8bd4b6e4eb8e0024ad83810b7`. 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. ## storage\_market\_durable::ArcStorageMarketStore [#storage_market_durablearcstoragemarketstore] ```rust pub type ArcStorageMarketStore = Arc; ``` Source line: `14`. ## storage\_market\_durable::StorageMarketEvent [#storage_market_durablestoragemarketevent] ```rust #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct StorageMarketEvent { pub block_height: u64, pub seq: u64, pub topic: String, pub actor_did: String, pub provider_did: Option, pub request_id: Option, pub contract_id: Option, pub payload: serde_json::Value } ``` Source line: `65`. ## storage\_market\_durable::StorageMarketBatchOp [#storage_market_durablestoragemarketbatchop] ```rust #[derive(Debug, Clone)] pub enum StorageMarketBatchOp { PutProvider(Arc), PutRequest(Arc), IndexRequestOwner { owner_did: String, request_id: String, }, PutContract(Arc), IndexContractProvider { provider_did: String, contract_id: String, }, IndexContractRequest { request_id: String, contract_id: String, }, PutReceipt(Arc), IndexReceiptContract { contract_id: String, receipt_id: String, }, PutChallenge(Arc), IndexChallengeContract { contract_id: String, challenge_id: String, }, AppendEvent(Arc), } ``` Source line: `77`. ## storage\_market\_durable::StorageMarketWriteBatch [#storage_market_durablestoragemarketwritebatch] ```rust #[derive(Debug, Default, Clone)] pub struct StorageMarketWriteBatch { pub ops: Vec } ``` Source line: `107`. ## storage\_market\_durable::StorageMarketWriteBatch::new [#storage_market_durablestoragemarketwritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `112`. ## storage\_market\_durable::StorageMarketWriteBatch::push [#storage_market_durablestoragemarketwritebatchpush] ```rust pub fn push(&mut self, op: StorageMarketBatchOp); ``` Source line: `116`. ## storage\_market\_durable::StorageMarketWriteBatch::put\_provider [#storage_market_durablestoragemarketwritebatchput_provider] ```rust pub fn put_provider(&mut self, record: StorageProviderRecord); ``` Source line: `120`. ## storage\_market\_durable::StorageMarketWriteBatch::put\_request [#storage_market_durablestoragemarketwritebatchput_request] ```rust pub fn put_request(&mut self, record: StoragePinRequest); ``` Source line: `124`. ## storage\_market\_durable::StorageMarketWriteBatch::put\_contract [#storage_market_durablestoragemarketwritebatchput_contract] ```rust pub fn put_contract(&mut self, record: StoragePinContract); ``` Source line: `132`. ## storage\_market\_durable::StorageMarketWriteBatch::put\_receipt [#storage_market_durablestoragemarketwritebatchput_receipt] ```rust pub fn put_receipt(&mut self, record: StoragePinReceipt); ``` Source line: `144`. ## storage\_market\_durable::StorageMarketWriteBatch::put\_challenge [#storage_market_durablestoragemarketwritebatchput_challenge] ```rust pub fn put_challenge(&mut self, record: StorageChallengeRecord); ``` Source line: `152`. ## storage\_market\_durable::DurableStorageMarketStore [#storage_market_durabledurablestoragemarketstore] ```rust pub struct DurableStorageMarketStore { } ``` Source line: `184`. ## storage\_market\_durable::DurableStorageMarketStore::open [#storage_market_durabledurablestoragemarketstoreopen] ```rust pub fn open(path: &Path) -> Result; ``` Source line: `190`. ## storage\_market\_durable::DurableStorageMarketStore::get\_provider [#storage_market_durabledurablestoragemarketstoreget_provider] ```rust pub fn get_provider( &self, provider_did: &str, ) -> Result, NodeError>; ``` Source line: `245`. ## storage\_market\_durable::DurableStorageMarketStore::list\_providers [#storage_market_durabledurablestoragemarketstorelist_providers] ```rust pub fn list_providers(&self) -> Result, NodeError>; ``` Source line: `254`. ## storage\_market\_durable::DurableStorageMarketStore::get\_request [#storage_market_durabledurablestoragemarketstoreget_request] ```rust pub fn get_request(&self, request_id: &str) -> Result, NodeError>; ``` Source line: `263`. ## storage\_market\_durable::DurableStorageMarketStore::list\_requests\_by\_owner [#storage_market_durabledurablestoragemarketstorelist_requests_by_owner] ```rust pub fn list_requests_by_owner( &self, owner_did: &str, ) -> Result, NodeError>; ``` Source line: `269`. ## storage\_market\_durable::DurableStorageMarketStore::get\_contract [#storage_market_durabledurablestoragemarketstoreget_contract] ```rust pub fn get_contract(&self, contract_id: &str) -> Result, NodeError>; ``` Source line: `286`. ## storage\_market\_durable::DurableStorageMarketStore::list\_contracts\_by\_provider [#storage_market_durabledurablestoragemarketstorelist_contracts_by_provider] ```rust pub fn list_contracts_by_provider( &self, provider_did: &str, ) -> Result, NodeError>; ``` Source line: `292`. ## storage\_market\_durable::DurableStorageMarketStore::list\_contracts\_by\_request [#storage_market_durabledurablestoragemarketstorelist_contracts_by_request] ```rust pub fn list_contracts_by_request( &self, request_id: &str, ) -> Result, NodeError>; ``` Source line: `311`. ## storage\_market\_durable::DurableStorageMarketStore::get\_receipt [#storage_market_durabledurablestoragemarketstoreget_receipt] ```rust pub fn get_receipt(&self, receipt_id: &str) -> Result, NodeError>; ``` Source line: `328`. ## storage\_market\_durable::DurableStorageMarketStore::list\_receipts\_by\_contract [#storage_market_durabledurablestoragemarketstorelist_receipts_by_contract] ```rust pub fn list_receipts_by_contract( &self, contract_id: &str, ) -> Result, NodeError>; ``` Source line: `334`. ## storage\_market\_durable::DurableStorageMarketStore::get\_challenge [#storage_market_durabledurablestoragemarketstoreget_challenge] ```rust pub fn get_challenge( &self, challenge_id: &str, ) -> Result, NodeError>; ``` Source line: `353`. ## storage\_market\_durable::DurableStorageMarketStore::list\_challenges\_by\_contract [#storage_market_durabledurablestoragemarketstorelist_challenges_by_contract] ```rust pub fn list_challenges_by_contract( &self, contract_id: &str, ) -> Result, NodeError>; ``` Source line: `362`. ## storage\_market\_durable::DurableStorageMarketStore::list\_all\_requests [#storage_market_durabledurablestoragemarketstorelist_all_requests] ```rust pub fn list_all_requests(&self) -> Result, NodeError>; ``` Source line: `381`. ## storage\_market\_durable::DurableStorageMarketStore::list\_all\_contracts [#storage_market_durabledurablestoragemarketstorelist_all_contracts] ```rust pub fn list_all_contracts(&self) -> Result, NodeError>; ``` Source line: `390`. ## storage\_market\_durable::DurableStorageMarketStore::list\_all\_receipts [#storage_market_durabledurablestoragemarketstorelist_all_receipts] ```rust pub fn list_all_receipts(&self) -> Result, NodeError>; ``` Source line: `399`. ## storage\_market\_durable::DurableStorageMarketStore::list\_all\_challenges [#storage_market_durabledurablestoragemarketstorelist_all_challenges] ```rust pub fn list_all_challenges(&self) -> Result, NodeError>; ``` Source line: `408`. ## storage\_market\_durable::DurableStorageMarketStore::commit\_batch [#storage_market_durabledurablestoragemarketstorecommit_batch] ```rust pub fn commit_batch(&self, batch: &StorageMarketWriteBatch) -> Result<(), NodeError>; ``` Source line: `417`. # sigil-node · storage_migration URL: https://docs.sigil.ml/reference/rust/sigil-node/storage_migration Markdown: https://docs.sigil.ml/reference/rust/sigil-node/storage_migration.md Source declarations, signatures and documentation for storage_migration. Source: `sigil/node/sigil-node/src/storage_migration.rs`. SHA-256: `288ce6a54dfc2b8676f0d081658e64f05dff186fc8760732020adcc75e9106ec`. 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. ## storage\_migration::StorageMigrationManifest [#storage_migrationstoragemigrationmanifest] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageMigrationManifest { pub from_backend: String, pub to_backend: String, pub source_height: u64, pub source_block_hash: String, pub source_state_root: String, pub migrated_state_root: String, pub akashakv_revision: String, pub migration_started_at: String, pub migration_completed_at: String, pub migration_tool_version: String } ``` Source line: `18`. ## storage\_migration::StorageStatus [#storage_migrationstoragestatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct StorageStatus { pub backend: String, pub version: String, pub migration_status: String, pub source_backend: Option, pub state_root: Option, pub latest_verified_height: u64, pub akashakv_revision: String } ``` Source line: `32`. # sigil-node · tee_verify::arm_cca URL: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-arm_cca Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-arm_cca.md Source declarations, signatures and documentation for tee_verify::arm_cca. Source: `sigil/node/sigil-node/src/tee_verify/arm_cca.rs`. SHA-256: `1905d07ff90174d91dfaacbf2672c990857d76a4f15d72b420753e6776ae7cf4`. 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. Module condition: ```rust #[cfg(feature = "tee-verify")] ``` ## tee\_verify::arm\_cca::ArmCcaVerifier [#tee_verifyarm_ccaarmccaverifier] ```rust #[cfg(feature = "tee-verify")] #[derive(Default)] pub struct ArmCcaVerifier { } ``` Source line: `94`. ## tee\_verify::arm\_cca::ArmCcaVerifier::with\_anchors [#tee_verifyarm_ccaarmccaverifierwith_anchors] ```rust #[cfg(feature = "tee-verify")] #[cfg(feature = "tee-verify-arm-cca")] pub fn with_anchors(anchors: ArmCcaTrustAnchors) -> Self; ``` Source line: `101`. # sigil-node · tee_verify::sev_snp URL: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-sev_snp Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-sev_snp.md Source declarations, signatures and documentation for tee_verify::sev_snp. Source: `sigil/node/sigil-node/src/tee_verify/sev_snp.rs`. SHA-256: `f3dc7ce356f8bd64a952a51db09ae3ef7a8084c86dce103b1b6104f924cbfc94`. 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. Module condition: ```rust #[cfg(feature = "tee-verify")] ``` ## tee\_verify::sev\_snp::SevSnpVerifier [#tee_verifysev_snpsevsnpverifier] Default verifier (no anchors). Fails closed for every well-formed attestation with `FixtureMaterialRequired` — preserves Phase 13 behaviour for builds that don't enable `tee-verify-sev-snp` or that leave `sev_snp_trust_anchors = None` in genesis. ```rust #[cfg(feature = "tee-verify")] #[derive(Default)] pub struct SevSnpVerifier { } ``` Source line: `127`. ## tee\_verify::sev\_snp::SevSnpVerifier::with\_anchors [#tee_verifysev_snpsevsnpverifierwith_anchors] Construct a real-verification SevSnpVerifier. The verifier accepts a report iff its signature verifies against one of `anchors.acceptable_vcek_pubkeys` AND the report's MEASUREMENT field is on `anchors.measurement_allowlist`. ```rust #[cfg(feature = "tee-verify")] #[cfg(feature = "tee-verify-sev-snp")] pub fn with_anchors(anchors: SevSnpTrustAnchors) -> Self; ``` Source line: `138`. # sigil-node · tee_verify::sgx_dcap URL: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-sgx_dcap Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-sgx_dcap.md Source declarations, signatures and documentation for tee_verify::sgx_dcap. Source: `sigil/node/sigil-node/src/tee_verify/sgx_dcap.rs`. SHA-256: `d180e57a32504468166d7cd36e363b6440142d100dab7422e5213cd9646cd829`. 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. Module condition: ```rust #[cfg(feature = "tee-verify")] ``` ## tee\_verify::sgx\_dcap::SgxDcapVerifier [#tee_verifysgx_dcapsgxdcapverifier] ```rust #[cfg(feature = "tee-verify")] #[derive(Default)] pub struct SgxDcapVerifier { } ``` Source line: `142`. ## tee\_verify::sgx\_dcap::SgxDcapVerifier::with\_anchors [#tee_verifysgx_dcapsgxdcapverifierwith_anchors] Construct a real-verification SgxDcapVerifier. The verifier accepts a quote iff every gate (chain, signatures, MR allowlist, REPORT\_DATA, freshness, TCB) passes. ```rust #[cfg(feature = "tee-verify")] #[cfg(feature = "tee-verify-sgx-dcap")] pub fn with_anchors(anchors: SgxDcapTrustAnchors) -> Self; ``` Source line: `152`. # sigil-node · tee_verify::tdx URL: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-tdx Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify-tdx.md Source declarations, signatures and documentation for tee_verify::tdx. Source: `sigil/node/sigil-node/src/tee_verify/tdx.rs`. SHA-256: `fa692e3fd95e6822f4343c25a69647767ebaa2f725c1fcfe40c55b6cc07b95ac`. 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. Module condition: ```rust #[cfg(feature = "tee-verify")] ``` ## tee\_verify::tdx::TdxVerifier [#tee_verifytdxtdxverifier] ```rust #[cfg(feature = "tee-verify")] #[derive(Default)] pub struct TdxVerifier { } ``` Source line: `140`. ## tee\_verify::tdx::TdxVerifier::with\_anchors [#tee_verifytdxtdxverifierwith_anchors] ```rust #[cfg(feature = "tee-verify")] #[cfg(feature = "tee-verify-tdx")] pub fn with_anchors(anchors: TdxTrustAnchors) -> Self; ``` Source line: `147`. # sigil-node · tee_verify URL: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tee_verify.md Source declarations, signatures and documentation for tee_verify. Source: `sigil/node/sigil-node/src/tee_verify/mod.rs`. SHA-256: `e8aaa931f756a68434130a608ad88f92d26d2ec19ab323ab6c1f7bf616f224f4`. 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. Module condition: ```rust #[cfg(feature = "tee-verify")] ``` ## tee\_verify::arm\_cca [#tee_verifyarm_cca] ```rust #[cfg(feature = "tee-verify")] pub mod arm_cca; ``` Source line: `35`. ## tee\_verify::sev\_snp [#tee_verifysev_snp] ```rust #[cfg(feature = "tee-verify")] pub mod sev_snp; ``` Source line: `36`. ## tee\_verify::sgx\_dcap [#tee_verifysgx_dcap] ```rust #[cfg(feature = "tee-verify")] pub mod sgx_dcap; ``` Source line: `37`. ## tee\_verify::tdx [#tee_verifytdx] ```rust #[cfg(feature = "tee-verify")] pub mod tdx; ``` Source line: `38`. ## tee\_verify::TeeVerifyOk [#tee_verifyteeverifyok] Outcome of a successful vendor verification. The executor uses this to anchor the verified measurement and (optionally) an expiry epoch onto the on-chain audit trail. ```rust #[cfg(feature = "tee-verify")] #[derive(Debug, Clone, PartialEq, Eq)] pub struct TeeVerifyOk { pub vendor: &'static str, /// Hex-decoded measurement bytes (e.g. MRENCLAVE for SGX, MRTD for /// TDX, measurement digest for SEV-SNP, RIM/RPM for Arm CCA). pub measurement: Vec, /// Optional freshness deadline (chain epoch). When set, the /// executor will reject the receipt if `current_epoch > expiry`. pub expiry_epoch: Option } ``` Source line: `44`. ## tee\_verify::TeeVerifyError [#tee_verifyteeverifyerror] Per-vendor failure modes. Every variant carries the failing vendor so the executor's typed error / audit trail can attribute the rejection. ```rust #[cfg(feature = "tee-verify")] #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum TeeVerifyError { #[error("tee-verify: vendor {vendor:?} not supported")] UnsupportedVendor { vendor: String }, #[error("tee-verify: {vendor} report malformed: {detail}")] MalformedReport { vendor: &'static str, detail: String, }, #[error("tee-verify: {vendor} signature invalid: {detail}")] InvalidSignature { vendor: &'static str, detail: String, }, #[error("tee-verify: {vendor} certificate chain invalid: {detail}")] InvalidCertChain { vendor: &'static str, detail: String, }, #[error("tee-verify: {vendor} attestation expired/stale: {detail}")] ExpiredOrStale { vendor: &'static str, detail: String, }, #[error("tee-verify: {vendor} measurement does not match policy expectation: {detail}")] WrongMeasurement { vendor: &'static str, detail: String, }, /// Production verifier could not run because the vendor reference /// material (root certs, reference measurements, vendor SDK) has /// not been plugged in. Production builds MUST treat this as a /// hard rejection — under no circumstances does the executor /// silently fall back to "accept". #[error( "tee-verify: {vendor} verification blocked: real vendor fixture material not yet bundled — \ do not enable T3 settlement for this vendor on mainnet until reference signing keys, \ root certificates, and reference measurements are wired" )] FixtureMaterialRequired { vendor: &'static str }, #[error("tee-verify: {vendor} internal: {detail}")] Internal { vendor: &'static str, detail: String, }, } ``` Source line: `57`. ## tee\_verify::TeeVerifier [#tee_verifyteeverifier] Vendor verifier contract. One instance per vendor. ```rust #[cfg(feature = "tee-verify")] pub trait TeeVerifier: Send + Sync { /// Vendor identifier as it appears on `TeeAttestation::vendor`. fn vendor(&self) -> &'static str; /// Verify the attestation. `now_epoch` is the chain epoch the /// executor is operating in (used for freshness checks). fn verify( &self, attestation: &TeeAttestation, now_epoch: u64, ) -> Result; } ``` Source line: `104`. ## tee\_verify::TeeVerifierRegistry [#tee_verifyteeverifierregistry] Registry of vendor verifiers, keyed by vendor string. ```rust #[cfg(feature = "tee-verify")] #[derive(Clone)] pub struct TeeVerifierRegistry { } ``` Source line: `119`. ## tee\_verify::TeeVerifierRegistry::new [#tee_verifyteeverifierregistrynew] ```rust #[cfg(feature = "tee-verify")] pub fn new() -> Self; ``` Source line: `130`. ## tee\_verify::TeeVerifierRegistry::production [#tee_verifyteeverifierregistryproduction] Production registry: real verifier per vendor. Each fails closed with `FixtureMaterialRequired` until reference material is wired. SGX DCAP, TDX, Arm CCA remain Phase 13 stubs. SEV-SNP also stays in stub mode here because no policy is being passed; callers that have a `ComputePolicy` should use \[`production_with_policy`] to activate the real SEV-SNP verifier. ```rust #[cfg(feature = "tee-verify")] pub fn production() -> Self; ``` Source line: `143`. ## tee\_verify::TeeVerifierRegistry::production\_with\_policy [#tee_verifyteeverifierregistryproduction_with_policy] Phase 14a / 14b — production registry that pulls per-vendor trust anchors from the chain config. Each vendor's real verifier is feature-gated; when its feature is off, the vendor falls back to the Phase 13 fail-closed stub. SGX DCAP: real when `tee-verify-sgx-dcap` is on \*\*and `policy.sgx_dcap_trust_anchors` is `Some`. SEV-SNP: real when `tee-verify-sev-snp` is on \*\*and `policy.sev_snp_trust_anchors` is `Some`. TDX / Arm CCA: Phase 13 stubs. ```rust #[cfg(feature = "tee-verify")] #[cfg(any( feature = "tee-verify-sev-snp", feature = "tee-verify-sgx-dcap", feature = "tee-verify-tdx", feature = "tee-verify-arm-cca" ))] pub fn production_with_policy(policy: &crate::compute_state::ComputePolicy) -> Self; ``` Source line: `168`. ## tee\_verify::TeeVerifierRegistry::register [#tee_verifyteeverifierregistryregister] ```rust #[cfg(feature = "tee-verify")] pub fn register(&mut self, verifier: Arc); ``` Source line: `229`. ## tee\_verify::TeeVerifierRegistry::verify [#tee_verifyteeverifierregistryverify] ```rust #[cfg(feature = "tee-verify")] pub fn verify( &self, attestation: &TeeAttestation, now_epoch: u64, ) -> Result; ``` Source line: `233`. ## tee\_verify::TeeVerifierRegistry::supports\_vendor [#tee_verifyteeverifierregistrysupports_vendor] Returns true when the vendor has a registered verifier. ```rust #[cfg(feature = "tee-verify")] pub fn supports_vendor(&self, vendor: &str) -> bool; ``` Source line: `249`. # sigil-node · tower_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/tower_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tower_durable.md Source declarations, signatures and documentation for tower_durable. Source: `sigil/node/sigil-node/src/tower_durable.rs`. SHA-256: `efdbd6312c2e97e03c6160ebeb1c7566e4420d3a2a1a36a06fd28239e4582cb6`. 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. ## tower\_durable::FinalityStateSnapshot [#tower_durablefinalitystatesnapshot] Minimal persisted snapshot of the in-memory `FinalityState`. We store only the justified and finalized epoch highwater marks; the full vote set is rebuilt from individual attestation entries on restart. ```rust #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct FinalityStateSnapshot { /// Latest epoch that reached 2/3 supermajority (justified). pub justified_epoch: u64, /// Latest epoch that was finalized (justified epoch + 1 also justified). pub finalized_epoch: u64 } ``` Source line: `73`. ## tower\_durable::DurableTowerStore [#tower_durabledurabletowerstore] Durable Tower finality store backed by AkashaKV. Stores validator registry records, per-epoch finality checkpoints, attestations (Casper FFG votes), and justified/finalized epoch markers. All multi-write operations should go through \[`TowerWriteBatch`] + \[`DurableTowerStore::commit_batch`] for crash safety. ```rust pub struct DurableTowerStore { } ``` Source line: `195`. ## tower\_durable::DurableTowerStore::open [#tower_durabledurabletowerstoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the Tower subsystem. ```rust pub fn open(path: &Path) -> Result; ``` Source line: `203`. ## tower\_durable::DurableTowerStore::get\_validator [#tower_durabledurabletowerstoreget_validator] Fetch a validator record by DID. Returns `None` if not registered. ```rust pub fn get_validator(&self, did: &str) -> Result, NodeError>; ``` Source line: `272`. ## tower\_durable::DurableTowerStore::put\_validator [#tower_durabledurabletowerstoreput_validator] Insert or replace a validator record. ```rust pub fn put_validator(&self, record: &ValidatorRecord) -> Result<(), NodeError>; ``` Source line: `281`. ## tower\_durable::DurableTowerStore::list\_all\_validators [#tower_durabledurabletowerstorelist_all_validators] Return all validator records in the store. ```rust pub fn list_all_validators(&self) -> Result, NodeError>; ``` Source line: `288`. ## tower\_durable::DurableTowerStore::get\_evidence [#tower_durabledurabletowerstoreget_evidence] Fetch accepted slashing evidence by evidence hash. ```rust pub fn get_evidence( &self, evidence_hash: &sigil_core::hash::SigilHash, ) -> Result, NodeError>; ``` Source line: `299`. ## tower\_durable::DurableTowerStore::put\_evidence [#tower_durabledurabletowerstoreput_evidence] Persist accepted slashing evidence. ```rust pub fn put_evidence(&self, evidence: &SlashingEvidence) -> Result<(), NodeError>; ``` Source line: `310`. ## tower\_durable::DurableTowerStore::get\_checkpoint [#tower_durabledurabletowerstoreget_checkpoint] Fetch a finality checkpoint by epoch. Returns `None` if not found. ```rust pub fn get_checkpoint(&self, epoch: u64) -> Result, NodeError>; ``` Source line: `319`. ## tower\_durable::DurableTowerStore::put\_checkpoint [#tower_durabledurabletowerstoreput_checkpoint] Insert or replace a finality checkpoint. ```rust pub fn put_checkpoint(&self, cp: &FinalityCheckpoint) -> Result<(), NodeError>; ``` Source line: `328`. ## tower\_durable::DurableTowerStore::list\_checkpoints [#tower_durabledurabletowerstorelist_checkpoints] Return all checkpoints ordered by epoch (ascending — big-endian key). ```rust pub fn list_checkpoints(&self) -> Result, NodeError>; ``` Source line: `335`. ## tower\_durable::DurableTowerStore::get\_finality\_state [#tower_durabledurabletowerstoreget_finality_state] Fetch the persisted finality state snapshot (justified/finalized epoch highwater marks). Returns `None` if the node has never committed finality state — callers should initialize from genesis in that case. ```rust pub fn get_finality_state(&self) -> Result, NodeError>; ``` Source line: `348`. ## tower\_durable::DurableTowerStore::put\_finality\_state [#tower_durabledurabletowerstoreput_finality_state] Persist the finality state snapshot. ```rust pub fn put_finality_state(&self, snap: &FinalityStateSnapshot) -> Result<(), NodeError>; ``` Source line: `356`. ## tower\_durable::DurableTowerStore::put\_attestation [#tower_durabledurabletowerstoreput_attestation] Store a finality vote for `(target_epoch, voter_did)`. Overwrites any previous vote by the same validator for the same epoch. ```rust pub fn put_attestation(&self, vote: &FinalityVote) -> Result<(), NodeError>; ``` Source line: `365`. ## tower\_durable::DurableTowerStore::get\_attestation [#tower_durabledurabletowerstoreget_attestation] Fetch the attestation cast by `voter_did` for `epoch`. Returns `None` if no vote has been recorded. ```rust pub fn get_attestation( &self, epoch: u64, voter_did: &str, ) -> Result, NodeError>; ``` Source line: `373`. ## tower\_durable::DurableTowerStore::list\_attestations\_for\_epoch [#tower_durabledurabletowerstorelist_attestations_for_epoch] Return all attestations cast for `epoch`. ```rust pub fn list_attestations_for_epoch(&self, epoch: u64) -> Result, NodeError>; ``` Source line: `386`. ## tower\_durable::DurableTowerStore::mark\_justified [#tower_durabledurabletowerstoremark_justified] Mark `epoch` as justified. ```rust pub fn mark_justified(&self, epoch: u64) -> Result<(), NodeError>; ``` Source line: `398`. ## tower\_durable::DurableTowerStore::is\_epoch\_justified [#tower_durabledurabletowerstoreis_epoch_justified] Returns `true` if `epoch` has been marked justified. ```rust pub fn is_epoch_justified(&self, epoch: u64) -> Result; ``` Source line: `403`. ## tower\_durable::DurableTowerStore::mark\_finalized [#tower_durabledurabletowerstoremark_finalized] Mark `epoch` as finalized. ```rust pub fn mark_finalized(&self, epoch: u64) -> Result<(), NodeError>; ``` Source line: `408`. ## tower\_durable::DurableTowerStore::is\_epoch\_finalized [#tower_durabledurabletowerstoreis_epoch_finalized] Returns `true` if `epoch` has been marked finalized. ```rust pub fn is_epoch_finalized(&self, epoch: u64) -> Result; ``` Source line: `413`. ## tower\_durable::DurableTowerStore::list\_finalized\_epochs [#tower_durabledurabletowerstorelist_finalized_epochs] Return all epoch numbers that have been marked finalized, in ascending order. ```rust pub fn list_finalized_epochs(&self) -> Result, NodeError>; ``` Source line: `419`. ## tower\_durable::DurableTowerStore::flush [#tower_durabledurabletowerstoreflush] Force a flush of AkashaKV memtables to SSTables. Useful in tests. ```rust pub fn flush(&self) -> Result<(), NodeError>; ``` Source line: `437`. ## tower\_durable::DurableTowerStore::close [#tower_durabledurabletowerstoreclose] Graceful shutdown — flushes memtables and stops background tasks. ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `444`. ## tower\_durable::DurableTowerStore::commit\_batch [#tower_durabledurabletowerstorecommit_batch] Apply all operations in `batch` atomically via a single AkashaKV MVCC transaction. Atomicity guarantee: if any individual operation fails the transaction is dropped (auto-aborted via `Drop`) before commit, leaving zero partial state visible. Either every operation in the batch lands or none do. ```rust pub fn commit_batch(&self, batch: &TowerWriteBatch) -> Result<(), NodeError>; ``` Source line: `459`. ## tower\_durable::DurableTowerStore::namespace\_prefix [#tower_durabledurabletowerstorenamespace_prefix] Test helper: return the namespace prefix used by every Tower key. ```rust pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `511`. ## tower\_durable::ArcTowerStore [#tower_durablearctowerstore] Convenience type alias for a shared durable Tower store. ```rust pub type ArcTowerStore = Arc; ``` Source line: `517`. ## tower\_durable::TowerBatchOp [#tower_durabletowerbatchop] An individual operation inside a \[`TowerWriteBatch`]. ```rust #[derive(Clone)] pub enum TowerBatchOp { /// Insert or replace a validator record. PutValidator(ValidatorRecord), /// Persist accepted slashing evidence. PutEvidence(SlashingEvidence), /// Insert or replace a finality checkpoint. PutCheckpoint(FinalityCheckpoint), /// Persist the finality state snapshot. PutFinalityState(FinalityStateSnapshot), /// Record a Casper FFG attestation. PutAttestation(FinalityVote), /// Mark an epoch as justified. MarkJustified(u64), /// Mark an epoch as finalized. MarkFinalized(u64), } ``` Source line: `525`. ## tower\_durable::TowerWriteBatch [#tower_durabletowerwritebatch] Write batch accumulating all mutations for a single Tower consensus step. Build the batch during the step handler, then call \[`crate::executor::ExecutionState::commit_tower_tx`] at the end to apply all mutations atomically. A crash before `commit_tower_tx` leaves zero partial state on disk. ```rust #[derive(Default)] pub struct TowerWriteBatch { } ``` Source line: `549`. ## tower\_durable::TowerWriteBatch::new [#tower_durabletowerwritebatchnew] Create an empty write batch. ```rust pub fn new() -> Self; ``` Source line: `555`. ## tower\_durable::TowerWriteBatch::put\_validator [#tower_durabletowerwritebatchput_validator] Queue a validator record write. ```rust pub fn put_validator(&mut self, record: ValidatorRecord); ``` Source line: `560`. ## tower\_durable::TowerWriteBatch::put\_evidence [#tower_durabletowerwritebatchput_evidence] Queue accepted slashing evidence. ```rust pub fn put_evidence(&mut self, evidence: SlashingEvidence); ``` Source line: `565`. ## tower\_durable::TowerWriteBatch::put\_checkpoint [#tower_durabletowerwritebatchput_checkpoint] Queue a finality checkpoint write. ```rust pub fn put_checkpoint(&mut self, cp: FinalityCheckpoint); ``` Source line: `570`. ## tower\_durable::TowerWriteBatch::put\_finality\_state [#tower_durabletowerwritebatchput_finality_state] Queue a finality state snapshot write. ```rust pub fn put_finality_state(&mut self, snap: FinalityStateSnapshot); ``` Source line: `575`. ## tower\_durable::TowerWriteBatch::put\_attestation [#tower_durabletowerwritebatchput_attestation] Queue an attestation write. ```rust pub fn put_attestation(&mut self, vote: FinalityVote); ``` Source line: `580`. ## tower\_durable::TowerWriteBatch::mark\_justified [#tower_durabletowerwritebatchmark_justified] Queue a justified-epoch marker write. ```rust pub fn mark_justified(&mut self, epoch: u64); ``` Source line: `585`. ## tower\_durable::TowerWriteBatch::mark\_finalized [#tower_durabletowerwritebatchmark_finalized] Queue a finalized-epoch marker write. ```rust pub fn mark_finalized(&mut self, epoch: u64); ``` Source line: `590`. ## tower\_durable::TowerWriteBatch::len [#tower_durabletowerwritebatchlen] Number of operations queued. ```rust pub fn len(&self) -> usize; ``` Source line: `595`. ## tower\_durable::TowerWriteBatch::is\_empty [#tower_durabletowerwritebatchis_empty] Returns `true` if no operations have been queued. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `600`. ## tower\_durable::TowerWriteBatch::into\_ops [#tower_durabletowerwritebatchinto_ops] Consume the batch and return the inner op list. ```rust pub fn into_ops(self) -> Vec; ``` Source line: `605`. # sigil-node · tower_runtime URL: https://docs.sigil.ml/reference/rust/sigil-node/tower_runtime Markdown: https://docs.sigil.ml/reference/rust/sigil-node/tower_runtime.md Source declarations, signatures and documentation for tower_runtime. Source: `sigil/node/sigil-node/src/tower_runtime.rs`. SHA-256: `8831e5419118b5cf96167a2aedd6ee29e33624051e4cb2cb132a61532e1bd13e`. 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. ## tower\_runtime::AttestationSender [#tower_runtimeattestationsender] A queued outbound attestation waiting to be gossiped. `BlockEngine::run` drains this channel and dispatches the message to the network layer (or logs it until the gossip transport is connected). ```rust pub type AttestationSender = mpsc::UnboundedSender; ``` Source line: `39`. ## tower\_runtime::AttestationReceiver [#tower_runtimeattestationreceiver] Receiver side — held by the gossip transport task. ```rust pub type AttestationReceiver = mpsc::UnboundedReceiver; ``` Source line: `41`. ## tower\_runtime::TowerRuntime [#tower_runtimetowerruntime] Drives Tower attestation gossip for one node. # Thread safety [#thread-safety] `TowerRuntime` is intended to be constructed once during `BlockEngine::new` and then used via shared `Arc`. All methods are `&self` and interact with execution state through the sync trait, which is `Send + Sync`. ```rust pub struct TowerRuntime { } ``` Source line: `143`. ## tower\_runtime::TowerRuntime::new [#tower_runtimetowerruntimenew] Create a new `TowerRuntime`. Returns `(runtime, receiver)`. The caller should store the `receiver` and drain it to forward attestations to the gossip transport. ```rust pub fn new( validator_did: String, signing_key: SigningKey, state: Arc, region: String, ) -> (Self, AttestationReceiver); ``` Source line: `161`. ## tower\_runtime::TowerRuntime::on\_epoch\_boundary [#tower_runtimetowerruntimeon_epoch_boundary] Called from the block production loop at every epoch boundary. If this validator is a Tower committee member, produces and emits a signed attestation, then applies it locally so the node's own vote is counted without waiting for a gossip round-trip. `block_hash` is the hash of the last block in the completing epoch (i.e. the epoch-boundary block that is the attestation target). ```rust pub fn on_epoch_boundary(&self, epoch: u64, block_hash: SigilHash) -> Result<(), NodeError>; ``` Source line: `186`. ## tower\_runtime::TowerRuntime::on\_attestation\_received [#tower_runtimetowerruntimeon_attestation_received] Called when a peer's attestation arrives on \[`GossipTopic::TowerAttestations`]. Steps: 1. Validate that `target_epoch > source_epoch`. 2. Look up the sender's public key from the Tower registry. 3. Verify the Ed25519 signature. 4. Persist via \[`commit_tower_tx`] and advance \[`FinalityState`]. ```rust pub fn on_attestation_received(&self, msg: TowerAttestationMessage) -> Result<(), NodeError>; ``` Source line: `269`. # sigil-node · username_durable URL: https://docs.sigil.ml/reference/rust/sigil-node/username_durable Markdown: https://docs.sigil.ml/reference/rust/sigil-node/username_durable.md Source declarations, signatures and documentation for username_durable. Source: `sigil/node/sigil-node/src/username_durable.rs`. SHA-256: `5e5694245d3926a18b0218daae8f43c4b02989d27c932af6936ceab4a2d5a41e`. 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. ## username\_durable::UsernameEvent [#username_durableusernameevent] Lightweight audit event appended on every username state transition. ```rust #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct UsernameEvent { pub block_height: u64, pub seq: u64, pub kind: String, pub name: String, pub actor_did: String, pub payload: serde_json::Value } ``` Source line: `174`. ## username\_durable::DurableUsernameStore [#username_durabledurableusernamestore] Durable on-chain username registry. All multi-write operations must use \[`UsernameWriteBatch`] + [`commit_batch`](Self::commit_batch). A crash before commit returns leaves zero partial state. ```rust pub struct DurableUsernameStore { } ``` Source line: `219`. ## username\_durable::DurableUsernameStore::open [#username_durabledurableusernamestoreopen] Open (or create) the store at `path`. The directory becomes the AkashaKV data root for the username subsystem. ```rust pub fn open(path: &Path) -> Result; ``` Source line: `227`. ## username\_durable::DurableUsernameStore::get [#username_durabledurableusernamestoreget] Fetch a username record by canonical name. Returns `None` if not found. ```rust pub fn get(&self, canonical_name: &str) -> Result, NodeError>; ``` Source line: `305`. ## username\_durable::DurableUsernameStore::lookup\_reverse [#username_durabledurableusernamestorelookup_reverse] Look up the primary username for a DID. Returns `None` if no primary is set. ```rust pub fn lookup_reverse(&self, owner_did: &str) -> Result, NodeError>; ``` Source line: `314`. ## username\_durable::DurableUsernameStore::get\_reverse\_record [#username_durabledurableusernamestoreget_reverse_record] Fetch the full reverse-lookup record (DID + primary). Convenience for callers that need the typed shape. ```rust pub fn get_reverse_record( &self, owner_did: &str, ) -> Result, NodeError>; ``` Source line: `325`. ## username\_durable::DurableUsernameStore::list\_for\_owner [#username_durabledurableusernamestorelist_for_owner] Return all username records owned by `did`. ```rust pub fn list_for_owner(&self, owner_did: &str) -> Result, NodeError>; ``` Source line: `337`. ## username\_durable::DurableUsernameStore::list\_all [#username_durabledurableusernamestorelist_all] Return every username record in the store. O(n); for explorer use. ```rust pub fn list_all(&self) -> Result, NodeError>; ``` Source line: `370`. ## username\_durable::DurableUsernameStore::get\_auction [#username_durabledurableusernamestoreget_auction] Fetch an auction by canonical name. Returns `None` if no auction exists for that name. ```rust pub fn get_auction(&self, canonical_name: &str) -> Result, NodeError>; ``` Source line: `382`. ## username\_durable::DurableUsernameStore::list\_all\_auctions [#username_durabledurableusernamestorelist_all_auctions] Return every auction in the store. O(n); for explorer use. ```rust pub fn list_all_auctions(&self) -> Result, NodeError>; ``` Source line: `390`. ## username\_durable::DurableUsernameStore::get\_dispute [#username_durabledurableusernamestoreget_dispute] ```rust pub fn get_dispute(&self, dispute_id: &str) -> Result, NodeError>; ``` Source line: `400`. ## username\_durable::DurableUsernameStore::list\_all\_disputes [#username_durabledurableusernamestorelist_all_disputes] ```rust pub fn list_all_disputes(&self) -> Result, NodeError>; ``` Source line: `407`. ## username\_durable::DurableUsernameStore::commit\_batch [#username_durabledurableusernamestorecommit_batch] Apply all operations in `batch` atomically inside one AkashaKV MVCC transaction. ```rust pub fn commit_batch(&self, batch: &UsernameWriteBatch) -> Result<(), NodeError>; ``` Source line: `419`. ## username\_durable::DurableUsernameStore::put\_record [#username_durabledurableusernamestoreput_record] Convenience: register a username via a one-op batch. Used by tests and simple scripts; production executor uses `commit_batch` directly. ```rust pub fn put_record(&self, record: &UsernameRecord) -> Result<(), NodeError>; ``` Source line: `485`. ## username\_durable::DurableUsernameStore::delete\_record [#username_durabledurableusernamestoredelete_record] Convenience for tests: drop a record + owner-index outside of a batch. ```rust pub fn delete_record(&self, canonical_name: &str, owner_did: &str) -> Result<(), NodeError>; ``` Source line: `495`. ## username\_durable::DurableUsernameStore::namespace\_prefix [#username_durabledurableusernamestorenamespace_prefix] Test helper: return the root namespace prefix. ```rust pub fn namespace_prefix() -> &'static [u8]; ``` Source line: `502`. ## username\_durable::DurableUsernameStore::close [#username_durabledurableusernamestoreclose] Close the underlying KV. Test helper only — the production lifecycle drops the store with the runtime. ```rust pub fn close(&self) -> Result<(), NodeError>; ``` Source line: `508`. ## username\_durable::ArcUsernameStore [#username_durablearcusernamestore] Convenience type alias for a shared durable username store. ```rust pub type ArcUsernameStore = Arc; ``` Source line: `516`. ## username\_durable::UsernameBatchOp [#username_durableusernamebatchop] One operation inside a \[`UsernameWriteBatch`]. ```rust #[derive(Clone)] pub enum UsernameBatchOp { /// Insert or replace a username record. PutRecord(Box), /// Add an owner-index entry (presence marker). IndexOwner { owner_did: String, name: String }, /// Remove an owner-index entry. DeindexOwner { owner_did: String, name: String }, /// Delete the record (release / forfeit / expiry-reclaim). DeleteRecord { name: String }, /// Set the reverse-lookup primary for a DID. SetReverse { owner_did: String, primary: String }, /// Clear the reverse-lookup primary for a DID. ClearReverse { owner_did: String }, /// Append an immutable audit event. AppendEvent(UsernameEvent), /// Insert or replace an auction record. PutAuction(Box), /// Delete an auction record (after settlement). DeleteAuction { name: String }, /// Insert or replace a dispute record. PutDispute(Box), /// Delete a dispute record (after resolution + grace). DeleteDispute { dispute_id: String }, } ``` Source line: `524`. ## username\_durable::UsernameWriteBatch [#username_durableusernamewritebatch] Mutation accumulator for one username transaction. ```rust #[derive(Default)] pub struct UsernameWriteBatch { } ``` Source line: `551`. ## username\_durable::UsernameWriteBatch::new [#username_durableusernamewritebatchnew] ```rust pub fn new() -> Self; ``` Source line: `556`. ## username\_durable::UsernameWriteBatch::put\_record [#username_durableusernamewritebatchput_record] ```rust pub fn put_record(&mut self, record: UsernameRecord); ``` Source line: `560`. ## username\_durable::UsernameWriteBatch::index\_owner [#username_durableusernamewritebatchindex_owner] ```rust pub fn index_owner(&mut self, owner_did: impl Into, name: impl Into); ``` Source line: `564`. ## username\_durable::UsernameWriteBatch::deindex\_owner [#username_durableusernamewritebatchdeindex_owner] ```rust pub fn deindex_owner(&mut self, owner_did: impl Into, name: impl Into); ``` Source line: `571`. ## username\_durable::UsernameWriteBatch::delete\_record [#username_durableusernamewritebatchdelete_record] ```rust pub fn delete_record(&mut self, name: impl Into); ``` Source line: `578`. ## username\_durable::UsernameWriteBatch::set\_reverse [#username_durableusernamewritebatchset_reverse] ```rust pub fn set_reverse(&mut self, owner_did: impl Into, primary: impl Into); ``` Source line: `583`. ## username\_durable::UsernameWriteBatch::clear\_reverse [#username_durableusernamewritebatchclear_reverse] ```rust pub fn clear_reverse(&mut self, owner_did: impl Into); ``` Source line: `590`. ## username\_durable::UsernameWriteBatch::append\_event [#username_durableusernamewritebatchappend_event] ```rust pub fn append_event(&mut self, event: UsernameEvent); ``` Source line: `596`. ## username\_durable::UsernameWriteBatch::put\_auction [#username_durableusernamewritebatchput_auction] ```rust pub fn put_auction(&mut self, auction: UsernameAuction); ``` Source line: `600`. ## username\_durable::UsernameWriteBatch::delete\_auction [#username_durableusernamewritebatchdelete_auction] ```rust pub fn delete_auction(&mut self, name: impl Into); ``` Source line: `605`. ## username\_durable::UsernameWriteBatch::put\_dispute [#username_durableusernamewritebatchput_dispute] ```rust pub fn put_dispute(&mut self, dispute: UsernameDispute); ``` Source line: `610`. ## username\_durable::UsernameWriteBatch::delete\_dispute [#username_durableusernamewritebatchdelete_dispute] ```rust pub fn delete_dispute(&mut self, dispute_id: impl Into); ``` Source line: `615`. ## username\_durable::UsernameWriteBatch::len [#username_durableusernamewritebatchlen] ```rust pub fn len(&self) -> usize; ``` Source line: `621`. ## username\_durable::UsernameWriteBatch::is\_empty [#username_durableusernamewritebatchis_empty] ```rust pub fn is_empty(&self) -> bool; ``` Source line: `625`. # sigil-node · validator_agent URL: https://docs.sigil.ml/reference/rust/sigil-node/validator_agent Markdown: https://docs.sigil.ml/reference/rust/sigil-node/validator_agent.md Source declarations, signatures and documentation for validator_agent. Source: `sigil/node/sigil-node/src/validator_agent.rs`. SHA-256: `2dc94cb294981f784f917b3bde3045fedcfd8b1fe088727c6aab89cf9692c1e7`. 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. ## validator\_agent::ValidatorAgent [#validator_agentvalidatoragent] A single validator agent with an OAS identity and Ed25519 keypair. Follows the Forge `ForgeAgentIdentity` pattern: each agent has an OAS DID, a signing key, and a lineage reference back to a human root. ```rust pub struct ValidatorAgent { } ``` Source line: `52`. ## validator\_agent::ValidatorAgent::did [#validator_agentvalidatoragentdid] The agent's OAS DID (e.g., `"did:oas:sigil:agent:testnet-validator-0"`). ```rust pub fn did(&self) -> &str; ``` Source line: `118`. ## validator\_agent::ValidatorAgent::human\_root\_did [#validator_agentvalidatoragenthuman_root_did] The human root DID that anchors this agent's lineage chain. ```rust pub fn human_root_did(&self) -> &str; ``` Source line: `123`. ## validator\_agent::ValidatorAgent::generation [#validator_agentvalidatoragentgeneration] Lineage generation depth (1 = direct child of human root). ```rust pub fn generation(&self) -> u32; ``` Source line: `128`. ## validator\_agent::ValidatorAgent::is\_producer [#validator_agentvalidatoragentis_producer] Whether this agent is a block producer (Coordinator role). ```rust pub fn is_producer(&self) -> bool; ``` Source line: `133`. ## validator\_agent::ValidatorAgent::mode [#validator_agentvalidatoragentmode] The agent's validator mode. ```rust pub fn mode(&self) -> ValidatorGenesisMode; ``` Source line: `138`. ## validator\_agent::ValidatorAgent::stake [#validator_agentvalidatoragentstake] The agent's stake in micro-MINT. ```rust pub fn stake(&self) -> u64; ``` Source line: `143`. ## validator\_agent::ValidatorAgent::sign [#validator_agentvalidatoragentsign] Sign a message with the agent's Ed25519 key. ```rust pub fn sign(&self, message: &[u8]) -> Option; ``` Source line: `148`. ## validator\_agent::ValidatorAgent::verifying\_key\_bytes [#validator_agentvalidatoragentverifying_key_bytes] The agent's verifying (public) key as 32 bytes. ```rust pub fn verifying_key_bytes(&self) -> [u8; 32]; ``` Source line: `153`. ## validator\_agent::ValidatorAgent::short\_id [#validator_agentvalidatoragentshort_id] Short display identifier for logging (DID truncated). ```rust pub fn short_id(&self) -> String; ``` Source line: `158`. ## validator\_agent::BootstrapTeam [#validator_agentbootstrapteam] The bootstrap agent team that runs the testnet from genesis. Manages the initial set of validator agents created from genesis config. Handles proposer rotation and provides agent identities for block production. External validators can register to join the team later. Follows the Forge collaboration model: * Block Producers → Coordinator role (propose blocks) * Block Validators → Worker role (validate and vote) ```rust pub struct BootstrapTeam { } ``` Source line: `189`. ## validator\_agent::BootstrapTeam::from\_genesis [#validator_agentbootstrapteamfrom_genesis] Assemble the bootstrap team from genesis validators. Each genesis validator gets an Ed25519 public identity from its genesis consensus key. Block Producers form the proposer rotation. ```rust pub fn from_genesis(genesis: &GenesisConfig) -> Result; ``` Source line: `205`. ## validator\_agent::BootstrapTeam::current\_proposer [#validator_agentbootstrapteamcurrent_proposer] Get the current block proposer's DID (round-robin rotation). ```rust pub fn current_proposer(&self) -> &str; ``` Source line: `262`. ## validator\_agent::BootstrapTeam::advance\_proposer [#validator_agentbootstrapteamadvance_proposer] Advance to the next proposer in the rotation. Returns the new proposer DID. ```rust pub fn advance_proposer(&self) -> &str; ``` Source line: `269`. ## validator\_agent::BootstrapTeam::proposer\_agent [#validator_agentbootstrapteamproposer_agent] Get the agent for the current proposer. ```rust pub fn proposer_agent(&self) -> Option<&ValidatorAgent>; ``` Source line: `276`. ## validator\_agent::BootstrapTeam::proposer\_sign [#validator_agentbootstrapteamproposer_sign] Sign data with the current proposer's key. ```rust pub fn proposer_sign(&self, data: &[u8]) -> Option; ``` Source line: `282`. ## validator\_agent::BootstrapTeam::agent\_count [#validator_agentbootstrapteamagent_count] Number of agents in the team. ```rust pub fn agent_count(&self) -> usize; ``` Source line: `287`. ## validator\_agent::BootstrapTeam::producer\_count [#validator_agentbootstrapteamproducer_count] Number of block producers in the rotation. ```rust pub fn producer_count(&self) -> usize; ``` Source line: `292`. ## validator\_agent::BootstrapTeam::total\_stake [#validator_agentbootstrapteamtotal_stake] Total staked amount across all agents. ```rust pub fn total_stake(&self) -> u64; ``` Source line: `297`. ## validator\_agent::BootstrapTeam::agent\_dids [#validator_agentbootstrapteamagent_dids] All agent DIDs. ```rust pub fn agent_dids(&self) -> Vec<&str>; ``` Source line: `302`. ## validator\_agent::BootstrapTeam::agent\_by\_did [#validator_agentbootstrapteamagent_by_did] Look up an agent by DID. ```rust pub fn agent_by_did(&self, did: &str) -> Option<&ValidatorAgent>; ``` Source line: `307`. ## validator\_agent::BootstrapTeam::validator\_agents [#validator_agentbootstrapteamvalidator_agents] Get all block validator agents (non-producers). ```rust pub fn validator_agents(&self) -> Vec<&ValidatorAgent>; ``` Source line: `312`. ## validator\_agent::BootstrapTeam::rotation\_order [#validator_agentbootstrapteamrotation_order] The proposer rotation order (DIDs of block producers). ```rust pub fn rotation_order(&self) -> &[String]; ``` Source line: `317`. # sigil-node · weave URL: https://docs.sigil.ml/reference/rust/sigil-node/weave Markdown: https://docs.sigil.ml/reference/rust/sigil-node/weave.md Source declarations, signatures and documentation for weave. Source: `sigil/node/sigil-node/src/weave.rs`. SHA-256: `6bf11846dbe99d002a296a6921e1fb13f2419245f04a25cbd7177ef9d7bcefdf`. 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. ## weave::ArtifactMetadata [#weaveartifactmetadata] Metadata supplied when publishing an off-chain artifact. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ArtifactMetadata { pub media_type: String, pub schema: String, pub producer_did: String, pub signature: Vec, pub created_height: u64 } ``` Source line: `15`. ## weave::WeaveArtifactStore [#weaveweaveartifactstore] Explicit boundary for Weave-backed content-addressed artifacts. ```rust pub trait WeaveArtifactStore: Send + Sync { fn put_artifact( &self, bytes: &[u8], metadata: ArtifactMetadata, ) -> Result; fn get_artifact(&self, cid_or_hash: &str) -> Result, NodeError>; fn verify_artifact(&self, commitment: &ArtifactCommitment, bytes: &[u8]) -> bool; fn pin_artifact(&self, commitment: &ArtifactCommitment) -> Result<(), NodeError>; fn mirror_artifact(&self, commitment: &ArtifactCommitment) -> Result<(), NodeError>; } ``` Source line: `24`. ## weave::WeftArtifactPublication [#weaveweftartifactpublication] Published Weft artifact returned by the local Sigil adapter. ```rust #[derive(Debug, Clone)] pub struct WeftArtifactPublication { pub commitment: ArtifactCommitment, pub manifest: weave_weft::manifest::WeftManifest, pub manifest_bytes: Vec, pub root_cid: String } ``` Source line: `38`. ## weave::LocalWeftArtifactStore [#weavelocalweftartifactstore] Concrete local Weft store used by Sigil RPC nodes. ```rust #[derive(Debug, Clone)] pub struct LocalWeftArtifactStore { } ``` Source line: `47`. ## weave::LocalWeftArtifactStore::open [#weavelocalweftartifactstoreopen] ```rust pub fn open(path: impl AsRef, peer_id: impl Into) -> Result; ``` Source line: `63`. ## weave::LocalWeftArtifactStore::publish\_weft\_artifact [#weavelocalweftartifactstorepublish_weft_artifact] ```rust pub fn publish_weft_artifact( &self, bytes: &[u8], metadata: ArtifactMetadata, chunk_size: Option, ) -> Result; ``` Source line: `71`. ## weave::LocalWeftArtifactStore::publish\_weft\_artifact\_reader [#weavelocalweftartifactstorepublish_weft_artifact_reader] ```rust pub fn publish_weft_artifact_reader( &self, reader: R, metadata: ArtifactMetadata, chunk_size: Option, ) -> Result; ``` Source line: `87`. ## weave::LocalWeftArtifactStore::fetch\_weft\_payload [#weavelocalweftartifactstorefetch_weft_payload] ```rust pub async fn fetch_weft_payload( &self, root: weave_weft::WeftHash, ) -> Result, NodeError>; ``` Source line: `178`. ## weave::LocalWeftArtifactStore::manifest\_bytes [#weavelocalweftartifactstoremanifest_bytes] ```rust pub fn manifest_bytes(&self, root: weave_weft::WeftHash) -> Result>, NodeError>; ``` Source line: `188`. ## weave::LocalWeftArtifactStore::status [#weavelocalweftartifactstorestatus] ```rust pub fn status(&self) -> Result; ``` Source line: `194`. ## weave::CommitmentOnlyWeaveStore [#weavecommitmentonlyweavestore] Commitment-only verifier used when the Weave model package is not linked into the node binary. Retrieval/pin/mirror fail closed. ```rust #[derive(Debug, Default, Clone, Copy)] pub struct CommitmentOnlyWeaveStore; ``` Source line: `306`. ## weave::commitment\_for\_bytes [#weavecommitment_for_bytes] Build a commitment without storing bytes. Useful for tests, RPC helpers, and future domain-specific transaction/RPC surfaces that already carry artifact metadata fields. ```rust pub fn commitment_for_bytes(bytes: &[u8], metadata: ArtifactMetadata) -> ArtifactCommitment; ``` Source line: `357`. # sigil-node · ws URL: https://docs.sigil.ml/reference/rust/sigil-node/ws Markdown: https://docs.sigil.ml/reference/rust/sigil-node/ws.md Source declarations, signatures and documentation for ws. Source: `sigil/node/sigil-node/src/ws.rs`. SHA-256: `447f928444a41a8f618d616faf200d6abd801ce50049a89c422369a17fe5f9c9`. 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. ## ws::BlockHeaderEvent [#wsblockheaderevent] A finalized block header — the event broadcast to `newBlock`. ```rust #[derive(Debug, Clone, Serialize)] pub struct BlockHeaderEvent { pub height: u64, pub hash: String, pub parent_hash: String, pub proposer_did: String, pub tx_count: usize, pub finalized_at: u64 } ``` Source line: `79`. ## ws::TxAdmittedEvent [#wstxadmittedevent] A mempool-admitted transaction header — `newTx` event. ```rust #[derive(Debug, Clone, Serialize)] pub struct TxAdmittedEvent { pub hash: String, pub kind: String, pub fee: u64, pub accepted_at: u64 } ``` Source line: `90`. ## ws::ConsensusEvent [#wsconsensusevent] A redacted consensus event — `consensus` topic. ```rust #[derive(Debug, Clone, Serialize)] pub struct ConsensusEvent { pub event: String, pub round: Option, pub at: u64 } ``` Source line: `99`. ## ws::AccountDeltaEvent [#wsaccountdeltaevent] Identity-bound receipt summary delivered only on `/ws-private`. ```rust #[derive(Debug, Clone, Serialize)] pub struct AccountDeltaEvent { pub did: String, pub tx_hash: String, pub block_height: u64, pub tx_index: u32, pub status: String, pub topics: Vec, pub state_partitions: Vec } ``` Source line: `107`. ## ws::ContractWsEvent [#wscontractwsevent] Contract event envelope delivered only on `/ws-private`. ```rust #[derive(Debug, Clone, Serialize)] pub struct ContractWsEvent { pub contract: String, pub tx_hash: String, pub block_height: u64, pub tx_index: u32, pub source: String, pub topic: String, pub data_hash: String } ``` Source line: `119`. ## ws::WsBroadcaster [#wswsbroadcaster] Shared broadcaster the node uses to fan events out to WebSocket subscribers. Cloned cheaply via `Arc`. ```rust #[derive(Clone)] pub struct WsBroadcaster { pub new_block: broadcast::Sender, pub new_tx: broadcast::Sender, pub consensus: broadcast::Sender, pub account_delta: broadcast::Sender, pub contract_event: broadcast::Sender } ``` Source line: `136`. ## ws::WsBroadcaster::publish\_block [#wswsbroadcasterpublish_block] Publish a finalized block. Called from the engine when a block reaches finality. No-op if no subscribers are connected. ```rust pub fn publish_block(&self, ev: BlockHeaderEvent); ``` Source line: `157`. ## ws::WsBroadcaster::publish\_tx [#wswsbroadcasterpublish_tx] Publish a mempool-admit event. Called from `handle_send_transaction` after admission. ```rust pub fn publish_tx(&self, ev: TxAdmittedEvent); ``` Source line: `163`. ## ws::WsBroadcaster::publish\_consensus [#wswsbroadcasterpublish_consensus] Publish a (redacted) consensus event. ```rust pub fn publish_consensus(&self, ev: ConsensusEvent); ``` Source line: `168`. ## ws::WsBroadcaster::publish\_account\_delta [#wswsbroadcasterpublish_account_delta] Publish a private account delta. Called after a block has been persisted so subscribers never see events for uncommitted state. ```rust pub fn publish_account_delta(&self, ev: AccountDeltaEvent); ``` Source line: `174`. ## ws::WsBroadcaster::publish\_contract\_event [#wswsbroadcasterpublish_contract_event] Publish a private contract event envelope. ```rust pub fn publish_contract_event(&self, ev: ContractWsEvent); ``` Source line: `179`. ## ws::BROADCASTER [#wsbroadcaster] Process-wide broadcaster. Built lazily so tests and headless boot phases do not pay the cost. ```rust pub static BROADCASTER: Lazy>; ``` Source line: `186`. ## ws::public\_ws\_handler [#wspublic_ws_handler] `GET /ws` — public read-only subscription endpoint. ```rust pub async fn public_ws_handler( State(_state): State, ws: WebSocketUpgrade, ) -> impl IntoResponse; ``` Source line: `224`. ## ws::private\_ws\_handler [#wsprivate_ws_handler] `GET /ws-private` — identity-bound subscriptions (validator profile, bearer-token authenticated). Per CA-3, identity-bound subscriptions live on a separate endpoint from the public read-only `/ws`. Authentication is a bearer token matched against the `SIGIL_WS_PRIVATE_TOKEN` env var. **Caveat — token vs. mTLS:** the dispatched D9 prompt called for mTLS or OAS DID-signed handshake. Bearer-token auth ships now because mTLS in the Sigil k8s cluster requires a validator-cert bootstrap pipeline that is not yet operational. When that lands (Phase C), the bearer check gets replaced — the endpoint surface stays the same so wallets and operators do not break. ```rust pub async fn private_ws_handler( State(state): State, headers: axum::http::HeaderMap, ws: WebSocketUpgrade, ) -> axum::response::Response; ``` Source line: `245`. ## ws::publish\_private\_receipt\_events [#wspublish_private_receipt_events] Publish identity-bound and contract-bound events from committed receipts. This is called after block persistence succeeds. The public `/ws` endpoint never sees these messages; only `/ws-private` subscribers with a valid operator token can subscribe to `account.` or `contract.
`. ```rust pub fn publish_private_receipt_events(receipts: &[Receipt]); ``` Source line: `307`. # sigil-snapshot-publisher URL: https://docs.sigil.ml/reference/rust/sigil-snapshot-publisher Markdown: https://docs.sigil.ml/reference/rust/sigil-snapshot-publisher.md Publishes verified Sigil state snapshots to the launch object store Publishes verified Sigil state snapshots to the launch object store | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-snapshot-publisher` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-snapshot-publisher/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_snapshot_publisher` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-snapshot-publisher = { path = "../sigil-snapshot-publisher" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] # sigil-state · cache URL: https://docs.sigil.ml/reference/rust/sigil-state/cache Markdown: https://docs.sigil.ml/reference/rust/sigil-state/cache.md Source declarations, signatures and documentation for cache. Source: `sigil/node/sigil-state/src/cache/mod.rs`. SHA-256: `e4f85e90674705ca900ce1c5950158c848e8c6a34c1291601dffad5d410035f5`. 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. ## cache::StateCache [#cachestatecache] LRU cache for hot blockchain state. Designed for sub-microsecond cache hits using a doubly-linked list backed by a Vec arena plus a HashMap index. Thread-safe via \[`parking_lot::RwLock`] -- reads take a shared lock, writes (put/invalidate/eviction) take an exclusive lock. ```rust #[derive(Debug)] pub struct StateCache { } ``` Source line: `13`. ## cache::CacheStats [#cachecachestats] Cache performance statistics. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CacheStats { pub hits: u64, pub misses: u64, pub size: usize, pub capacity: usize } ``` Source line: `22`. ## cache::CacheStats::hit\_rate [#cachecachestatshit_rate] Hit rate as a fraction in \[0.0, 1.0]. Returns 0.0 if no accesses. ```rust pub fn hit_rate(&self) -> f64; ``` Source line: `31`. ## cache::StateCache::new [#cachestatecachenew] Create a new cache with the given maximum capacity. # Panics [#panics] Does not panic. A capacity of 0 means no entries will ever be stored. ```rust pub fn new(capacity: usize) -> Self; ``` Source line: `234`. ## cache::StateCache::get [#cachestatecacheget] Get a value from the cache. Returns `None` on a miss. On hit, the entry is promoted to most-recently-used. This requires a write lock briefly for the promotion. ```rust pub fn get(&self, key: &[u8]) -> Option>; ``` Source line: `247`. ## cache::StateCache::put [#cachestatecacheput] Put a key-value pair into the cache. If the cache is at capacity, the least-recently-used entry is evicted. ```rust pub fn put(&self, key: Vec, value: Vec); ``` Source line: `263`. ## cache::StateCache::invalidate [#cachestatecacheinvalidate] Invalidate (remove) a key from the cache. ```rust pub fn invalidate(&self, key: &[u8]); ``` Source line: `272`. ## cache::StateCache::stats [#cachestatecachestats] Get cache performance statistics. ```rust pub fn stats(&self) -> CacheStats; ``` Source line: `278`. ## cache::StateCache::clear [#cachestatecacheclear] Clear the entire cache and reset hit/miss counters. ```rust pub fn clear(&self); ``` Source line: `289`. ## cache::StateCache::len [#cachestatecachelen] Current number of entries in the cache. ```rust pub fn len(&self) -> usize; ``` Source line: `297`. ## cache::StateCache::is\_empty [#cachestatecacheis_empty] Whether the cache is empty. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `302`. # sigil-state · commitment::proof URL: https://docs.sigil.ml/reference/rust/sigil-state/commitment-proof Markdown: https://docs.sigil.ml/reference/rust/sigil-state/commitment-proof.md Source declarations, signatures and documentation for commitment::proof. Source: `sigil/node/sigil-state/src/commitment/proof.rs`. SHA-256: `c975bdb664cbea13a581c47d3980ca3f421d737de193488bb9f0ee255b090b3a`. 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. ## commitment::proof::Side [#commitmentproofside] Which side a sibling sits on in the Merkle path. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub enum Side { Left, Right, } ``` Source line: `5`. ## commitment::proof::InclusionProof [#commitmentproofinclusionproof] An inclusion proof for a key-value pair in a \[`super::tree::CommitmentTree`]. Contains the sibling hashes along the Merkle path from the leaf to the root. Verification walks from the leaf upward, hashing with each sibling, and checks that the final hash equals the expected root. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct InclusionProof { /// The original key. pub key: Vec, /// The original value. pub value: Vec, /// Sibling hashes from leaf to root, each annotated with which side the /// sibling is on (so we know the concatenation order). pub siblings: Vec<([u8; 32], Side)> } ``` Source line: `16`. # sigil-state · commitment::tree URL: https://docs.sigil.ml/reference/rust/sigil-state/commitment-tree Markdown: https://docs.sigil.ml/reference/rust/sigil-state/commitment-tree.md Source declarations, signatures and documentation for commitment::tree. Source: `sigil/node/sigil-state/src/commitment/tree.rs`. SHA-256: `bc6a97df98b4dabd444e6177b791103f6c2b83aa70111b50d0e65d597a0fd3ba`. 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. ## commitment::tree::CommitmentTree [#commitmenttreecommitmenttree] A BLAKE3-based sparse Merkle tree for state commitments. Keys are hashed with BLAKE3 to determine their leaf position in a binary tree of depth 256. Internal nodes store `BLAKE3(left || right)`. Empty subtrees use a precomputed "default hash" at each level so that the tree is sparse -- only populated paths are stored. # Performance [#performance] * Single insert/delete: O(depth) = O(256) hash operations. * Batch insert: O(k \* depth) but with shared-path deduplication, typically much faster than k individual inserts because Merkle paths overlap. * Proof generation: O(depth). * Proof verification: O(depth). ```rust #[derive(Debug, Clone)] pub struct CommitmentTree { } ``` Source line: `23`. ## commitment::tree::CommitmentTree::new [#commitmenttreecommitmenttreenew] Create a new, empty commitment tree. ```rust pub fn new() -> Self; ``` Source line: `50`. ## commitment::tree::CommitmentTree::insert [#commitmenttreecommitmenttreeinsert] Insert or update a key-value pair. ```rust pub fn insert(&mut self, key: &[u8], value: &[u8]); ``` Source line: `60`. ## commitment::tree::CommitmentTree::batch\_insert [#commitmenttreecommitmenttreebatch_insert] Batch insert multiple key-value pairs. Recomputes shared Merkle paths only once, which is faster than individual inserts when paths overlap. ```rust pub fn batch_insert(&mut self, entries: &[(&[u8], &[u8])]); ``` Source line: `87`. ## commitment::tree::CommitmentTree::delete [#commitmenttreecommitmenttreedelete] Delete a key from the tree. ```rust pub fn delete(&mut self, key: &[u8]); ``` Source line: `120`. ## commitment::tree::CommitmentTree::root [#commitmenttreecommitmenttreeroot] Get the current root hash. Returns the default root if the tree is empty. ```rust pub fn root(&self) -> [u8; 32]; ``` Source line: `141`. ## commitment::tree::CommitmentTree::prove [#commitmenttreecommitmenttreeprove] Generate an inclusion proof for a key. Returns `None` if the key is not present in the tree. ```rust pub fn prove(&self, key: &[u8]) -> Option; ``` Source line: `154`. ## commitment::tree::CommitmentTree::verify\_proof [#commitmenttreecommitmenttreeverify_proof] Verify a proof against a known root hash. ```rust pub fn verify_proof(root: &[u8; 32], key: &[u8], value: &[u8], proof: &InclusionProof) -> bool; ``` Source line: `192`. ## commitment::tree::CommitmentTree::len [#commitmenttreecommitmenttreelen] Number of leaf entries in the tree. ```rust pub fn len(&self) -> usize; ``` Source line: `214`. ## commitment::tree::CommitmentTree::is\_empty [#commitmenttreecommitmenttreeis_empty] Whether the tree is empty. ```rust pub fn is_empty(&self) -> bool; ``` Source line: `219`. ## commitment::tree::CommitmentTree::get [#commitmenttreecommitmenttreeget] Get the value for a key, if present. ```rust pub fn get(&self, key: &[u8]) -> Option>; ``` Source line: `224`. # sigil-state · commitment URL: https://docs.sigil.ml/reference/rust/sigil-state/commitment Markdown: https://docs.sigil.ml/reference/rust/sigil-state/commitment.md Source declarations, signatures and documentation for commitment. Source: `sigil/node/sigil-state/src/commitment/mod.rs`. SHA-256: `bdee6f61f04ec959a54fff40379cf3cd7557e660301cb12f83f07f01c6f474d4`. 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. ## commitment::proof [#commitmentproof] ```rust pub mod proof; ``` Source line: `1`. ## commitment::tree [#commitmenttree] ```rust pub mod tree; ``` Source line: `2`. # sigil-state · crate URL: https://docs.sigil.ml/reference/rust/sigil-state/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-state/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-state/src/lib.rs`. SHA-256: `e94fa44c72ccbf3de13427d443b09e54e2255984c347dd3059c32d433abd7956`. 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. ## cache [#cache] # sigil-state [#sigil-state] State engine for the Sigil blockchain. Provides BLAKE3-based Merkle commitment trees, organization-partitioned state with zero cross-partition contention, incremental root computation, and a hot LRU cache layer. ## Architecture [#architecture] ```text +-----------+ +-----------------+ +------------------+ | StateCache| --> | PartitionedState| --> | CommitmentTree | | (LRU hot) | | (DashMap conc.) | | (BLAKE3 Merkle) | +-----------+ +-----------------+ +------------------+ | +------------------+ | StateRootComputer| | (incremental) | +------------------+ ``` * **CommitmentTree**: Sparse BLAKE3 Merkle tree for cryptographic state commitments. * **PartitionedState**: Organization-partitioned state with independent trees per partition. * **StateRootComputer**: Incremental global root from dirty partition roots. * **StateCache**: LRU cache with hit/miss tracking for hot state reads. ```rust pub mod cache; ``` Source line: `29`. ## commitment [#commitment] ```rust pub mod commitment; ``` Source line: `30`. ## partitions [#partitions] ```rust pub mod partitions; ``` Source line: `31`. ## roots [#roots] ```rust pub mod roots; ``` Source line: `32`. ## dao\_validators [#dao_validators] ```rust #[cfg(any(feature = "dao-validators", test))] pub mod dao_validators; ``` Source line: `35`. ## pub use cache::\{CacheStats, StateCache}; [#pub-use-cachecachestats-statecache] ```rust pub use cache::{CacheStats, StateCache}; ``` Source line: `37`. ## pub use commitment::proof::\{InclusionProof, Side}; [#pub-use-commitmentproofinclusionproof-side] ```rust pub use commitment::proof::{InclusionProof, Side}; ``` Source line: `38`. ## pub use commitment::tree::CommitmentTree; [#pub-use-commitmenttreecommitmenttree] ```rust pub use commitment::tree::CommitmentTree; ``` Source line: `39`. ## pub use partitions::\{Partition, PartitionedState}; [#pub-use-partitionspartition-partitionedstate] ```rust pub use partitions::{Partition, PartitionedState}; ``` Source line: `40`. ## pub use roots::StateRootComputer; [#pub-use-rootsstaterootcomputer] ```rust pub use roots::StateRootComputer; ``` Source line: `41`. ## ::StateError [#stateerror] Errors produced by the state engine. ```rust #[derive(Debug, thiserror::Error)] pub enum StateError { #[error("partition not found: {0}")] PartitionNotFound(String), #[error("proof verification failed")] ProofVerificationFailed, #[error("key not found")] KeyNotFound, #[error("serialization error: {0}")] Serialization(#[from] serde_json::Error), } ``` Source line: `45`. # sigil-state · dao_validators::cascade_revoke URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-cascade_revoke Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-cascade_revoke.md Source declarations, signatures and documentation for dao_validators::cascade_revoke. Source: `sigil/node/sigil-state/src/dao_validators/cascade_revoke.rs`. SHA-256: `4019c45d04c02e383647abac0c06c716c77b36c54e8092717f0b2cac730e9f69`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::cascade\_revoke::validate\_cascade\_revoke [#dao_validatorscascade_revokevalidate_cascade_revoke] Validate the issuance and effect of a cascade revocation. `descendant_did_chain` is the **already-resolved** lineage chain for the claimed descendant (from `LineageSection.human_root_chain` — ordered from the descendant's immediate parent up to the terminal root). When the descendant DID is the revocation subject itself, the chain may be empty. For `Single` revocations the chain is unused (no descendants are implicated by the record itself). ```rust #[cfg(any(feature = "dao-validators", test))] pub fn validate_cascade_revoke( snapshot: &GalSnapshot, record: &RevocationRecord, descendant_did: &str, descendant_did_chain: &[String], ) -> Result<(), DaoValidatorError>; ``` Source line: `41`. # sigil-state · dao_validators::error URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-error Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-error.md Source declarations, signatures and documentation for dao_validators::error. Source: `sigil/node/sigil-state/src/dao_validators/error.rs`. SHA-256: `2eb10ae5402f05e77fcab461aaadf6943660488d93e5c52430cde012779d384c`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::error::DaoValidatorError [#dao_validatorserrordaovalidatorerror] Structured rejection reasons for DAO state-transition validators. ```rust #[cfg(any(feature = "dao-validators", test))] #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum DaoValidatorError { // -- GAL trust path failures (consumed via `IssuerVerifier`) -------- /// The mandate issuer (or another DID required by the validator) has /// no `HmrAnchor` / `MhrAnchor` / `EnrAnchor` on the GAL. Issuer /// lineage cannot be GAL-verified. #[error("missing GAL root for '{did}'")] MissingGalRoot { /// The DID whose GAL root is missing. did: String, }, /// The DID itself, or one of its ancestors in `human_root_chain`, is /// revoked on Sigil. Cascade revocation rejects all descendants. #[error("revoked GAL subject or ancestor: '{did}'")] Revoked { /// The revoked DID (which may be an ancestor of the queried DID). did: String, }, /// The `AgentLineageProof2025` parent signature on a non-root entity /// did not verify against the parent DID document's declared /// `verificationMethod`. Bound to the specific DID whose proof /// failed. #[error("invalid parent signature for '{did}': {reason}")] InvalidParentSignature { /// The DID whose lineage proof failed. did: String, /// Detail string from the GAL trust path. reason: String, }, /// The GAL has an `OrgLineageRoot` for the entity's creator, but the /// entity's `lineage` carried no `org_inclusion_proof`. #[error("missing org inclusion proof for '{did}'")] MissingOrgInclusionProof { /// The DID whose org inclusion proof is missing. did: String, }, /// An `org_inclusion_proof` was presented but did not verify against /// the on-chain `OrgLineageRoot.merkle_root` (tampered / wrong /// subject / wrong path). #[error("invalid org inclusion proof for '{did}': {reason}")] InvalidOrgInclusionProof { /// The DID whose proof failed verification. did: String, /// Detail string from the GAL trust path. reason: String, }, /// The Sigil GAL backend was unreachable during snapshot /// construction. Validators fail closed: an unreachable GAL means /// the trust path cannot be exercised, and the state transition /// MUST be rejected rather than silently degrade. #[error("Sigil GAL unreachable for '{did}': {reason}")] GalUnreachable { /// The DID whose GAL query failed. did: String, /// Underlying transport / RPC failure detail. reason: String, }, // -- Mandate-layer failures ----------------------------------------- /// The mandate's recorded `issuer_did` was not GAL-verified by the /// snapshot — either the issuer is not a recognised root, or the /// snapshot's verifier did not classify it as a trusted issuer. /// This is distinct from `MissingGalRoot` because it accounts for /// the case where the GAL has an anchor but the issuer's role /// (HMR/MHR/ENR) is wrong for the mandate. #[error("unauthorized mandate issuer '{issuer_did}': {reason}")] UnauthorizedMandateIssuer { /// The DID stored in the mandate's `issuer_did` field. issuer_did: String, /// Detail. reason: String, }, /// The mandate did not authorize the requested spend (insufficient /// budget, scope mismatch, expired, wrong token, wrong actor, /// wrong counterparty, or any other condition surfaced by /// `Mandate::authorize_spend`). #[error("insufficient spend authority: {reason}")] InsufficientSpendAuthority { /// Detail string. Wraps `sigil_core::MandateError`. reason: String, }, // -- Labor-contract failures ---------------------------------------- /// A precondition on milestone payment release was not met — /// milestone not yet attested, attestation policy not satisfied, /// escrow unfunded, contract in the wrong state, etc. #[error("labor release condition unmet: {reason}")] LaborReleaseConditionUnmet { /// Detail string identifying which precondition failed. reason: String, }, // -- Cascade-revoke failures ---------------------------------------- /// A `RevocationRecord` with cascade kind targets a DID that is /// not a root, or its `parent_root_did` field is inconsistent with /// the declared cascade kind. #[error("cascade revoke violation: {reason}")] CascadeRevokeViolation { /// Detail string. reason: String, }, // -- Catch-all ------------------------------------------------------- /// An unexpected internal error inside a validator. Reserved for /// programming-error surfaces; consensus paths should never hit /// this in practice. #[error("internal validator error: {reason}")] Internal { /// Detail. reason: String, }, } ``` Source line: `13`. ## dao\_validators::error::DaoValidatorError::code [#dao_validatorserrordaovalidatorerrorcode] Stable error code string for telemetry / replay logs. ```rust #[cfg(any(feature = "dao-validators", test))] pub fn code(&self) -> &'static str; ``` Source line: `133`. # sigil-state · dao_validators::labor_release URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-labor_release Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-labor_release.md Source declarations, signatures and documentation for dao_validators::labor_release. Source: `sigil/node/sigil-state/src/dao_validators/labor_release.rs`. SHA-256: `885174b891c6cb24467c392c31829e431d7361ecc83c789756a1d618120b4d17`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::labor\_release::validate\_labor\_contract\_release [#dao_validatorslabor_releasevalidate_labor_contract_release] Validate a milestone payment release. Returns the \[`MandateClearance`] for the spend the caller MUST then atomically apply (decrement the mandate's remaining budget AND mark the milestone `Paid`). ```rust #[cfg(any(feature = "dao-validators", test))] pub fn validate_labor_contract_release( snapshot: &GalSnapshot, contract: &LaborContract, milestone_index: u32, mandate: &Mandate, spend: &SpendRequest<'_>, ) -> Result; ``` Source line: `36`. # sigil-state · dao_validators::mandate_spend URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-mandate_spend Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-mandate_spend.md Source declarations, signatures and documentation for dao_validators::mandate_spend. Source: `sigil/node/sigil-state/src/dao_validators/mandate_spend.rs`. SHA-256: `aa6c82116cdfc0ab2d0a0101a948c0fd06af18933e66b805c6845b5d89b2c53d`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::mandate\_spend::validate\_mandate\_spend [#dao_validatorsmandate_spendvalidate_mandate_spend] Validate a mandate spend against the GAL snapshot. Returns the \[`MandateClearance`] that callers MUST then atomically apply (decrementing remaining budget on the on-chain `Mandate` record). Trust path enforced, in order: 1. **Issuer GAL-verified** — `mandate.issuer_did` MUST resolve to `IssuerTrust::Verified` in the snapshot. Any other variant promotes to its corresponding `DaoValidatorError`. 2. **Actor not revoked** — the actor whose spend is being recorded MUST not be revoked on Sigil (snapshot's raw revocation entry). 3. **Counterparty not revoked** — same check on the receiving DID. 4. **Mandate authorizes spend** — delegates to \[`Mandate::authorize_spend`] which enforces token, scope, per-tx limit, total budget, expiration, allowed counterparty, and active-status invariants. Any failure surfaces as \[`DaoValidatorError::InsufficientSpendAuthority`]. No "trusted caller" shortcut: the only way to construct a \[`GalSnapshot`] is through \[`super::snapshot::build_snapshot`] (or, in tests, the crate-private `test_support` helpers). ```rust #[cfg(any(feature = "dao-validators", test))] pub fn validate_mandate_spend( snapshot: &GalSnapshot, mandate: &Mandate, request: &SpendRequest<'_>, ) -> Result; ``` Source line: `42`. # sigil-state · dao_validators::snapshot URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-snapshot Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators-snapshot.md Source declarations, signatures and documentation for dao_validators::snapshot. Source: `sigil/node/sigil-state/src/dao_validators/snapshot.rs`. SHA-256: `f07f7133cc4c0fde8c6627d082b812d13ce243acf2a9f28fe08f3e2bc8ece41a`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::snapshot::IssuerTrust [#dao_validatorssnapshotissuertrust] Outcome of running the GAL trust path on a single subject DID. This captures the resolver-level result without leaking the async resolver machinery into validator code. ```rust #[cfg(any(feature = "dao-validators", test))] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "kind", rename_all = "snake_case")] pub enum IssuerTrust { /// The full GAL trust path (Rules 1-7) accepts this issuer: /// /// - revocation-first: not revoked /// - root anchor present, status `"active"`, anchored in the past /// - non-root issuers presented a valid `AgentLineageProof2025` /// - if the GAL has an `OrgLineageRoot` for the creator, the /// inclusion proof verified Verified { /// The terminal root anchor that grounds this issuer. anchor: GalRootAnchor, /// The on-chain `OrgLineageRoot` for this issuer when it is an /// MHR / ENR org. `None` for HMRs and for orgs that haven't /// published a Merkle commitment yet. org_root: Option, }, /// The GAL has no terminal root anchor for this DID (or any /// ancestor). The trust path cannot ground the issuer. MissingRoot, /// The DID, or one of its ancestors, is revoked on Sigil. Cascade /// revocation rejects. Revoked { /// The specific revoked DID (issuer itself or an ancestor). revoked_did: String, }, /// A non-root issuer presented a `derivation_proof` that did not /// verify against the parent's declared `verificationMethod`, OR /// the proof was missing entirely. ParentSignatureInvalid { /// The DID whose proof failed. did: String, /// Free-form detail. reason: String, }, /// The GAL has an `OrgLineageRoot` for the creator, but the entity /// presented no inclusion proof. OrgInclusionMissing { /// The DID with the missing proof. did: String, }, /// An `org_inclusion_proof` was present but did not verify against /// the on-chain Merkle root. OrgInclusionInvalid { /// The DID whose proof failed. did: String, /// Free-form detail. reason: String, }, /// The GAL backend was unreachable. Validators MUST treat this as a /// hard rejection. Unreachable { /// Free-form transport detail. reason: String, }, } ``` Source line: `32`. ## dao\_validators::snapshot::IssuerTrust::is\_verified [#dao_validatorssnapshotissuertrustis_verified] True iff the issuer is fully GAL-verified for the recorded block height. ```rust #[cfg(any(feature = "dao-validators", test))] pub fn is_verified(&self) -> bool; ``` Source line: `91`. ## dao\_validators::snapshot::IssuerTrust::to\_error [#dao_validatorssnapshotissuertrustto_error] Promote this trust verdict into a typed validator error. Used by validators when they encounter a non-`Verified` outcome. ```rust #[cfg(any(feature = "dao-validators", test))] pub fn to_error(&self, fallback_did: &str) -> DaoValidatorError; ``` Source line: `97`. ## dao\_validators::snapshot::GalSnapshot [#dao_validatorssnapshotgalsnapshot] Canonical, sync, replay-safe GAL view consumed by validators. The snapshot is keyed by DID. Validators look up the issuer DID, the actor DID, and any ancestor DIDs from this single in-memory map. Building the snapshot is async (it talks to the GAL); validation is sync. ```rust #[cfg(any(feature = "dao-validators", test))] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct GalSnapshot { /// Block height at which the snapshot was taken. Validators MUST /// use this rather than wall-clock time, so replay is deterministic. pub snapshot_block: u64, /// Per-DID trust verdicts. `BTreeMap` for deterministic iteration. pub issuer_trust: BTreeMap, /// Per-DID revocation status (raw GAL data). Used by cascade-revoke /// validators that need to walk lineage chains independently of the /// `IssuerTrust::Verified` outcome. pub revocations: BTreeMap } ``` Source line: `140`. ## dao\_validators::snapshot::GalSnapshot::require\_trust [#dao_validatorssnapshotgalsnapshotrequire_trust] Look up an issuer's trust verdict, or return `DaoValidatorError::Internal` when the snapshot did not include the DID. (This is a programmer-error surface — validators must always pre-populate every DID they will reference.) ```rust #[cfg(any(feature = "dao-validators", test))] pub fn require_trust(&self, did: &str) -> Result<&IssuerTrust, DaoValidatorError>; ``` Source line: `157`. ## dao\_validators::snapshot::GalSnapshot::require\_revocation [#dao_validatorssnapshotgalsnapshotrequire_revocation] Look up the raw revocation status for a DID. Returns `Internal` when missing. ```rust #[cfg(any(feature = "dao-validators", test))] pub fn require_revocation(&self, did: &str) -> Result<&GalRevocationStatus, DaoValidatorError>; ``` Source line: `167`. ## dao\_validators::snapshot::IssuerVerifier [#dao_validatorssnapshotissuerverifier] Async trait that produces a single-issuer trust verdict by consuming the live GAL trust path. Production wires this to a thin wrapper over `oas_resolve::SigilGuardedResolver`; tests wire it to a `MemoryGalSource`-backed implementation. The trait is async because the underlying GAL queries are async; the snapshot itself is sync. ```rust #[cfg(any(feature = "dao-validators", test))] #[async_trait] pub trait IssuerVerifier: Send + Sync { /// Resolve the GAL trust verdict for `did`. Implementations MUST: /// /// - run revocation-first /// - reject anchors whose status is not `"active"` or whose /// `anchored_at_block` is in the future /// - exercise parent-signature verification on non-root issuers /// - exercise org Merkle inclusion when the GAL has a root for the /// creator /// /// Failures from the GAL trust path become `IssuerTrust` failure /// variants; the result is `Err` only for `IssuerVerifier`-level /// programming errors (which validators surface as /// [`DaoValidatorError::Internal`]). async fn verify_issuer(&self, did: &str) -> Result; } ``` Source line: `184`. ## dao\_validators::snapshot::build\_snapshot [#dao_validatorssnapshotbuild_snapshot] Build a `GalSnapshot` covering every DID a validator will reference. `subject_dids` is the union of (issuer, actor, every ancestor in the human\_root\_chain). The builder issues: * one `IssuerVerifier::verify_issuer` per DID — the live GAL trust path, recorded as the snapshot's `issuer_trust` entry. * one `SigilGalSource::check_revocation` per DID — captured in `revocations` for cascade-revoke validators that walk lineage. Failures from the GAL itself surface as `IssuerTrust::Unreachable` inside the verdict; transport errors during the raw `check_revocation` calls bubble up as \[`DaoValidatorError::GalUnreachable`]. ```rust #[cfg(any(feature = "dao-validators", test))] pub async fn build_snapshot( verifier: &V, gal: &G, snapshot_block: u64, subject_dids: &[String], ) -> Result where V: IssuerVerifier + ?Sized, G: SigilGalSource + ?Sized,; ``` Source line: `215`. # sigil-state · dao_validators URL: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators Markdown: https://docs.sigil.ml/reference/rust/sigil-state/dao_validators.md Source declarations, signatures and documentation for dao_validators. Source: `sigil/node/sigil-state/src/dao_validators/mod.rs`. SHA-256: `d58c7877e6981a4f5b3dc442279eb16f5c167826c3100a4ece5bacd4682901c6`. 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. Module condition: ```rust #[cfg(any(feature = "dao-validators", test))] ``` ## dao\_validators::cascade\_revoke [#dao_validatorscascade_revoke] DAO Work OS state-transition validators (Phase 2). All validators in this module consume the \*\*live GAL trust path through \[`snapshot::IssuerVerifier`]. Production wires this to a thin wrapper over `oas_resolve::SigilGuardedResolver` (Rules 1–7 cryptographically enforced); tests wire it via a `MemoryGalSource`-backed verifier. There is no local-only issuer check or trusted-caller shortcut — the only public path that produces a validator-consumable \[`snapshot::GalSnapshot`] is the async \[`snapshot::build_snapshot`] function. ## Phase 2 priorities [#phase-2-priorities] 1. \[`mandate_spend::validate_mandate_spend`] — every state transition that decreases a mandate's remaining budget routes through this validator. 2. \[`labor_release::validate_labor_contract_release`] — milestone payment release; composes the mandate spend validator after contract-state and milestone preconditions. 3. \[`cascade_revoke::validate_cascade_revoke`] — issuer-authority plus descendant-capture checks for `RevocationRecord`s with `CascadeRoot` / `CascadeOrg` kinds (and `Single` consistency). ## Determinism / replay-safety [#determinism--replay-safety] Each validator is a sync function over `(GalSnapshot, on-chain record, request)`. The snapshot itself is `Serialize + Deserialize + PartialEq`, so consensus replay producing the same snapshot deterministically produces the same verdict. ```rust #[cfg(any(feature = "dao-validators", test))] pub mod cascade_revoke; ``` Source line: `31`. ## dao\_validators::error [#dao_validatorserror] ```rust #[cfg(any(feature = "dao-validators", test))] pub mod error; ``` Source line: `32`. ## dao\_validators::labor\_release [#dao_validatorslabor_release] ```rust #[cfg(any(feature = "dao-validators", test))] pub mod labor_release; ``` Source line: `33`. ## dao\_validators::mandate\_spend [#dao_validatorsmandate_spend] ```rust #[cfg(any(feature = "dao-validators", test))] pub mod mandate_spend; ``` Source line: `34`. ## dao\_validators::snapshot [#dao_validatorssnapshot] ```rust #[cfg(any(feature = "dao-validators", test))] pub mod snapshot; ``` Source line: `35`. ## pub use cascade\_revoke::validate\_cascade\_revoke; [#pub-use-cascade_revokevalidate_cascade_revoke] ```rust #[cfg(any(feature = "dao-validators", test))] pub use cascade_revoke::validate_cascade_revoke; ``` Source line: `37`. ## pub use error::DaoValidatorError; [#pub-use-errordaovalidatorerror] ```rust #[cfg(any(feature = "dao-validators", test))] pub use error::DaoValidatorError; ``` Source line: `38`. ## pub use labor\_release::validate\_labor\_contract\_release; [#pub-use-labor_releasevalidate_labor_contract_release] ```rust #[cfg(any(feature = "dao-validators", test))] pub use labor_release::validate_labor_contract_release; ``` Source line: `39`. ## pub use mandate\_spend::validate\_mandate\_spend; [#pub-use-mandate_spendvalidate_mandate_spend] ```rust #[cfg(any(feature = "dao-validators", test))] pub use mandate_spend::validate_mandate_spend; ``` Source line: `40`. ## pub use snapshot::\{build\_snapshot, GalSnapshot, IssuerTrust, IssuerVerifier}; [#pub-use-snapshotbuild_snapshot-galsnapshot-issuertrust-issuerverifier] ```rust #[cfg(any(feature = "dao-validators", test))] pub use snapshot::{build_snapshot, GalSnapshot, IssuerTrust, IssuerVerifier}; ``` Source line: `41`. # sigil-state URL: https://docs.sigil.ml/reference/rust/sigil-state Markdown: https://docs.sigil.ml/reference/rust/sigil-state.md Sigil blockchain state engine — commitment trees, partitions, roots, cache Sigil blockchain state engine — commitment trees, partitions, roots, cache | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-state` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-state/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_state` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-state = { path = "../sigil-state" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | ---------------- | ------------------------------------------------------ | | `default` | No additional feature dependencies | | `dao-validators` | `dep:sigil-core`, `dep:oas-resolve`, `dep:async-trait` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-state/crate) — 11 declarations * [cache](/reference/rust/sigil-state/cache) — 11 declarations * [commitment](/reference/rust/sigil-state/commitment) — 2 declarations * [commitment::proof](/reference/rust/sigil-state/commitment-proof) — 2 declarations * [commitment::tree](/reference/rust/sigil-state/commitment-tree) — 11 declarations * [partitions](/reference/rust/sigil-state/partitions) — 20 declarations * [roots](/reference/rust/sigil-state/roots) — 6 declarations * [dao\_validators](/reference/rust/sigil-state/dao_validators) — 10 declarations * [dao\_validators::cascade\_revoke](/reference/rust/sigil-state/dao_validators-cascade_revoke) — 1 declarations * [dao\_validators::error](/reference/rust/sigil-state/dao_validators-error) — 2 declarations * [dao\_validators::labor\_release](/reference/rust/sigil-state/dao_validators-labor_release) — 1 declarations * [dao\_validators::mandate\_spend](/reference/rust/sigil-state/dao_validators-mandate_spend) — 1 declarations * [dao\_validators::snapshot](/reference/rust/sigil-state/dao_validators-snapshot) — 8 declarations # sigil-state · partitions URL: https://docs.sigil.ml/reference/rust/sigil-state/partitions Markdown: https://docs.sigil.ml/reference/rust/sigil-state/partitions.md Source declarations, signatures and documentation for partitions. Source: `sigil/node/sigil-state/src/partitions/mod.rs`. SHA-256: `150d5ca65e23ccf2e8607c4e6ad656a0167491fc740eff22e1327b779959eb42`. 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. ## partitions::CONSENSUS [#partitionsconsensus] Well-known system partition names. ```rust pub const CONSENSUS: &str; ``` Source line: `7`. ## partitions::STAKES [#partitionsstakes] ```rust pub const STAKES: &str; ``` Source line: `8`. ## partitions::IDENTITY [#partitionsidentity] ```rust pub const IDENTITY: &str; ``` Source line: `9`. ## partitions::MARS [#partitionsmars] ```rust pub const MARS: &str; ``` Source line: `10`. ## partitions::GOVERNANCE [#partitionsgovernance] ```rust pub const GOVERNANCE: &str; ``` Source line: `11`. ## partitions::COMPUTE [#partitionscompute] ```rust pub const COMPUTE: &str; ``` Source line: `12`. ## partitions::TOWER [#partitionstower] Tower coordination chain state (validator registry, slots, committees, finality). ```rust pub const TOWER: &str; ``` Source line: `14`. ## partitions::GAL [#partitionsgal] Global Anchor Layer state (MARS-S shard assignments, topology, root anchors). ```rust pub const GAL: &str; ``` Source line: `16`. ## partitions::NOVA [#partitionsnova] Nova metaverse world state (parcel ownership, buildings, avatars, zones). ```rust pub const NOVA: &str; ``` Source line: `18`. ## partitions::PartitionedState [#partitionspartitionedstate] Organization-partitioned state. Each partition is independent -- zero cross-partition contention thanks to \[`DashMap`] sharded locking. ## System partitions [#system-partitions] * `consensus`: validator set, epoch data * `stakes`: staking balances, delegations * `identity`: OAS identity state * `mars`: MARS anchoring state * `governance`: proposals, votes * `compute`: compute provider state * `tower`: Tower coordination chain state * `gal`: Global Anchor Layer (MARS-S sharding) state * `nova`: Nova metaverse world state ## Organization partitions [#organization-partitions] Per-organization partitions are named `org_{did}` and created on demand. ```rust #[derive(Debug)] pub struct PartitionedState { } ``` Source line: `39`. ## partitions::Partition [#partitionspartition] A single state partition backed by a \[`CommitmentTree`]. ```rust #[derive(Debug, Clone)] pub struct Partition { pub name: String, pub tree: CommitmentTree, pub dirty: bool } ``` Source line: `45`. ## partitions::PartitionedState::new [#partitionspartitionedstatenew] Create a new partitioned state with the well-known system partitions pre-created (empty). ```rust pub fn new() -> Self; ``` Source line: `65`. ## partitions::PartitionedState::partition [#partitionspartitionedstatepartition] Get or create a partition by name. Returns a mutable reference. Organization partitions are created on-demand with the naming convention `org_{did}`. ```rust pub fn partition(&self, name: &str) -> RefMut<'_, String, Partition>; ``` Source line: `79`. ## partitions::PartitionedState::insert [#partitionspartitionedstateinsert] Insert a key-value pair into a specific partition. ```rust pub fn insert(&self, partition: &str, key: &[u8], value: &[u8]); ``` Source line: `86`. ## partitions::PartitionedState::get [#partitionspartitionedstateget] Get a value from a specific partition. ```rust pub fn get(&self, partition: &str, key: &[u8]) -> Option>; ``` Source line: `93`. ## partitions::PartitionedState::delete [#partitionspartitionedstatedelete] Delete a key from a specific partition. ```rust pub fn delete(&self, partition: &str, key: &[u8]); ``` Source line: `99`. ## partitions::PartitionedState::partition\_root [#partitionspartitionedstatepartition_root] Get the root hash for a specific partition. ```rust pub fn partition_root(&self, partition: &str) -> Option<[u8; 32]>; ``` Source line: `106`. ## partitions::PartitionedState::partition\_names [#partitionspartitionedstatepartition_names] List all partition names (sorted for determinism). ```rust pub fn partition_names(&self) -> Vec; ``` Source line: `112`. ## partitions::PartitionedState::has\_partition [#partitionspartitionedstatehas_partition] Check if a partition exists. ```rust pub fn has_partition(&self, name: &str) -> bool; ``` Source line: `119`. ## partitions::PartitionedState::partition\_count [#partitionspartitionedstatepartition_count] Total number of partitions. ```rust pub fn partition_count(&self) -> usize; ``` Source line: `124`. # sigil-state · roots URL: https://docs.sigil.ml/reference/rust/sigil-state/roots Markdown: https://docs.sigil.ml/reference/rust/sigil-state/roots.md Source declarations, signatures and documentation for roots. Source: `sigil/node/sigil-state/src/roots/mod.rs`. SHA-256: `45ba1b6261b08605c843470c43532975a750f10c35a03318764ae78fdbc13807`. 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. ## roots::StateRootComputer [#rootsstaterootcomputer] Computes the global state root from all partition roots. Only recomputes partition roots that have been marked dirty since the last computation. The global root is `BLAKE3(sorted partition roots concatenated)`. ## Incremental computation [#incremental-computation] When only a few partitions change per block, `compute_root` avoids re-hashing unchanged partition trees. It caches the last-known root for each partition and only re-reads dirty ones. ```rust #[derive(Debug, Clone)] pub struct StateRootComputer { } ``` Source line: `16`. ## roots::StateRootComputer::new [#rootsstaterootcomputernew] Create a new state root computer. ```rust pub fn new() -> Self; ``` Source line: `27`. ## roots::StateRootComputer::mark\_dirty [#rootsstaterootcomputermark_dirty] Mark a partition as dirty (needs its root re-read next computation). ```rust pub fn mark_dirty(&mut self, partition: &str); ``` Source line: `36`. ## roots::StateRootComputer::compute\_root [#rootsstaterootcomputercompute_root] Compute the global state root from all partition roots. On first call, reads all partition roots. On subsequent calls, only re-reads partitions that have been marked dirty via \[`mark_dirty`]. Also detects new partitions that were not present in the previous computation. After computation, the dirty set is cleared and partition dirty flags are reset. ```rust pub fn compute_root(&mut self, state: &PartitionedState) -> [u8; 32]; ``` Source line: `49`. ## roots::StateRootComputer::reset [#rootsstaterootcomputerreset] Reset dirty tracking without computing a root. ```rust pub fn reset(&mut self); ``` Source line: `101`. ## roots::StateRootComputer::dirty\_count [#rootsstaterootcomputerdirty_count] Number of partitions currently dirty. ```rust pub fn dirty_count(&self) -> usize; ``` Source line: `108`. # sigil-system-kernel-1 · crate URL: https://docs.sigil.ml/reference/rust/sigil-system-kernel-1/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-system-kernel-1/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../contracts/system/sigil-system-kernel-1/src/lib.rs`. SHA-256: `7e1ce3ba4ed688b51996e5d48845611d54ecc029e91a36c806a970c6a0d02527`. 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. ## ::anvil\_alloc [#anvil_alloc] ```rust #[no_mangle] pub extern "C" fn anvil_alloc(len: i32) -> i32; ``` Source line: `22`. ## ::anvil\_init [#anvil_init] ```rust #[no_mangle] pub extern "C" fn anvil_init(ptr: i32, len: i32) -> i32; ``` Source line: `34`. ## ::anvil\_call [#anvil_call] ```rust #[no_mangle] pub extern "C" fn anvil_call(ptr: i32, len: i32) -> i32; ``` Source line: `43`. # sigil-system-kernel-1 URL: https://docs.sigil.ml/reference/rust/sigil-system-kernel-1 Markdown: https://docs.sigil.ml/reference/rust/sigil-system-kernel-1.md sigil-system-kernel-1 implementation in the Sigil workspace. sigil-system-kernel-1 implementation in the Sigil workspace. | Property | Source value | | ---------------- | ----------------------------------------------------------------- | | Package | `sigil-system-kernel-1` | | Manifest version | `1.0.0` | | Source | `sigil/node/../contracts/system/sigil-system-kernel-1/Cargo.toml` | | Reference status | source reference | | Publish flag | `false`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_system_kernel_1` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-system-kernel-1 = { path = "../sigil-system-kernel-1" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-system-kernel-1/crate) — 3 declarations # sigil-storage · akashakv_store URL: https://docs.sigil.ml/reference/rust/sigil-storage/akashakv_store Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/akashakv_store.md Source declarations, signatures and documentation for akashakv_store. Source: `sigil/node/sigil-storage/src/akashakv_store.rs`. SHA-256: `f74807ad1cda407fced1741a4aaea0ffaf4e56191710cecab8b3b463b63df180`. 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. Module condition: ```rust #[cfg(feature = "akashakv-backend")] ``` ## akashakv\_store::AKASHAKV\_KEYSPACES [#akashakv_storeakashakv_keyspaces] AkashaKV keyspaces reserved for Sigil production storage. ```rust #[cfg(feature = "akashakv-backend")] pub const AKASHAKV_KEYSPACES: &[&str]; ``` Source line: `31`. ## akashakv\_store::production\_akashakv\_config [#akashakv_storeproduction_akashakv_config] Bounded AkashaKV profile for Sigil node processes. AkashaKV's standalone defaults are intentionally generous for a single database. A full Sigil node opens many feature stores in one process, so using those defaults per store can exceed production pod limits during restart. Keep all stores enabled, but cap per-store startup memory. ```rust #[cfg(feature = "akashakv-backend")] pub fn production_akashakv_config(path: &Path) -> AkConfig; ``` Source line: `59`. ## akashakv\_store::AkashaKvStore [#akashakv_storeakashakvstore] Production AkashaKV store implementing all Sigil storage traits. ```rust #[cfg(feature = "akashakv-backend")] pub struct AkashaKvStore { } ``` Source line: `95`. ## akashakv\_store::AkashaKvBlockStore [#akashakv_storeakashakvblockstore] Block-store view over the unified AkashaKV backend. ```rust #[cfg(feature = "akashakv-backend")] pub type AkashaKvBlockStore = AkashaKvStore; ``` Source line: `124`. ## akashakv\_store::AkashaKvStateStore [#akashakv_storeakashakvstatestore] State-store view over the unified AkashaKV backend. ```rust #[cfg(feature = "akashakv-backend")] pub type AkashaKvStateStore = AkashaKvStore; ``` Source line: `126`. ## akashakv\_store::AkashaKvReceiptStore [#akashakv_storeakashakvreceiptstore] Receipt-store view over the unified AkashaKV backend. ```rust #[cfg(feature = "akashakv-backend")] pub type AkashaKvReceiptStore = AkashaKvStore; ``` Source line: `128`. ## akashakv\_store::AkashaKvStore::open [#akashakv_storeakashakvstoreopen] Open or create a Sigil AkashaKV store at `path`. ```rust #[cfg(feature = "akashakv-backend")] pub fn open(path: &Path) -> Result; ``` Source line: `132`. ## akashakv\_store::AkashaKvStore::flush [#akashakv_storeakashakvstoreflush] Force AkashaKV memtables to disk. Tests and migration use this before reopening or atomically promoting a staging directory. ```rust #[cfg(feature = "akashakv-backend")] pub fn flush(&self) -> Result<(), StorageError>; ``` Source line: `160`. ## akashakv\_store::AkashaKvStore::akashakv\_revision [#akashakv_storeakashakvstoreakashakv_revision] Revision contract enforced by launch-readiness checks. ```rust #[cfg(feature = "akashakv-backend")] pub fn akashakv_revision(&self) -> &'static str; ``` Source line: `166`. ## akashakv\_store::akashakv\_key\_for\_test [#akashakv_storeakashakv_key_for_test] Exposed only for exact-key regression tests. ```rust #[cfg(feature = "akashakv-backend")] pub fn akashakv_key_for_test(parts: &[&[u8]]) -> Result, StorageError>; ``` Source line: `496`. # sigil-storage · config URL: https://docs.sigil.ml/reference/rust/sigil-storage/config Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/config.md Source declarations, signatures and documentation for config. Source: `sigil/node/sigil-storage/src/config.rs`. SHA-256: `6274aeb9505bb60952d77c4eaf728ad507e60f43f53c928bfff7e7d3d3cde720`. 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. ## config::StorageConfig [#configstorageconfig] Configuration for persistent storage backends. ```rust #[derive(Debug, Clone)] pub struct StorageConfig { /// Root directory for all database files. pub data_dir: PathBuf, /// Backend block cache size in megabytes. pub cache_size_mb: usize } ``` Source line: `7`. # sigil-storage · crate URL: https://docs.sigil.ml/reference/rust/sigil-storage/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-storage/src/lib.rs`. SHA-256: `894cb149afb7e4dfb1bc25c788c97e696186138772635043567437170aaca657`. 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. ## akashakv\_store [#akashakv_store] ```rust #[cfg(feature = "akashakv-backend")] pub mod akashakv_store; ``` Source line: `6`. ## config [#config] ```rust pub mod config; ``` Source line: `7`. ## da [#da] ```rust pub mod da; ``` Source line: `8`. ## error [#error] ```rust pub mod error; ``` Source line: `9`. ## gal\_storage [#gal_storage] ```rust pub mod gal_storage; ``` Source line: `10`. ## memory [#memory] ```rust pub mod memory; ``` Source line: `11`. ## rocksdb\_store [#rocksdb_store] ```rust #[cfg(feature = "legacy-rocksdb-import")] pub mod rocksdb_store; ``` Source line: `13`. ## traits [#traits] ```rust pub mod traits; ``` Source line: `14`. ## pub use akashakv\_store::\{ [#pub-use-akashakv_store] AKASHAKV\_KEYSPACES, AkashaKvBlockStore, AkashaKvReceiptStore, AkashaKvStateStore, AkashaKvStore, akashakv\_key\_for\_test, production\_akashakv\_config, }; ```rust #[cfg(feature = "akashakv-backend")] pub use akashakv_store::{ AKASHAKV_KEYSPACES, AkashaKvBlockStore, AkashaKvReceiptStore, AkashaKvStateStore, AkashaKvStore, akashakv_key_for_test, production_akashakv_config, }; ``` Source line: `17`. ## pub use config::StorageConfig; [#pub-use-configstorageconfig] ```rust pub use config::StorageConfig; ``` Source line: `21`. ## pub use da::\{DaFragment, DaSampleRequest, DaSampleResponse}; [#pub-use-dadafragment-dasamplerequest-dasampleresponse] ```rust pub use da::{DaFragment, DaSampleRequest, DaSampleResponse}; ``` Source line: `22`. ## pub use error::StorageError; [#pub-use-errorstorageerror] ```rust pub use error::StorageError; ``` Source line: `23`. ## pub use gal\_storage::\{ [#pub-use-gal_storage] PARTITION\_ENR, PARTITION\_HMR, PARTITION\_MHR, PARTITION\_ORG\_ROOT, PARTITION\_REVOCATION, PARTITION\_SHARD\_ASSIGNMENT, PARTITION\_SHARD\_TOPOLOGY, PARTITIONS, cascade\_revoke, key\_for\_did, topology\_key, }; ```rust pub use gal_storage::{ PARTITION_ENR, PARTITION_HMR, PARTITION_MHR, PARTITION_ORG_ROOT, PARTITION_REVOCATION, PARTITION_SHARD_ASSIGNMENT, PARTITION_SHARD_TOPOLOGY, PARTITIONS, cascade_revoke, key_for_did, topology_key, }; ``` Source line: `24`. ## pub use memory::\{MemoryBlockStore, MemoryReceiptStore, MemoryStateStore}; [#pub-use-memorymemoryblockstore-memoryreceiptstore-memorystatestore] ```rust pub use memory::{MemoryBlockStore, MemoryReceiptStore, MemoryStateStore}; ``` Source line: `29`. ## pub use rocksdb\_store::\{RocksDbBlockStore, RocksDbReceiptStore, RocksDbStateStore}; [#pub-use-rocksdb_storerocksdbblockstore-rocksdbreceiptstore-rocksdbstatestore] ```rust #[cfg(feature = "legacy-rocksdb-import")] pub use rocksdb_store::{RocksDbBlockStore, RocksDbReceiptStore, RocksDbStateStore}; ``` Source line: `31`. ## pub use traits::\{BlockStore, KeyValuePair, ReceiptStore, StateStore}; [#pub-use-traitsblockstore-keyvaluepair-receiptstore-statestore] ```rust pub use traits::{BlockStore, KeyValuePair, ReceiptStore, StateStore}; ``` Source line: `32`. # sigil-storage · da URL: https://docs.sigil.ml/reference/rust/sigil-storage/da Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/da.md Source declarations, signatures and documentation for da. Source: `sigil/node/sigil-storage/src/da.rs`. SHA-256: `9d28d40f0ca4d1b2413693be084db6fd3917a49033da988d30bf43b93be1fa52`. 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. ## da::DaFragment [#dadafragment] An erasure-coded fragment of a block for data availability sampling. Blocks are split into `total_fragments` pieces using Reed-Solomon coding so that any subset of sufficient size can reconstruct the original block. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DaFragment { /// Height of the block this fragment belongs to. pub block_height: u64, /// Zero-based index of this fragment within the coding scheme. pub fragment_index: u32, /// Total number of fragments the block was split into. pub total_fragments: u32, /// The encoded fragment bytes. pub data: Vec, /// Merkle inclusion proof linking this fragment to the block's DA root. pub proof: Vec } ``` Source line: `14`. ## da::DaSampleRequest [#dadasamplerequest] A request to sample specific DA fragments for a block. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DaSampleRequest { /// Block height to sample. pub block_height: u64, /// Which fragment indices to retrieve. pub fragment_indices: Vec } ``` Source line: `29`. ## da::DaSampleResponse [#dadasampleresponse] A response to a DA sampling request. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DaSampleResponse { /// Block height the fragments belong to. pub block_height: u64, /// The requested fragments (may be fewer than requested if some are /// unavailable). pub fragments: Vec, /// Whether the sampled data indicates the block is available. pub available: bool } ``` Source line: `38`. # sigil-storage · error URL: https://docs.sigil.ml/reference/rust/sigil-storage/error Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-storage/src/error.rs`. SHA-256: `244350edb411b3c5e2e1172570c8dd2dadf4d60f16580e032ab48d6b6256bbb5`. 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. ## error::StorageError [#errorstorageerror] Errors produced by storage operations. ```rust #[derive(Debug, thiserror::Error)] pub enum StorageError { /// The requested item was not found. #[error("not found: {0}")] NotFound(String), /// Stored data failed integrity checks. #[error("corrupted data: {0}")] CorruptedData(String), /// A write operation failed. #[error("write error: {0}")] WriteError(String), /// A read operation failed. #[error("read error: {0}")] ReadError(String), /// Serialization or deserialization failed. #[error("serialization error: {0}")] SerializationError(String), /// The requested partition does not exist. #[error("partition not found: {0}")] PartitionNotFound(String), } ``` Source line: `7`. ## error::StorageError::not\_found [#errorstorageerrornot_found] Convenience: create a `NotFound` error with a formatted message. ```rust pub fn not_found(msg: impl fmt::Display) -> Self; ``` Source line: `35`. # sigil-storage · gal_storage URL: https://docs.sigil.ml/reference/rust/sigil-storage/gal_storage Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/gal_storage.md Source declarations, signatures and documentation for gal_storage. Source: `sigil/node/sigil-storage/src/gal_storage.rs`. SHA-256: `6810035a31351cf29b97d6d24a7fd7f5b84b9c4d06abe89e5c9a3cca7a621481`. 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. ## gal\_storage::PARTITION\_HMR [#gal_storagepartition_hmr] Partition: latest \[`HmrAnchor`] per HMR DID. ```rust pub const PARTITION_HMR: &str; ``` Source line: `18`. ## gal\_storage::PARTITION\_MHR [#gal_storagepartition_mhr] Partition: latest \[`MhrAnchor`] per MHR DID. ```rust pub const PARTITION_MHR: &str; ``` Source line: `20`. ## gal\_storage::PARTITION\_ENR [#gal_storagepartition_enr] Partition: latest \[`EnrAnchor`] per ENR DID. ```rust pub const PARTITION_ENR: &str; ``` Source line: `22`. ## gal\_storage::PARTITION\_ORG\_ROOT [#gal_storagepartition_org_root] Partition: latest \[`OrgLineageRoot`] per org DID. ```rust pub const PARTITION_ORG_ROOT: &str; ``` Source line: `24`. ## gal\_storage::PARTITION\_SHARD\_ASSIGNMENT [#gal_storagepartition_shard_assignment] Partition: latest \[`ShardAssignment`] per subject DID. ```rust pub const PARTITION_SHARD_ASSIGNMENT: &str; ``` Source line: `26`. ## gal\_storage::PARTITION\_REVOCATION [#gal_storagepartition_revocation] Partition: revocation records keyed by subject DID. ```rust pub const PARTITION_REVOCATION: &str; ``` Source line: `28`. ## gal\_storage::PARTITION\_SHARD\_TOPOLOGY [#gal_storagepartition_shard_topology] Partition: append-only \[`ShardTopologyEntry`] log. Keys are zero-padded `applied_at_block:sequence` so prefix scans produce a chronological ordering. ```rust pub const PARTITION_SHARD_TOPOLOGY: &str; ``` Source line: `32`. ## gal\_storage::PARTITIONS [#gal_storagepartitions] All GAL partitions, in canonical iteration order. Useful when wiring storage backends that need to declare column families up front. ```rust pub const PARTITIONS: &[&str]; ``` Source line: `36`. ## gal\_storage::key\_for\_did [#gal_storagekey_for_did] Encode a DID as the canonical key for per-subject partitions (HMR / MHR / ENR / org-root / shard-assignment / revocation). ```rust pub fn key_for_did(did: &str) -> Vec; ``` Source line: `48`. ## gal\_storage::topology\_key [#gal_storagetopology_key] Encode a topology key from `applied_at_block` + per-block `sequence`. Produces 16 bytes: 8 BE bytes for the block, 8 BE bytes for the sequence — so prefix-scanning yields chronological order. ```rust pub fn topology_key(applied_at_block: u64, sequence: u64) -> Vec; ``` Source line: `55`. ## gal\_storage::write [#gal_storagewrite] Typed write helpers. Each accepts the appropriate record type from `sigil-core::gal` (passed as `&T` to keep this module loosely coupled). ```rust pub mod write; ``` Source line: `96`. ## gal\_storage::write::put\_hmr [#gal_storagewriteput_hmr] Store the latest HMR anchor for a DID. Existing entries are overwritten — call sites are responsible for monotonic-sequence enforcement. ```rust pub fn put_hmr( store: &dyn StateStore, did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `102`. ## gal\_storage::write::put\_mhr [#gal_storagewriteput_mhr] Store the latest MHR anchor for a DID. ```rust pub fn put_mhr( store: &dyn StateStore, did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `111`. ## gal\_storage::write::put\_enr [#gal_storagewriteput_enr] Store the latest ENR anchor for a DID. ```rust pub fn put_enr( store: &dyn StateStore, did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `120`. ## gal\_storage::write::put\_org\_root [#gal_storagewriteput_org_root] Store the latest org lineage root for an org DID. ```rust pub fn put_org_root( store: &dyn StateStore, org_did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `129`. ## gal\_storage::write::put\_shard\_assignment [#gal_storagewriteput_shard_assignment] Store the current shard assignment for a subject DID. ```rust pub fn put_shard_assignment( store: &dyn StateStore, subject_did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `138`. ## gal\_storage::write::put\_revocation [#gal_storagewriteput_revocation] Store a revocation record for a subject DID. Cascade revocations should use \[`super::cascade_revoke`] for atomic multi-write semantics. ```rust pub fn put_revocation( store: &dyn StateStore, subject_did: &str, record: &T, ) -> Result<(), StorageError>; ``` Source line: `154`. ## gal\_storage::write::append\_shard\_topology [#gal_storagewriteappend_shard_topology] Append a shard-topology entry under a chronological key. ```rust pub fn append_shard_topology( store: &dyn StateStore, applied_at_block: u64, sequence: u64, record: &T, ) -> Result<(), StorageError>; ``` Source line: `168`. ## gal\_storage::read [#gal_storageread] Typed read helpers, generic over the record type. Higher layers pass `sigil-core::gal::HmrAnchor` (etc.) directly. ```rust pub mod read; ``` Source line: `185`. ## gal\_storage::read::get\_hmr [#gal_storagereadget_hmr] Fetch the latest HMR record for a DID. ```rust pub fn get_hmr( store: &dyn StateStore, did: &str, ) -> Result, StorageError>; ``` Source line: `189`. ## gal\_storage::read::get\_mhr [#gal_storagereadget_mhr] Fetch the latest MHR record for a DID. ```rust pub fn get_mhr( store: &dyn StateStore, did: &str, ) -> Result, StorageError>; ``` Source line: `197`. ## gal\_storage::read::get\_enr [#gal_storagereadget_enr] Fetch the latest ENR record for a DID. ```rust pub fn get_enr( store: &dyn StateStore, did: &str, ) -> Result, StorageError>; ``` Source line: `205`. ## gal\_storage::read::get\_org\_root [#gal_storagereadget_org_root] Fetch the latest org lineage root for an org DID. ```rust pub fn get_org_root( store: &dyn StateStore, org_did: &str, ) -> Result, StorageError>; ``` Source line: `213`. ## gal\_storage::read::get\_shard\_assignment [#gal_storagereadget_shard_assignment] Fetch the current shard assignment for a subject DID. ```rust pub fn get_shard_assignment( store: &dyn StateStore, subject_did: &str, ) -> Result, StorageError>; ``` Source line: `221`. ## gal\_storage::read::get\_revocation [#gal_storagereadget_revocation] Fetch the revocation record for a subject DID, or `None` if the subject is not revoked. ```rust pub fn get_revocation( store: &dyn StateStore, subject_did: &str, ) -> Result, StorageError>; ``` Source line: `230`. ## gal\_storage::read::is\_revoked [#gal_storagereadis_revoked] Returns `true` if `subject_did` has any revocation record. ```rust pub fn is_revoked(store: &dyn StateStore, subject_did: &str) -> Result; ``` Source line: `238`. ## gal\_storage::cascade\_revoke [#gal_storagecascade_revoke] Apply a cascade revocation across multiple DIDs as one logical write. Backends with a native batch primitive implement this as a crash-atomic write; simpler stores apply the entries while holding their store lock. ```rust pub fn cascade_revoke( store: &dyn StateStore, subject_dids: &[&str], record_for: impl Fn(&str) -> T, ) -> Result<(), StorageError>; ``` Source line: `247`. # sigil-storage URL: https://docs.sigil.ml/reference/rust/sigil-storage Markdown: https://docs.sigil.ml/reference/rust/sigil-storage.md Storage layer for the Sigil blockchain — block store, state store, DA layer Storage layer for the Sigil blockchain — block store, state store, DA layer | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-storage` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-storage/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_storage` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-storage = { path = "../sigil-storage" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | ----------------------- | --------------------------- | | `default` | `akashakv-backend` | | `akashakv-backend` | `dep:akashakv`, `dep:tokio` | | `legacy-rocksdb-import` | `dep:rocksdb` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-storage/crate) — 16 declarations * [akashakv\_store](/reference/rust/sigil-storage/akashakv_store) — 10 declarations * [config](/reference/rust/sigil-storage/config) — 1 declarations * [da](/reference/rust/sigil-storage/da) — 3 declarations * [error](/reference/rust/sigil-storage/error) — 2 declarations * [gal\_storage](/reference/rust/sigil-storage/gal_storage) — 27 declarations * [memory](/reference/rust/sigil-storage/memory) — 6 declarations * [rocksdb\_store](/reference/rust/sigil-storage/rocksdb_store) — 7 declarations * [traits](/reference/rust/sigil-storage/traits) — 4 declarations # sigil-storage · memory URL: https://docs.sigil.ml/reference/rust/sigil-storage/memory Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/memory.md Source declarations, signatures and documentation for memory. Source: `sigil/node/sigil-storage/src/memory.rs`. SHA-256: `6415e79fe7f502f4e100dade795769f45d6a3856ea1faacefd0d7cbe31af3a25`. 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. ## memory::MemoryBlockStore [#memorymemoryblockstore] In-memory block store backed by height and hash indexes. ```rust #[derive(Debug, Default)] pub struct MemoryBlockStore { } ``` Source line: `24`. ## memory::MemoryBlockStore::new [#memorymemoryblockstorenew] Create an empty block store. ```rust pub fn new() -> Self; ``` Source line: `33`. ## memory::MemoryStateStore [#memorymemorystatestore] In-memory key-value state store with partition isolation. Each partition maps byte-keys to byte-values using a `BTreeMap` so that `scan_prefix` can exploit ordering. ```rust #[derive(Debug, Default)] pub struct MemoryStateStore { } ``` Source line: `131`. ## memory::MemoryStateStore::new [#memorymemorystatestorenew] Create an empty state store. ```rust pub fn new() -> Self; ``` Source line: `137`. ## memory::MemoryReceiptStore [#memorymemoryreceiptstore] In-memory receipt store with transaction-hash and block-height indexes. ```rust #[derive(Debug, Default)] pub struct MemoryReceiptStore { } ``` Source line: `212`. ## memory::MemoryReceiptStore::new [#memorymemoryreceiptstorenew] Create an empty receipt store. ```rust pub fn new() -> Self; ``` Source line: `221`. # sigil-storage · rocksdb_store URL: https://docs.sigil.ml/reference/rust/sigil-storage/rocksdb_store Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/rocksdb_store.md Source declarations, signatures and documentation for rocksdb_store. Source: `sigil/node/sigil-storage/src/rocksdb_store.rs`. SHA-256: `12ddad1ad95b5e91078e8cd56def9da49b9052526cf9a70ca919d50b985b0448`. 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. Module condition: ```rust #[cfg(feature = "legacy-rocksdb-import")] ``` ## rocksdb\_store::RocksDbBlockStore [#rocksdb_storerocksdbblockstore] Persistent block store backed by RocksDB. Key schemes: * `b:` -> serde\_json-encoded \[`Block`] * `h:` -> `` (hash-to-height index) * `meta:latest` -> `` (latest finalized height) ```rust #[cfg(feature = "legacy-rocksdb-import")] pub struct RocksDbBlockStore { } ``` Source line: `148`. ## rocksdb\_store::RocksDbBlockStore::open [#rocksdb_storerocksdbblockstoreopen] Open (or create) a RocksDB block store at the given path. ```rust #[cfg(feature = "legacy-rocksdb-import")] pub fn open(path: &Path) -> Result; ``` Source line: `154`. ## rocksdb\_store::RocksDbBlockStore::open\_read\_only [#rocksdb_storerocksdbblockstoreopen_read_only] Open an existing RocksDB block store read-only. This is only for one-shot legacy import and repair tooling. Production node runtime must not write to the deprecated RocksDB store while migrating to AkashaKV. ```rust #[cfg(feature = "legacy-rocksdb-import")] pub fn open_read_only(path: &Path) -> Result; ``` Source line: `171`. ## rocksdb\_store::RocksDbStateStore [#rocksdb_storerocksdbstatestore] Persistent state store backed by RocksDB. Key scheme: `\xFF` where `\xFF` acts as a separator. This allows efficient prefix iteration for both partition-level and key-level scans. ```rust #[cfg(feature = "legacy-rocksdb-import")] pub struct RocksDbStateStore { } ``` Source line: `339`. ## rocksdb\_store::RocksDbStateStore::open [#rocksdb_storerocksdbstatestoreopen] Open (or create) a RocksDB state store at the given path. ```rust #[cfg(feature = "legacy-rocksdb-import")] pub fn open(path: &Path) -> Result; ``` Source line: `345`. ## rocksdb\_store::RocksDbReceiptStore [#rocksdb_storerocksdbreceiptstore] Persistent receipt store backed by RocksDB. Key schemes: * `t:` -> serde\_json-encoded \[`Receipt`] * `b::` -> `` ```rust #[cfg(feature = "legacy-rocksdb-import")] pub struct RocksDbReceiptStore { } ``` Source line: `466`. ## rocksdb\_store::RocksDbReceiptStore::open [#rocksdb_storerocksdbreceiptstoreopen] Open (or create) a RocksDB receipt store at the given path. ```rust #[cfg(feature = "legacy-rocksdb-import")] pub fn open(path: &Path) -> Result; ``` Source line: `472`. # sigil-storage · traits URL: https://docs.sigil.ml/reference/rust/sigil-storage/traits Markdown: https://docs.sigil.ml/reference/rust/sigil-storage/traits.md Source declarations, signatures and documentation for traits. Source: `sigil/node/sigil-storage/src/traits.rs`. SHA-256: `23ed246c4d3f587d244e6936a7b67d19971d064c49727d9faa073203c1b21e79`. 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. ## traits::KeyValuePair [#traitskeyvaluepair] A key-value pair returned by prefix scans. ```rust pub type KeyValuePair = (Vec, Vec); ``` Source line: `12`. ## traits::BlockStore [#traitsblockstore] Persistent storage for finalized blocks. ```rust pub trait BlockStore: Send + Sync { /// Store a finalized block. Returns an error if a block at the same height /// already exists (blocks are append-only). fn put_block(&self, block: &Block) -> Result<(), StorageError>; /// Retrieve a block by its height, returning `None` if no block exists at /// that height. fn get_block_by_height(&self, height: u64) -> Result, StorageError>; /// Retrieve a block by its header hash. fn get_block_by_hash(&self, hash: &SigilHash) -> Result, StorageError>; /// Return the height of the most recently stored block, or `0` if the /// store is empty. fn latest_height(&self) -> Result; /// Check whether a block at the given height has been stored. fn has_block(&self, height: u64) -> Result; /// Replace the current tip block with an equivalent block from the /// canonical branch. Implementations must refuse non-tip replacement. fn replace_tip_block( &self, _existing: &Block, _replacement: &Block, ) -> Result<(), StorageError> ; } ``` Source line: `15`. ## traits::StateStore [#traitsstatestore] Key-value state storage partitioned by logical namespace. ```rust pub trait StateStore: Send + Sync { /// Get a value from a partition. Returns `None` if the key does not exist. fn get(&self, partition: &str, key: &[u8]) -> Result>, StorageError>; /// Set a key-value pair in a partition, creating the partition if needed. fn put(&self, partition: &str, key: &[u8], value: &[u8]) -> Result<(), StorageError>; /// Set multiple key-value pairs as one logical write. /// /// Durable backends should override this with their native write-batch /// primitive. The default implementation preserves the API contract for /// simple stores but is not crash-atomic. fn put_many(&self, entries: &[(&str, &[u8], &[u8])]) -> Result<(), StorageError> ; /// Delete a key from a partition. No-op if the key does not exist. fn delete(&self, partition: &str, key: &[u8]) -> Result<(), StorageError>; /// Check whether a key exists in a partition. fn has(&self, partition: &str, key: &[u8]) -> Result; /// Scan all keys that begin with `prefix` in the given partition, /// returning at most `limit` entries sorted by key. fn scan_prefix( &self, partition: &str, prefix: &[u8], limit: usize, ) -> Result, StorageError>; } ``` Source line: `48`. ## traits::ReceiptStore [#traitsreceiptstore] Storage for transaction receipts produced during block execution. ```rust pub trait ReceiptStore: Send + Sync { /// Store a receipt. Overwrites any existing receipt with the same /// `tx_hash`. fn put_receipt(&self, receipt: &Receipt) -> Result<(), StorageError>; /// Retrieve a receipt by transaction hash. fn get_receipt(&self, tx_hash: &SigilHash) -> Result, StorageError>; /// Retrieve all receipts for a given block height, ordered by `tx_index`. fn get_receipts_for_block(&self, height: u64) -> Result, StorageError>; } ``` Source line: `84`. # sigil-tee-material · arm_cca URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/arm_cca Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/arm_cca.md Source declarations, signatures and documentation for arm_cca. Source: `sigil/node/sigil-tee-material/src/arm_cca.rs`. SHA-256: `26901b44b06c30155c29d08a5a0feb6cc4e8bce706d38adbadff645362db8c92`. 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. ## arm\_cca::validate\_iak\_pubkey [#arm_ccavalidate_iak_pubkey] Validate a single IAK pubkey buffer. Returns the canonical 97-byte SEC1-uncompressed P-384 form. ```rust pub fn validate_iak_pubkey(bytes: &[u8]) -> Result<[u8; SEC1_UNCOMPRESSED_LEN], ToolError>; ``` Source line: `32`. ## arm\_cca::validate\_realm\_token [#arm_ccavalidate_realm_token] Validate a realm-token (COSE\_Sign1) bytes blob — checks structural shape + that ES384 is the algorithm. Optionally verifies the signature against an IAK pubkey if one is supplied. ```rust pub fn validate_realm_token( bytes: &[u8], iak_pubkey: Option<&[u8; SEC1_UNCOMPRESSED_LEN]>, ) -> Result<(), ToolError>; ``` Source line: `57`. ## arm\_cca::emit\_genesis\_from\_files [#arm_ccaemit_genesis_from_files] Build genesis from operator-supplied IAK pubkey files + RIM files * optional realm-token sample. The realm token (when present) must have a matching IAK pubkey in the input list, otherwise validation fails. ```rust pub fn emit_genesis_from_files( iak_pubkey_paths: &[&Path], rim_paths: &[&Path], realm_token_path: Option<&Path>, ) -> Result; ``` Source line: `146`. ## arm\_cca::emit\_genesis\_from\_manifest [#arm_ccaemit_genesis_from_manifest] Emit a genesis bundle from a single text manifest file (one path per line, prefixed by `iak:` / `rim:` / `realm-token:`). ```rust pub fn emit_genesis_from_manifest(manifest_path: &Path) -> Result; ``` Source line: `230`. # sigil-tee-material · bundle URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/bundle Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/bundle.md Source declarations, signatures and documentation for bundle. Source: `sigil/node/sigil-tee-material/src/bundle.rs`. SHA-256: `d0cf82cd760e00bb7cddfac444abba2a6b6465524ab03216a4ac3d231fe1bc06`. 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. ## bundle::DEFAULT\_MAX\_ATTESTATION\_AGE\_EPOCHS [#bundledefault_max_attestation_age_epochs] Default freshness window for runtime attestations emitted into genesis. ```rust pub const DEFAULT_MAX_ATTESTATION_AGE_EPOCHS: u64; ``` Source line: `9`. ## bundle::DEFAULT\_COLLATERAL\_MAX\_AGE\_EPOCHS [#bundledefault_collateral_max_age_epochs] Default maximum age for vendor collateral that must be refreshed off-chain. ```rust pub const DEFAULT_COLLATERAL_MAX_AGE_EPOCHS: u64; ``` Source line: `11`. ## bundle::BundleVendor [#bundlebundlevendor] Vendor identifier in the bundle envelope. Matches the `TeeAttestation.vendor` strings the chain-side verifier registry uses. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] pub enum BundleVendor { AmdSevSnp, IntelSgxDcap, IntelTdx, ArmCca, } ``` Source line: `17`. ## bundle::BundleVendor::as\_str [#bundlebundlevendoras_str] ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `25`. ## bundle::BundleVendor::anchors\_field [#bundlebundlevendoranchors_field] Genesis-side `compute_params.<...>_trust_anchors` field key. ```rust pub fn anchors_field(&self) -> &'static str; ``` Source line: `35`. ## bundle::GenesisBundle [#bundlegenesisbundle] Top-level bundle envelope written by every `emit-genesis` subcommand. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct GenesisBundle { pub vendor: BundleVendor, #[serde(rename = "generatedAt")] pub generated_at: DateTime, /// Best-effort earliest expiry across the bundle's signed material /// (e.g. CRL nextUpdate, TCB Info nextUpdate). `None` when the /// vendor produces no time-stamped material that the tooling can /// parse. #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")] pub expires_at: Option>, /// Vendor-specific raw artefacts (preserved for audit / replay). pub materials: Value, /// Hex-encoded measurements the bundle pins. pub measurements: Vec, /// JSON-merge fragment the operator drops into chain genesis under /// `compute_params`. #[serde(rename = "policyPatch")] pub policy_patch: PolicyPatch } ``` Source line: `47`. ## bundle::PolicyPatch [#bundlepolicypatch] Genesis policy patch: a `compute_params` overlay carrying the per-vendor trust-anchor block. The operator merges this into their genesis JSON. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PolicyPatch { pub compute_params: Value } ``` Source line: `71`. ## bundle::GenesisBundle::new [#bundlegenesisbundlenew] ```rust pub fn new( vendor: BundleVendor, materials: Value, measurements: Vec, anchors: Value, expires_at: Option>, ) -> Self; ``` Source line: `76`. # sigil-tee-material · crate URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-tee-material/src/lib.rs`. SHA-256: `879b99876baa7a9015ee8c4db1cda1660a1752fd0f43f120748b5b7fcb0fa32c`. 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. ## bundle [#bundle] Operator tooling for fetching, validating, and emitting genesis trust-anchor bundles for Sigil's per-vendor TEE verifier. See `sigil/docs/operator/tee-verifier-readiness.md` for the broader context and the per-vendor checklist. # Output bundle schema [#output-bundle-schema] Every emit-genesis subcommand produces the same outer envelope: ```json { "vendor": "amd-sev-snp" | "intel-sgx-dcap" | "intel-tdx" | "arm-cca", "generatedAt": "", "expiresAt": "", "materials": { ... vendor-specific raw artefacts as base64/hex ... }, "measurements": [ "", ... ], "policyPatch": { "compute_params": { "_trust_anchors": { ... drop-in shape for genesis ... } } } } ``` Operators concatenate `policyPatch` into their genesis JSON. The `materials` block is preserved so the bundle is self-describing (auditable: who ran the fetch, when, what the source bytes were). All cryptography is pure Rust: * `p256` / `p384` for ECDSA (Intel / AMD-Arm respectively) * `sha2` for SHA-256/384 * `x509-parser` for X.509 DER parsing * `coset` + `ciborium` for COSE\_Sign1 + CBOR (Arm CCA) * (optional) `ureq` + rustls for HTTPS fetch No C/FFI. No vendor SDK. No proprietary blobs. ```rust pub mod bundle; ``` Source line: `39`. ## error [#error] ```rust pub mod error; ``` Source line: `40`. ## fetch [#fetch] ```rust #[cfg(feature = "network")] pub mod fetch; ``` Source line: `42`. ## hex\_io [#hex_io] ```rust pub mod hex_io; ``` Source line: `43`. ## arm\_cca [#arm_cca] ```rust pub mod arm_cca; ``` Source line: `45`. ## sev\_snp [#sev_snp] ```rust pub mod sev_snp; ``` Source line: `46`. ## sgx\_dcap [#sgx_dcap] ```rust pub mod sgx_dcap; ``` Source line: `47`. ## tdx [#tdx] ```rust pub mod tdx; ``` Source line: `48`. ## pub use bundle::\{GenesisBundle, PolicyPatch}; [#pub-use-bundlegenesisbundle-policypatch] ```rust pub use bundle::{GenesisBundle, PolicyPatch}; ``` Source line: `50`. ## pub use error::ToolError; [#pub-use-errortoolerror] ```rust pub use error::ToolError; ``` Source line: `51`. # sigil-tee-material · error URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/error Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-tee-material/src/error.rs`. SHA-256: `af5efa4772164e66ab32bda9164e02d9dd1abe1d3204b34122503a1f75eae9a3`. 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. ## error::ToolError [#errortoolerror] ```rust #[derive(Error, Debug)] pub enum ToolError { #[error("io: {0}")] Io(#[from] std::io::Error), #[error("json: {0}")] Json(#[from] serde_json::Error), #[error("hex: {0}")] Hex(#[from] hex::FromHexError), #[error("validation failed: {0}")] Validation(String), #[error("network: {0}")] Network(String), #[error("unsupported: {0}")] Unsupported(String), } ``` Source line: `4`. # sigil-tee-material · fetch URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/fetch Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/fetch.md Source declarations, signatures and documentation for fetch. Source: `sigil/node/sigil-tee-material/src/fetch.rs`. SHA-256: `a6bc7f4232a9dbc6ee063dad24607c214dddff8970be0fcc7f564606d05eb9e4`. 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. Module condition: ```rust #[cfg(feature = "network")] ``` ## fetch::get\_bytes [#fetchget_bytes] ```rust #[cfg(feature = "network")] pub fn get_bytes(url: &str) -> Result, ToolError>; ``` Source line: `7`. ## fetch::get\_string [#fetchget_string] ```rust #[cfg(feature = "network")] pub fn get_string(url: &str) -> Result; ``` Source line: `25`. ## fetch::get\_response\_with\_chain\_header [#fetchget_response_with_chain_header] ```rust #[cfg(feature = "network")] pub fn get_response_with_chain_header( url: &str, chain_header: &str, ) -> Result<(Vec, Option), ToolError>; ``` Source line: `30`. # sigil-tee-material · hex_io URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/hex_io Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/hex_io.md Source declarations, signatures and documentation for hex_io. Source: `sigil/node/sigil-tee-material/src/hex_io.rs`. SHA-256: `819a84c3476fc3f004ec935425fcd2f12ffe65f5aaaa239e76d6bedf6f881167`. 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. ## hex\_io::read\_bytes [#hex_ioread_bytes] Read raw bytes from a file. Whitespace-trimmed hex/strings are detected by length parity + alphabet; otherwise the file is treated as opaque bytes. ```rust pub fn read_bytes(path: &Path) -> Result, ToolError>; ``` Source line: `7`. ## hex\_io::read\_hex\_line [#hex_ioread_hex_line] Read a file expected to contain a single line of lowercase hex, possibly with surrounding whitespace. ```rust pub fn read_hex_line(path: &Path) -> Result, ToolError>; ``` Source line: `14`. ## hex\_io::read\_bytes\_or\_hex [#hex_ioread_bytes_or_hex] Try to read either a hex line or a raw bytes file. Returns the raw bytes either way. ```rust pub fn read_bytes_or_hex(path: &Path) -> Result, ToolError>; ``` Source line: `23`. ## hex\_io::write\_json [#hex_iowrite_json] ```rust pub fn write_json(path: &Path, v: &T) -> Result<(), ToolError>; ``` Source line: `30`. ## hex\_io::read\_text [#hex_ioread_text] ```rust pub fn read_text(path: &Path) -> Result; ``` Source line: `36`. # sigil-tee-material URL: https://docs.sigil.ml/reference/rust/sigil-tee-material Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material.md Operator tooling for fetching, validating, and emitting genesis trust-anchor bundles for Sigil's per-vendor TEE verifier. Operator tooling for fetching, validating, and emitting genesis trust-anchor bundles for Sigil's per-vendor TEE verifier. | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-tee-material` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-tee-material/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_tee_material` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-tee-material = { path = "../sigil-tee-material" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ------------ | | `default` | `network` | | `network` | `dep:ureq` | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-tee-material/crate) — 10 declarations * [bundle](/reference/rust/sigil-tee-material/bundle) — 8 declarations * [error](/reference/rust/sigil-tee-material/error) — 1 declarations * [fetch](/reference/rust/sigil-tee-material/fetch) — 3 declarations * [hex\_io](/reference/rust/sigil-tee-material/hex_io) — 5 declarations * [arm\_cca](/reference/rust/sigil-tee-material/arm_cca) — 4 declarations * [sev\_snp](/reference/rust/sigil-tee-material/sev_snp) — 12 declarations * [sgx\_dcap](/reference/rust/sigil-tee-material/sgx_dcap) — 12 declarations * [tdx](/reference/rust/sigil-tee-material/tdx) — 4 declarations # sigil-tee-material · sev_snp URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/sev_snp Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/sev_snp.md Source declarations, signatures and documentation for sev_snp. Source: `sigil/node/sigil-tee-material/src/sev_snp.rs`. SHA-256: `d6114d510f4c779ad601653420b40d86a733c0f18405363a17213ea94419e892`. 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. ## sev\_snp::KDS\_BASE [#sev_snpkds_base] ```rust pub const KDS_BASE: &str; ``` Source line: `20`. ## sev\_snp::ValidatedSevSnpChain [#sev_snpvalidatedsevsnpchain] ```rust #[derive(Debug, Clone)] pub struct ValidatedSevSnpChain { pub ark_fingerprint_sha256: [u8; 32], pub ask_fingerprint_sha256: [u8; 32], pub ark_der: Vec, pub ask_der: Vec, pub expires_at: DateTime } ``` Source line: `23`. ## sev\_snp::AmdProduct [#sev_snpamdproduct] ```rust #[derive(Clone, Copy, Debug)] pub enum AmdProduct { Milan, Genoa, } ``` Source line: `32`. ## sev\_snp::AmdProduct::parse [#sev_snpamdproductparse] ```rust pub fn parse(s: &str) -> Result; ``` Source line: `38`. ## sev\_snp::AmdProduct::as\_str [#sev_snpamdproductas_str] ```rust pub fn as_str(&self) -> &'static str; ``` Source line: `47`. ## sev\_snp::fetch\_cert\_chain\_pem [#sev_snpfetch_cert_chain_pem] ```rust #[cfg(feature = "network")] pub fn fetch_cert_chain_pem(product: AmdProduct) -> Result; ``` Source line: `56`. ## sev\_snp::fetch\_vcek\_der [#sev_snpfetch_vcek_der] ```rust #[cfg(feature = "network")] pub fn fetch_vcek_der( product: AmdProduct, chip_id_hex: &str, bl_spl: u8, tee_spl: u8, snp_spl: u8, ucode_spl: u8, ) -> Result, ToolError>; ``` Source line: `62`. ## sev\_snp::validate\_cert\_chain [#sev_snpvalidate_cert_chain] Validate an AMD SEV-SNP cert chain. Accepts a KDS-style PEM chain containing the product ASK and self-signed ARK. Pins based on ARK alone are not enough for production; the tool returns both ARK and ASK fingerprints. Compatibility wrapper for callers that only need the ARK pin. New production code should call `validate_cert_chain_material` and pin both ARK and ASK fingerprints. ```rust pub fn validate_cert_chain(input: &[u8]) -> Result<([u8; 32], Vec), ToolError>; ``` Source line: `90`. ## sev\_snp::validate\_cert\_chain\_material [#sev_snpvalidate_cert_chain_material] Validate AMD SEV-SNP ARK + ASK chain material and return both fingerprints. AMD KDS `cert_chain` responses carry the product ASK followed by the self-signed ARK; operators pin both in genesis. ```rust pub fn validate_cert_chain_material(input: &[u8]) -> Result; ``` Source line: `98`. ## sev\_snp::base64\_decode\_pub [#sev_snpbase64_decode_pub] Minimal pure-Rust base64 decode (RFC 4648 standard alphabet). ```rust pub fn base64_decode_pub(s: &str) -> Result, String>; ``` Source line: `264`. ## sev\_snp::build\_anchors [#sev_snpbuild_anchors] Build a `sev_snp_trust_anchors` policy-anchor JSON value from the validated ARK fingerprint + operator-supplied measurement allowlist. ```rust pub fn build_anchors( ark_fpr: [u8; 32], ask_fpr: [u8; 32], _measurements: &[Vec], measurement_hex: &[String], ) -> serde_json::Value; ``` Source line: `302`. ## sev\_snp::emit\_genesis\_from\_files [#sev_snpemit_genesis_from_files] One-shot emit-genesis from a validated ARK chain + measurement file. ```rust pub fn emit_genesis_from_files( ark_chain_path: &Path, measurement_paths: &[&Path], ) -> Result; ``` Source line: `324`. # sigil-tee-material · sgx_dcap URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/sgx_dcap Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/sgx_dcap.md Source declarations, signatures and documentation for sgx_dcap. Source: `sigil/node/sigil-tee-material/src/sgx_dcap.rs`. SHA-256: `47e7c64d46f0acf4b415b5b91bc6b92e343a7d29b081df6d4c08569a6683279e`. 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. ## sgx\_dcap::PCS\_BASE [#sgx_dcappcs_base] ```rust pub const PCS_BASE: &str; ``` Source line: `29`. ## sgx\_dcap::fetch\_tcb\_info [#sgx_dcapfetch_tcb_info] ```rust #[cfg(feature = "network")] pub fn fetch_tcb_info(fmspc_hex: &str) -> Result<(String, Option), ToolError>; ``` Source line: `32`. ## sgx\_dcap::validate\_fmspc\_hex [#sgx_dcapvalidate_fmspc_hex] ```rust pub fn validate_fmspc_hex(fmspc_hex: &str) -> Result<(), ToolError>; ``` Source line: `44`. ## sgx\_dcap::normalized\_fmspc\_hex [#sgx_dcapnormalized_fmspc_hex] ```rust pub fn normalized_fmspc_hex(fmspc_hex: &str) -> Result; ``` Source line: `49`. ## sgx\_dcap::fetch\_qe\_identity [#sgx_dcapfetch_qe_identity] ```rust #[cfg(feature = "network")] pub fn fetch_qe_identity() -> Result<(String, Option), ToolError>; ``` Source line: `59`. ## sgx\_dcap::fetch\_pck\_crl\_platform [#sgx_dcapfetch_pck_crl_platform] ```rust #[cfg(feature = "network")] pub fn fetch_pck_crl_platform() -> Result<(Vec, Option), ToolError>; ``` Source line: `71`. ## sgx\_dcap::validate [#sgx_dcapvalidate] Validate an SGX DCAP material bundle and return the validated Intel SGX Root CA fingerprint + the TCB Signing Cert DER bytes. ```rust pub fn validate( pck_chain_pem_or_der: &[u8], tcb_signing_cert_der: &[u8], tcb_info_json: &str, qe_identity_json: &str, pck_crl_der: &[u8], ) -> Result; ``` Source line: `78`. ## sgx\_dcap::ValidatedSgx [#sgx_dcapvalidatedsgx] ```rust #[derive(Debug)] pub struct ValidatedSgx { pub root_fpr: [u8; 32], pub root_der: Vec, pub tcb_signing_cert_fpr: [u8; 32], pub expires_at: Option> } ``` Source line: `173`. ## sgx\_dcap::ValidatedSgx::from\_der\_material [#sgx_dcapvalidatedsgxfrom_der_material] ```rust pub fn from_der_material(root_der: &[u8], tcb_signing_cert_der: &[u8]) -> Self; ``` Source line: `181`. ## sgx\_dcap::ValidatedSgx::tcb\_signing\_cert\_sha256\_hex [#sgx_dcapvalidatedsgxtcb_signing_cert_sha256_hex] ```rust pub fn tcb_signing_cert_sha256_hex(&self) -> String; ``` Source line: `190`. ## sgx\_dcap::parse\_chain [#sgx_dcapparse_chain] ```rust pub fn parse_chain(input: &[u8]) -> Result>, ToolError>; ``` Source line: `432`. ## sgx\_dcap::emit\_genesis\_from\_files [#sgx_dcapemit_genesis_from_files] ```rust #[allow(clippy::too_many_arguments)] pub fn emit_genesis_from_files( pck_chain_path: &Path, tcb_signing_cert_path: &Path, tcb_info_path: &Path, qe_identity_path: &Path, pck_crl_path: &Path, mrenclave_paths: &[&Path], mrsigner_paths: &[&Path], is_tdx: bool, ) -> Result; ``` Source line: `644`. # sigil-tee-material · tdx URL: https://docs.sigil.ml/reference/rust/sigil-tee-material/tdx Markdown: https://docs.sigil.ml/reference/rust/sigil-tee-material/tdx.md Source declarations, signatures and documentation for tdx. Source: `sigil/node/sigil-tee-material/src/tdx.rs`. SHA-256: `f8b8dcf12892bfc705e6251dacea9180c39f8c6424d653bdc577daf4c43cb8f2`. 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. ## tdx::PCS\_BASE [#tdxpcs_base] ```rust pub const PCS_BASE: &str; ``` Source line: `21`. ## tdx::fetch\_tcb\_info [#tdxfetch_tcb_info] ```rust #[cfg(feature = "network")] pub fn fetch_tcb_info(fmspc_hex: &str) -> Result<(String, Option), ToolError>; ``` Source line: `24`. ## tdx::fetch\_qe\_identity [#tdxfetch_qe_identity] ```rust #[cfg(feature = "network")] pub fn fetch_qe_identity() -> Result<(String, Option), ToolError>; ``` Source line: `37`. ## tdx::emit\_genesis\_from\_files [#tdxemit_genesis_from_files] ```rust pub fn emit_genesis_from_files( pck_chain_path: &Path, tcb_signing_cert_path: &Path, tcb_info_path: &Path, qe_identity_path: &Path, pck_crl_path: &Path, mrtd_paths: &[&Path], mrsigner_seam_paths: &[&Path], ) -> Result; ``` Source line: `48`. # sigil-tower · committee URL: https://docs.sigil.ml/reference/rust/sigil-tower/committee Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/committee.md Source declarations, signatures and documentation for committee. Source: `sigil/node/sigil-tower/src/committee.rs`. SHA-256: `e701e78f509a14fcfd8164d98ad64aa5e7e160d5946c0151136fc06c8686c722`. 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. ## committee::Committee [#committeecommittee] A committee assigned to a specific slot. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Committee { /// Slot number this committee is assigned to. pub slot: u64, /// DIDs of the 21 Block Producers. pub block_producers: Vec, /// DIDs of the 100 Block Validators. pub block_validators: Vec } ``` Source line: `21`. ## committee::CommitteeSelector [#committeecommitteeselector] Configuration for the committee selection algorithm. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct CommitteeSelector { /// Minimum number of Block Producers required (default: 21). pub min_producers: usize, /// Minimum number of Block Validators required (default: 100). pub min_validators: usize, /// Maximum validators per human root DID in a single committee (default: 2). pub max_per_human_root: usize, /// Minimum distinct geographic regions in a committee (default: 3). pub min_regions: usize } ``` Source line: `32`. ## committee::CommitteeSelector::select [#committeecommitteeselectorselect] Select a committee for the given slot using the provided randomness. The algorithm: 1. Gather all active validators and sort by inclusion score (descending) 2. Shuffle using Fisher-Yates with a deterministic seed derived from slot number and provided randomness 3. Greedily select BPs: highest-scored first, enforcing human root limit and geographic diversity 4. Greedily select BVs from remaining validators with same constraints ```rust pub fn select( &self, registry: &ValidatorRegistry, slot: u64, randomness: &[u8; 32], ) -> Result; ``` Source line: `64`. # sigil-tower · crate URL: https://docs.sigil.ml/reference/rust/sigil-tower/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-tower/src/lib.rs`. SHA-256: `a2b911e2da29573e2e9fa930dd7843c77623846e1985671cf930cc4071c10143`. 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. ## committee [#committee] ```rust pub mod committee; ``` Source line: `9`. ## error [#error] ```rust pub mod error; ``` Source line: `10`. ## evidence [#evidence] ```rust pub mod evidence; ``` Source line: `11`. ## finality [#finality] ```rust pub mod finality; ``` Source line: `12`. ## inclusion [#inclusion] ```rust pub mod inclusion; ``` Source line: `13`. ## registry [#registry] ```rust pub mod registry; ``` Source line: `14`. ## slot [#slot] ```rust pub mod slot; ``` Source line: `15`. ## tower\_committee [#tower_committee] ```rust pub mod tower_committee; ``` Source line: `16`. ## types [#types] ```rust pub mod types; ``` Source line: `17`. # sigil-tower · error URL: https://docs.sigil.ml/reference/rust/sigil-tower/error Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-tower/src/error.rs`. SHA-256: `37b92148281baf5bee8af05929f32c0b7712fb27af6534a9853e6a7e08e46f31`. 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. ## error::TowerError [#errortowererror] Errors that can occur in Tower operations. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, thiserror::Error)] pub enum TowerError { #[error("invalid validator: {0}")] InvalidValidator(String), #[error("duplicate validator: {0}")] DuplicateValidator(String), #[error("validator not found: {0}")] ValidatorNotFound(String), #[error("slot error: {0}")] SlotError(String), #[error("committee error: {0}")] CommitteeError(String), #[error("finality error: {0}")] FinalityError(String), #[error("evidence error: {0}")] EvidenceError(String), #[error("tower committee error: {0}")] TowerCommitteeError(String), #[error("serialization error: {0}")] SerializationError(String), } ``` Source line: `7`. # sigil-tower · evidence URL: https://docs.sigil.ml/reference/rust/sigil-tower/evidence Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/evidence.md Source declarations, signatures and documentation for evidence. Source: `sigil/node/sigil-tower/src/evidence.rs`. SHA-256: `1df5575a476b477625728b72c07ae4938cd1816b41bc90d2fd5cc834f9f46044`. 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. ## evidence::validate\_evidence [#evidencevalidate_evidence] Validate that slashing evidence is internally consistent. Returns `Ok(true)` if the evidence is valid, `Ok(false)` if it's invalid but parseable, or `Err` if the evidence is malformed. ```rust pub fn validate_evidence(evidence: &SlashingEvidence) -> Result; ``` Source line: `19`. ## evidence::calculate\_penalty [#evidencecalculate_penalty] Calculate the penalty amount for a slashing evidence type. * Double sign: 100% slash * Surround vote: 100% slash * Invalid block: 50% slash * Downtime: 1% per missed epoch (missed\_slots / SLOTS\_PER\_EPOCH) ```rust pub fn calculate_penalty(evidence_type: &EvidenceType, validator_stake: u64) -> u64; ``` Source line: `98`. ## evidence::compute\_evidence\_hash [#evidencecompute_evidence_hash] Compute the evidence hash for a piece of evidence. SECURITY: Returns an error instead of silently hashing an empty byte array on serialization failure. Hashing empty bytes would produce a fixed, predictable hash that could collide across unrelated evidence, enabling duplicate-evidence suppression attacks. ```rust pub fn compute_evidence_hash(evidence: &SlashingEvidence) -> Result; ``` Source line: `127`. # sigil-tower · finality URL: https://docs.sigil.ml/reference/rust/sigil-tower/finality Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/finality.md Source declarations, signatures and documentation for finality. Source: `sigil/node/sigil-tower/src/finality.rs`. SHA-256: `bab1ac1f3f5ad74f8d93b95bce5090274f698ef4016b6dfb21ec1d6c558ccc63`. 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. ## finality::FinalityUpdate [#finalityfinalityupdate] Result of adding a finality vote. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum FinalityUpdate { /// No state change resulted from this vote. NoChange, /// A checkpoint was justified at the given epoch. Justified(u64), /// A checkpoint was finalized at the given epoch. Finalized(u64), } ``` Source line: `17`. ## finality::FinalityState [#finalityfinalitystate] The finality state machine tracking justification and finalization progress. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct FinalityState { /// The most recently justified checkpoint. pub justified_checkpoint: FinalityCheckpoint, /// The most recently finalized checkpoint. pub finalized_checkpoint: FinalityCheckpoint, /// Votes for the current target epoch, keyed by voter DID. pub votes: HashMap } ``` Source line: `28`. ## finality::FinalityState::new [#finalityfinalitystatenew] Create a new finality state rooted at the given genesis checkpoint. ```rust pub fn new(genesis_checkpoint: FinalityCheckpoint) -> Self; ``` Source line: `43`. ## finality::FinalityState::add\_vote [#finalityfinalitystateadd_vote] Add a finality vote and check whether it triggers justification or finalization. Returns `FinalityUpdate` indicating what changed. ```rust pub fn add_vote( &mut self, vote: FinalityVote, total_stake: u64, ) -> Result; ``` Source line: `58`. ## finality::FinalityState::is\_justified [#finalityfinalitystateis_justified] Whether the given epoch has been justified. ```rust pub fn is_justified(&self, epoch: u64) -> bool; ``` Source line: `136`. ## finality::FinalityState::is\_finalized [#finalityfinalitystateis_finalized] Whether the given epoch has been finalized. ```rust pub fn is_finalized(&self, epoch: u64) -> bool; ``` Source line: `141`. ## finality::FinalityState::required\_stake\_for\_justification [#finalityfinalitystaterequired_stake_for_justification] Returns the minimum stake required for justification (2/3 of total stake). SECURITY: Uses u128 intermediate arithmetic to prevent overflow when total\_stake is large (e.g., > u64::MAX / 2). Without this, the multiplication `total_stake * 2` would silently wrap, potentially allowing justification with far less than 2/3 stake -- a consensus safety violation that could enable finality attacks. ```rust pub fn required_stake_for_justification(&self, total_stake: u64) -> u64; ``` Source line: `152`. ## finality::FinalityState::clear\_votes [#finalityfinalitystateclear_votes] Clear votes for a new voting period (e.g., epoch transition). ```rust pub fn clear_votes(&mut self); ``` Source line: `163`. # sigil-tower · inclusion URL: https://docs.sigil.ml/reference/rust/sigil-tower/inclusion Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/inclusion.md Source declarations, signatures and documentation for inclusion. Source: `sigil/node/sigil-tower/src/inclusion.rs`. SHA-256: `0589e0afc403dc8b62d9128b06d9c7d8149e7d5c1be3c221f3efcd7baf038d67`. 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. ## inclusion::InclusionScorer [#inclusioninclusionscorer] Weights for the 6-component inclusion scoring formula. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InclusionScorer { /// Weight for normalized stake (default 0.25). pub w_stake: f64, /// Weight for OATS trust score (default 0.25). pub w_oats: f64, /// Weight for uptime ratio (default 0.20). pub w_uptime: f64, /// Weight for lineage quality (default 0.15). pub w_lineage: f64, /// Weight for liveness / recent participation (default 0.15). pub w_liveness: f64, /// Weight for concentration penalty (default 0.10, subtracted). pub w_concentration: f64 } ``` Source line: `19`. ## inclusion::ValidatorMetrics [#inclusionvalidatormetrics] Metrics for a single validator used in inclusion scoring. All values should be in \[0.0, 1.0]. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ValidatorMetrics { /// Validator's stake as a fraction of total stake. pub normalized_stake: f64, /// OATS composite trust score (0.0 - 1.0). pub oats_score: f64, /// Uptime ratio over recent window (0.0 - 1.0). pub uptime_ratio: f64, /// Normalized lineage quality / depth (0.0 - 1.0). pub lineage_depth: f64, /// Recent participation / liveness rate (0.0 - 1.0). pub liveness_score: f64, /// Concentration ratio: how much this validator dominates stake (0.0 - 1.0). pub concentration_ratio: f64 } ``` Source line: `50`. ## inclusion::ValidatorMetrics::validate [#inclusionvalidatormetricsvalidate] Validate that all metric fields are within the expected \[0.0, 1.0] range and contain no NaN or infinite values. SECURITY: Unbounded or NaN metrics could produce nonsensical inclusion scores, allowing a malicious validator to game committee selection by injecting out-of-range values that inflate their score. ```rust pub fn validate(&self) -> Result<(), String>; ``` Source line: `72`. ## inclusion::InclusionScorer::score [#inclusioninclusionscorerscore] Compute the inclusion score for a single validator's metrics. ```rust pub fn score(&self, metrics: &ValidatorMetrics) -> f64; ``` Source line: `95`. ## inclusion::InclusionScorer::score\_all [#inclusioninclusionscorerscore_all] Score all validators, returning a vec of (DID, score) pairs sorted by score descending. ```rust pub fn score_all( &self, validators: &[(&ValidatorRecord, &ValidatorMetrics)], ) -> Vec<(String, f64)>; ``` Source line: `106`. # sigil-tower URL: https://docs.sigil.ml/reference/rust/sigil-tower Markdown: https://docs.sigil.ml/reference/rust/sigil-tower.md Tower validator coordination chain — committee selection, Casper FFG finality, slashing evidence Tower validator coordination chain — committee selection, Casper FFG finality, slashing evidence | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-tower` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-tower/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_tower` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-tower = { path = "../sigil-tower" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-tower/crate) — 9 declarations * [committee](/reference/rust/sigil-tower/committee) — 3 declarations * [error](/reference/rust/sigil-tower/error) — 1 declarations * [evidence](/reference/rust/sigil-tower/evidence) — 3 declarations * [finality](/reference/rust/sigil-tower/finality) — 8 declarations * [inclusion](/reference/rust/sigil-tower/inclusion) — 5 declarations * [registry](/reference/rust/sigil-tower/registry) — 12 declarations * [slot](/reference/rust/sigil-tower/slot) — 13 declarations * [tower\_committee](/reference/rust/sigil-tower/tower_committee) — 15 declarations * [types](/reference/rust/sigil-tower/types) — 14 declarations # sigil-tower · registry URL: https://docs.sigil.ml/reference/rust/sigil-tower/registry Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/registry.md Source declarations, signatures and documentation for registry. Source: `sigil/node/sigil-tower/src/registry.rs`. SHA-256: `7a32975ff883a4e3f931a9889f3a68f6f0fe6f96868eb19f19a250adb47be2a3`. 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. ## registry::ValidatorRegistry [#registryvalidatorregistry] The Tower validator registry, supporting unbounded validator sets with efficient lookups by status, region, and human root lineage. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ValidatorRegistry { } ``` Source line: `17`. ## registry::ValidatorRegistry::new [#registryvalidatorregistrynew] Create a new empty registry. ```rust pub fn new() -> Self; ``` Source line: `30`. ## registry::ValidatorRegistry::register [#registryvalidatorregistryregister] Register a new validator. Returns an error if the DID is already registered. ```rust pub fn register(&mut self, record: ValidatorRecord) -> Result<(), TowerError>; ``` Source line: `40`. ## registry::ValidatorRegistry::update [#registryvalidatorregistryupdate] Apply a `ValidatorUpdate` to an existing validator. ```rust pub fn update(&mut self, did: &str, update: ValidatorUpdate) -> Result<(), TowerError>; ``` Source line: `73`. ## registry::ValidatorRegistry::exit [#registryvalidatorregistryexit] Exit a validator from the active set, transitioning to `Exited` status. ```rust pub fn exit(&mut self, did: &str) -> Result<(), TowerError>; ``` Source line: `120`. ## registry::ValidatorRegistry::get [#registryvalidatorregistryget] Look up a validator by DID. ```rust pub fn get(&self, did: &str) -> Option<&ValidatorRecord>; ``` Source line: `159`. ## registry::ValidatorRegistry::active\_validators [#registryvalidatorregistryactive_validators] Returns all validators with `Active` status. ```rust pub fn active_validators(&self) -> Vec<&ValidatorRecord>; ``` Source line: `164`. ## registry::ValidatorRegistry::validators\_in\_region [#registryvalidatorregistryvalidators_in_region] Returns all validators in the given geographic region. ```rust pub fn validators_in_region(&self, region: GeographicRegion) -> Vec<&ValidatorRecord>; ``` Source line: `176`. ## registry::ValidatorRegistry::validators\_by\_human\_root [#registryvalidatorregistryvalidators_by_human_root] Returns all validators that share the given human root DID. ```rust pub fn validators_by_human_root(&self, human_root_did: &str) -> Vec<&ValidatorRecord>; ``` Source line: `188`. ## registry::ValidatorRegistry::total\_active\_stake [#registryvalidatorregistrytotal_active_stake] Total staked amount across all active validators. SECURITY: Uses saturating\_add to prevent overflow when summing stakes across many validators. Without this, a large number of high-stake validators could cause the sum to wrap to a small value, which would corrupt the finality threshold calculation and potentially allow justification with insufficient stake. ```rust pub fn total_active_stake(&self) -> u64; ``` Source line: `206`. ## registry::ValidatorRegistry::active\_count [#registryvalidatorregistryactive_count] Number of active validators. ```rust pub fn active_count(&self) -> usize; ``` Source line: `213`. ## registry::ValidatorRegistry::total\_count [#registryvalidatorregistrytotal_count] Total number of validators in the registry (all statuses). ```rust pub fn total_count(&self) -> usize; ``` Source line: `220`. # sigil-tower · slot URL: https://docs.sigil.ml/reference/rust/sigil-tower/slot Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/slot.md Source declarations, signatures and documentation for slot. Source: `sigil/node/sigil-tower/src/slot.rs`. SHA-256: `522b4cb6ae50e40f48b825aa18d78c5fb9735c43cde89a0549cb2e0749202d84`. 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. ## slot::SLOT\_DURATION\_SECS [#slotslot_duration_secs] Duration of a single slot in seconds. ```rust pub const SLOT_DURATION_SECS: u64; ``` Source line: `12`. ## slot::SLOTS\_PER\_EPOCH [#slotslots_per_epoch] Number of slots per epoch (\~24 hours at 12s/slot). ```rust pub const SLOTS_PER_EPOCH: u64; ``` Source line: `15`. ## slot::SlotClock [#slotslotclock] Slot clock that derives all timing from a genesis timestamp. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SlotClock { } ``` Source line: `19`. ## slot::SlotClock::new [#slotslotclocknew] Create a new slot clock anchored to the given genesis timestamp. ```rust pub fn new(genesis_time: u64) -> Self; ``` Source line: `26`. ## slot::SlotClock::genesis\_time [#slotslotclockgenesis_time] Returns the genesis time. ```rust pub fn genesis_time(&self) -> u64; ``` Source line: `31`. ## slot::SlotClock::current\_slot [#slotslotclockcurrent_slot] Returns the current slot number given the current Unix timestamp. If `now` is before genesis, returns 0. ```rust pub fn current_slot(&self, now: u64) -> u64; ``` Source line: `38`. ## slot::SlotClock::slot\_start\_time [#slotslotclockslot_start_time] Returns the start time (Unix timestamp) of the given slot. SECURITY: Uses saturating arithmetic to prevent overflow for very large slot numbers. Without this, an attacker could supply a slot value that overflows `slot * SLOT_DURATION_SECS`, wrapping the timestamp to a past value and confusing consensus timing checks. ```rust pub fn slot_start_time(&self, slot: u64) -> u64; ``` Source line: `51`. ## slot::SlotClock::slot\_epoch [#slotslotclockslot_epoch] Returns the epoch number that the given slot belongs to. ```rust pub fn slot_epoch(&self, slot: u64) -> u64; ``` Source line: `57`. ## slot::SlotClock::epoch\_start\_slot [#slotslotclockepoch_start_slot] Returns the first slot of the given epoch. ```rust pub fn epoch_start_slot(&self, epoch: u64) -> u64; ``` Source line: `62`. ## slot::SlotClock::is\_first\_slot\_of\_epoch [#slotslotclockis_first_slot_of_epoch] Returns true if the given slot is the first slot of its epoch. ```rust pub fn is_first_slot_of_epoch(&self, slot: u64) -> bool; ``` Source line: `67`. ## slot::SlotClock::slots\_since\_epoch\_start [#slotslotclockslots_since_epoch_start] Returns how many slots have elapsed since the start of the given slot's epoch. ```rust pub fn slots_since_epoch_start(&self, slot: u64) -> u64; ``` Source line: `72`. ## slot::SlotClock::is\_slot\_missed [#slotslotclockis_slot_missed] Returns true if the given slot has been missed (its time window has passed). A slot is considered missed if `now` is past the end of the slot's time window (i.e., past `slot_start_time(slot) + SLOT_DURATION_SECS`). ```rust pub fn is_slot_missed(&self, slot: u64, now: u64) -> bool; ``` Source line: `80`. ## slot::SlotClock::slot\_info [#slotslotclockslot_info] Build a `SlotInfo` for the given slot. ```rust pub fn slot_info(&self, slot: u64) -> SlotInfo; ``` Source line: `87`. # sigil-tower · tower_committee URL: https://docs.sigil.ml/reference/rust/sigil-tower/tower_committee Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/tower_committee.md Source declarations, signatures and documentation for tower_committee. Source: `sigil/node/sigil-tower/src/tower_committee.rs`. SHA-256: `cf7e9e000838232daa293ec0163c170cdbc4cdb9a20ee8ebf853bb15a98fd878`. 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. ## tower\_committee::COMMITTEE\_QUORUM [#tower_committeecommittee_quorum] The required supermajority for committee decisions (7 of 11). ```rust pub const COMMITTEE_QUORUM: usize; ``` Source line: `14`. ## tower\_committee::COMMITTEE\_SIZE [#tower_committeecommittee_size] Default committee size. ```rust pub const COMMITTEE_SIZE: usize; ``` Source line: `17`. ## tower\_committee::DEFAULT\_TERM\_EPOCHS [#tower_committeedefault_term_epochs] Default term length in epochs (\~30 days at 1 epoch/day). ```rust pub const DEFAULT_TERM_EPOCHS: u64; ``` Source line: `20`. ## tower\_committee::TowerCommittee [#tower_committeetowercommittee] The 11-member Tower Committee. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerCommittee { /// DIDs of the 11 committee members. pub members: Vec, /// Epoch at which this committee's term began. pub term_start_epoch: u64, /// Length of the committee's term in epochs. pub term_length_epochs: u64 } ``` Source line: `24`. ## tower\_committee::TowerCommittee::is\_member [#tower_committeetowercommitteeis_member] Whether the given DID is a member of this committee. ```rust pub fn is_member(&self, did: &str) -> bool; ``` Source line: `35`. ## tower\_committee::TowerCommittee::is\_term\_expired [#tower_committeetowercommitteeis_term_expired] Whether the committee's term has expired given the current epoch. ```rust pub fn is_term_expired(&self, current_epoch: u64) -> bool; ``` Source line: `40`. ## tower\_committee::PendingDecision [#tower_committeependingdecision] A pending governance decision awaiting votes. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PendingDecision { /// What kind of decision this is. pub decision_type: DecisionType, /// Votes from committee members (DID -> approve/reject). pub votes: HashMap } ``` Source line: `47`. ## tower\_committee::DecisionType [#tower_committeedecisiontype] Types of governance decisions the Tower Committee can make. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum DecisionType { /// Confirm slashing of a validator (DID of the validator to slash). SlashValidator(String), /// Change a protocol parameter (parameter name, new value). ParameterChange(String, String), } ``` Source line: `56`. ## tower\_committee::DecisionResult [#tower_committeedecisionresult] Result of a completed decision. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum DecisionResult { /// The decision was approved. Approved(DecisionType), /// The decision was rejected. Rejected(DecisionType), } ``` Source line: `65`. ## tower\_committee::TowerCommitteeState [#tower_committeetowercommitteestate] State tracking all pending decisions and the current committee. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TowerCommitteeState { /// The current Tower Committee. pub current_committee: TowerCommittee, /// Pending decisions awaiting votes. pub pending_decisions: Vec } ``` Source line: `74`. ## tower\_committee::TowerCommitteeState::new [#tower_committeetowercommitteestatenew] Create a new state with the given committee and no pending decisions. ```rust pub fn new(committee: TowerCommittee) -> Self; ``` Source line: `83`. ## tower\_committee::TowerCommitteeState::propose [#tower_committeetowercommitteestatepropose] Propose a new decision for the committee to vote on. Returns the index of the new decision. ```rust pub fn propose(&mut self, decision_type: DecisionType) -> usize; ``` Source line: `92`. ## tower\_committee::TowerCommitteeState::vote [#tower_committeetowercommitteestatevote] Cast a vote on a pending decision. Returns `Some(DecisionResult)` if the vote caused the decision to be resolved (approved or rejected), or `None` if more votes are needed. ```rust pub fn vote( &mut self, decision_id: usize, voter_did: &str, approve: bool, ) -> Result, TowerError>; ``` Source line: `105`. ## tower\_committee::TowerCommitteeState::is\_approved [#tower_committeetowercommitteestateis_approved] Check if a specific decision has been approved (has >= 7 approvals). ```rust pub fn is_approved(&self, decision_id: usize) -> bool; ``` Source line: `162`. ## tower\_committee::TowerCommitteeState::pending\_count [#tower_committeetowercommitteestatepending_count] Number of pending decisions. ```rust pub fn pending_count(&self) -> usize; ``` Source line: `170`. # sigil-tower · types URL: https://docs.sigil.ml/reference/rust/sigil-tower/types Markdown: https://docs.sigil.ml/reference/rust/sigil-tower/types.md Source declarations, signatures and documentation for types. Source: `sigil/node/sigil-tower/src/types.rs`. SHA-256: `55e774bf3e1fb1f78ddd5e84b20a0c5ec97c1da9f250fc9dee14fce54e62e054`. 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. ## types::TowerBlock [#typestowerblock] A block on the Tower validator coordination chain. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TowerBlock { pub header: TowerBlockHeader, pub body: TowerBlockBody } ``` Source line: `17`. ## types::TowerBlock::hash [#typestowerblockhash] Compute the hash of this block by hashing the serialized header. ```rust pub fn hash(&self) -> SigilHash; ``` Source line: `24`. ## types::TowerBlockHeader [#typestowerblockheader] Header of a Tower block. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TowerBlockHeader { /// Hash of the parent Tower block. pub parent_hash: SigilHash, /// Slot number for this block. pub slot: u64, /// Epoch this slot belongs to. pub epoch: u64, /// OAS DID of the block proposer. pub proposer_did: String, /// Merkle root of committee assignments for this slot. pub committee_root: SigilHash, /// Optional finality checkpoint included in this block. pub finality_checkpoint: Option, /// Unix timestamp when this block was produced. pub timestamp: u64, /// Chain identifier. pub chain_id: String } ``` Source line: `32`. ## types::TowerBlockBody [#typestowerblockbody] Body of a Tower block containing votes, evidence, and updates. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TowerBlockBody { /// Committee votes for previous slots. pub committee_votes: Vec, /// Finality votes (Casper FFG attestations). pub finality_votes: Vec, /// Slashing evidence submitted in this block. pub evidence: Vec, /// Validator set updates (registrations, exits, etc.). pub validator_updates: Vec } ``` Source line: `53`. ## types::ValidatorRecord [#typesvalidatorrecord] A validator registered in the Tower chain. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ValidatorRecord { /// OAS DID of this validator entity. pub did: String, /// Ed25519 consensus public key. pub public_key: Vec, /// Staked amount in micro-MINT. pub stake: u64, /// Whether this validator is a Block Producer or Block Validator. pub mode: ValidatorMode, /// Geographic region for diversity enforcement. pub geographic_region: GeographicRegion, /// Composite inclusion score (computed from 6 components). pub inclusion_score: f64, /// Current lifecycle status. pub status: ValidatorStatus, /// Epoch at which this validator became active. pub activation_epoch: u64, /// Epoch at which this validator exited (if exited). pub exit_epoch: Option, /// Epoch through which a slashed validator is jailed and excluded. #[serde(default, skip_serializing_if = "Option::is_none")] pub slashed_until_epoch: Option, /// OAS DID of the human root in the lineage chain. pub human_root_did: Option } ``` Source line: `70`. ## types::ValidatorStatus [#typesvalidatorstatus] Lifecycle status of a validator in the Tower registry. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum ValidatorStatus { /// Awaiting activation (e.g., pending epoch boundary). Pending, /// Actively participating in consensus. Active, /// Has requested exit; still active until epoch boundary. Exiting, /// Fully exited; no longer in active set. Exited, /// Slashed and removed from active set. Slashed, } ``` Source line: `98`. ## types::GeographicRegion [#typesgeographicregion] Geographic region for committee diversity enforcement. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum GeographicRegion { NorthAmerica, SouthAmerica, Europe, Asia, Africa, Oceania, MiddleEast, } ``` Source line: `113`. ## types::FinalityCheckpoint [#typesfinalitycheckpoint] A finality checkpoint in the Casper FFG protocol. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct FinalityCheckpoint { /// The epoch this checkpoint covers. pub epoch: u64, /// Hash of the block at the checkpoint boundary. pub block_hash: SigilHash, /// Whether this checkpoint has been justified (2/3 supermajority). pub justified: bool, /// Whether this checkpoint has been finalized. pub finalized: bool } ``` Source line: `129`. ## types::FinalityVote [#typesfinalityvote] A finality vote (Casper FFG attestation) from a validator. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct FinalityVote { /// OAS DID of the voting validator. pub voter_did: String, /// Source epoch (must be a justified checkpoint). pub source_epoch: u64, /// Target epoch being voted for. pub target_epoch: u64, /// Hash of the target block. pub target_hash: SigilHash, /// Stake weight of this vote. pub stake: u64, /// Ed25519 signature over the vote content. pub signature: Vec } ``` Source line: `142`. ## types::SlotInfo [#typesslotinfo] Information about a specific slot. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SlotInfo { /// Slot number. pub slot: u64, /// Epoch this slot belongs to. pub epoch: u64, /// Unix timestamp of the slot start. pub timestamp: u64, /// OAS DID of the assigned proposer, if any. pub proposer_did: Option } ``` Source line: `163`. ## types::CommitteeVote [#typescommitteevote] A committee member's vote on a slot's block. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CommitteeVote { /// OAS DID of the voter. pub voter_did: String, /// The slot being voted on. pub slot: u64, /// Hash of the block being attested. pub block_hash: SigilHash, /// Ed25519 signature. pub signature: Vec } ``` Source line: `180`. ## types::EvidenceType [#typesevidencetype] Types of slashable offenses with attached proof data. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum EvidenceType { /// Validator signed two different blocks at the same slot. DoubleSign { slot: u64, block_hash_a: SigilHash, block_hash_b: SigilHash, }, /// Validator proposed an invalid block. InvalidBlock { slot: u64, block_hash: SigilHash, reason: String, }, /// Validator was offline for an extended period. Downtime { validator_did: String, missed_slots: u64, }, /// Validator cast two conflicting finality votes (surround vote). SurroundVote { vote_a: FinalityVote, vote_b: FinalityVote, }, } ``` Source line: `197`. ## types::SlashingEvidence [#typesslashingevidence] Evidence of a slashable offense submitted to the Tower chain. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SlashingEvidence { /// The type and proof data of the offense. pub evidence_type: EvidenceType, /// OAS DID of the offending validator. pub subject_did: String, /// OAS DID of the entity submitting the evidence. pub submitter_did: String, /// Unix timestamp when the evidence was created. pub timestamp: u64, /// BLAKE3 hash of the evidence payload. pub evidence_hash: SigilHash } ``` Source line: `224`. ## types::ValidatorUpdate [#typesvalidatorupdate] An update to a validator's record in the registry. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum ValidatorUpdate { /// Register a new validator. Register(ValidatorRecord), /// Update an existing validator's stake. StakeChange { did: String, new_stake: u64 }, /// Update an existing validator's status. StatusChange { did: String, new_status: ValidatorStatus, }, /// Update an existing validator's inclusion score. ScoreUpdate { did: String, new_score: f64 }, /// Exit a validator from the active set. Exit { did: String, exit_epoch: u64 }, } ``` Source line: `243`. # sigil-vesting-1 · crate URL: https://docs.sigil.ml/reference/rust/sigil-vesting-1/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-vesting-1/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/../contracts/reference/sigil-vesting-1/src/lib.rs`. SHA-256: `ff5a8b6ac9108184aae47ad575fc1dd665de0d3f5032df9eda3907385430fe5f`. 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. ## ::anvil\_alloc [#anvil_alloc] ```rust #[no_mangle] pub extern "C" fn anvil_alloc(len: i32) -> i32; ``` Source line: `24`. ## ::anvil\_init [#anvil_init] ```rust #[no_mangle] pub extern "C" fn anvil_init(ptr: i32, len: i32) -> i32; ``` Source line: `36`. ## ::anvil\_call [#anvil_call] ```rust #[no_mangle] pub extern "C" fn anvil_call(ptr: i32, len: i32) -> i32; ``` Source line: `67`. # sigil-vesting-1 URL: https://docs.sigil.ml/reference/rust/sigil-vesting-1 Markdown: https://docs.sigil.ml/reference/rust/sigil-vesting-1.md sigil-vesting-1 implementation in the Sigil workspace. sigil-vesting-1 implementation in the Sigil workspace. | Property | Source value | | ---------------- | -------------------------------------------------------------- | | Package | `sigil-vesting-1` | | Manifest version | `1.0.0` | | Source | `sigil/node/../contracts/reference/sigil-vesting-1/Cargo.toml` | | Reference status | source reference | | Publish flag | `false`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_vesting_1` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-vesting-1 = { path = "../sigil-vesting-1" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-vesting-1/crate) — 3 declarations # sigil-velocity-bench · crate URL: https://docs.sigil.ml/reference/rust/sigil-velocity-bench/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-velocity-bench/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-velocity-bench/src/lib.rs`. SHA-256: `70221ff62231a51e88ee35c4add66cdd75fc7de14d2aaacc5336b25685a5b072`. 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. ## ::VelocityBenchError [#velocitybencherror] ```rust #[derive(Debug, Error)] pub enum VelocityBenchError { #[error("core: {0}")] Core(#[from] CoreError), #[error("io: {0}")] Io(#[from] std::io::Error), #[error("json: {0}")] Json(#[from] serde_json::Error), #[error("invalid config: {0}")] InvalidConfig(String), #[error("artifact verification: {0}")] ArtifactVerification(String), } ``` Source line: `30`. ## ::VelocityBenchmarkConfig [#velocitybenchmarkconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityBenchmarkConfig { pub chain_id: String, pub lane_count: u32, pub slots: u64, pub txs_per_lane_slot: u64, pub slot_duration_ns: u64, pub genesis_time_ns: u64, pub starting_balance_per_sender: u128 } ``` Source line: `44`. ## ::VelocityBenchmarkReport [#velocitybenchmarkreport] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityBenchmarkReport { pub config: VelocityBenchmarkConfig, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub committed_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64, pub slot_latency_p50_ns: u64, pub slot_latency_p95_ns: u64, pub lane_blocks: Vec, pub root_commitments: Vec, pub claim_status: String } ``` Source line: `89`. ## ::VelocityBenchmarkReport::verify [#velocitybenchmarkreportverify] ```rust pub fn verify(&self) -> Result; ``` Source line: `104`. ## ::VelocityCompactArtifactReport [#velocitycompactartifactreport] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityCompactArtifactReport { pub config: VelocityBenchmarkConfig, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub committed_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64, pub slot_latency_p50_ns: u64, pub slot_latency_p95_ns: u64, pub lane_block_count: usize, pub root_commitment_count: usize, pub witness_count: usize, pub manifest_hash: String, pub claim_status: String } ``` Source line: `166`. ## ::run\_velocity\_benchmark [#run_velocity_benchmark] ```rust pub fn run_velocity_benchmark( config: VelocityBenchmarkConfig, ) -> Result; ``` Source line: `239`. ## ::write\_velocity\_artifacts [#write_velocity_artifacts] ```rust pub fn write_velocity_artifacts( output_dir: &Path, report: &VelocityBenchmarkReport, ) -> Result<(), VelocityBenchError>; ``` Source line: `357`. ## ::write\_velocity\_compact\_artifacts [#write_velocity_compact_artifacts] ```rust pub fn write_velocity_compact_artifacts( output_dir: &Path, config: VelocityBenchmarkConfig, ) -> Result; ``` Source line: `415`. ## ::verify\_velocity\_compact\_artifacts [#verify_velocity_compact_artifacts] ```rust pub fn verify_velocity_compact_artifacts( output_dir: &Path, ) -> Result; ``` Source line: `476`. ## ::verify\_velocity\_artifacts [#verify_velocity_artifacts] ```rust pub fn verify_velocity_artifacts( output_dir: &Path, ) -> Result; ``` Source line: `735`. ## ::summarize\_by\_slot [#summarize_by_slot] ```rust pub fn summarize_by_slot(report: &VelocityBenchmarkReport) -> BTreeMap; ``` Source line: `858`. ## ::velocity\_json\_rpc\_result [#velocity_json_rpc_result] ```rust pub fn velocity_json_rpc_result( method: &str, params: Option<&serde_json::Value>, status: &VelocityLiveStatus, ) -> Result; ``` Source line: `870`. ## ::aggregate\_velocity\_status [#aggregate_velocity_status] ```rust pub fn aggregate_velocity_status( chain_id: impl Into, worker_statuses: &[VelocityLiveStatus], elapsed_ns: u64, ) -> Result; ``` Source line: `1091`. ## ::VelocityRootValidatorProfile [#velocityrootvalidatorprofile] ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum VelocityRootValidatorProfile { Single, Testnet, Mainnet, } ``` Source line: `1289`. ## ::VelocityRootValidatorProfile::parse [#velocityrootvalidatorprofileparse] ```rust pub fn parse(value: &str) -> Result; ``` Source line: `1296`. ## ::VelocityRootQuorumConfig [#velocityrootquorumconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct VelocityRootQuorumConfig { pub profile: VelocityRootValidatorProfile, pub validator_count: u32, pub required_validators: Option, pub stake_per_validator: u128 } ``` Source line: `1309`. ## ::VelocityRootValidatorStatus [#velocityrootvalidatorstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityRootValidatorStatus { pub did: String, pub mode: String, pub status: String, pub stake: String, pub consensus_public_key: String, pub signed_latest_root: bool } ``` Source line: `1328`. ## ::VelocityRootAttestationStatus [#velocityrootattestationstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityRootAttestationStatus { pub validator_did: String, pub root_height: u64, pub root_hash: String, pub signature: String, pub verified: bool } ``` Source line: `1338`. ## ::VelocityRootQuorumStatus [#velocityrootquorumstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityRootQuorumStatus { pub active_validators: u32, pub required_validators: u32, pub total_stake: String, pub quorum_stake: String, pub signed_validators: u32, pub signed_stake: String, pub threshold_met: bool, pub root_commit_latency_ns: u64, pub latest_commitment_hash: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub covered_lane_committee_assignment_root: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub covered_slashing_demotion_decision_root: Option, pub attestations: Vec } ``` Source line: `1347`. ## ::apply\_velocity\_root\_quorum [#apply_velocity_root_quorum] ```rust pub fn apply_velocity_root_quorum( status: &mut VelocityLiveStatus, config: &VelocityRootQuorumConfig, ) -> Result<(), VelocityBenchError>; ``` Source line: `1389`. ## ::apply\_velocity\_lane\_committee\_rotation [#apply_velocity_lane_committee_rotation] ```rust pub fn apply_velocity_lane_committee_rotation( status: &mut VelocityLiveStatus, rotation_interval_slots: u64, committee_size: usize, sampled_lane_limit: usize, ) -> Result<(), VelocityBenchError>; ``` Source line: `1476`. ## ::apply\_velocity\_full\_lane\_committee\_rotation [#apply_velocity_full_lane_committee_rotation] ```rust pub fn apply_velocity_full_lane_committee_rotation( status: &mut VelocityLiveStatus, rotation_interval_slots: u64, committee_size: usize, ) -> Result<(), VelocityBenchError>; ``` Source line: `1561`. ## ::apply\_velocity\_slashing\_demotion\_status [#apply_velocity_slashing_demotion_status] ```rust pub fn apply_velocity_slashing_demotion_status( status: &mut VelocityLiveStatus, worker_statuses: &[VelocityLiveStatus], ) -> Result<(), VelocityBenchError>; ``` Source line: `1575`. ## ::VelocityLiveConfig [#velocityliveconfig] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLiveConfig { pub chain_id: String, pub lane_count: u32, pub lane_id_base: u32, pub global_lane_count: u32, pub txs_per_lane_slot: u64, pub slot_duration_ns: u64, pub genesis_time_ns: u64, pub starting_balance_per_sender: u128, pub agent_accounts_per_lane: u32, pub transfer_amount: u128, pub allocation_manifest_sha256: Option, pub genesis_hash: Option } ``` Source line: `1820`. ## ::VelocityLiveStatus [#velocitylivestatus] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VelocityLiveStatus { pub chain_id: String, pub live: bool, pub latest_slot: u64, pub root_height: u64, pub lane_count: u32, pub lane_id_base: u32, pub global_lane_count: u32, pub agent_accounts_per_lane: u32, #[serde(default)] pub txs_per_lane_slot: u64, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub committed_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64, pub lane_block_count: u64, pub root_commitment_count: u64, pub worker_machine_count: u32, pub lane_execution_workers: u32, pub slot_duration_ns: u64, pub slot_latency_p50_ns: u64, pub slot_latency_p95_ns: u64, pub wall_clock_elapsed_ns: u64, pub wall_clock_committed_tps: f64, pub target_committed_tps: f64, pub latest_lane_commitment_root: String, pub lagging: bool, pub claim_status: String, #[serde(default)] pub allocation_manifest_sha256: Option, #[serde(default)] pub genesis_hash: Option, #[serde(default)] pub worker_allocation_manifest_sha256s: Vec, #[serde(default)] pub worker_allocation_manifest_mismatch_count: u32, #[serde(default)] pub worker_genesis_hashes: Vec, #[serde(default)] pub worker_genesis_hash_mismatch_count: u32, #[serde(default)] pub recent_transactions: Vec, pub lanes: Vec, #[serde(default)] pub root_validators: Vec, #[serde(default)] pub root_quorum: VelocityRootQuorumStatus, #[serde(default)] pub lane_committee_rotation: VelocityLaneCommitteeRotationStatus, #[serde(default)] pub slashing_demotion: VelocitySlashingDemotionStatus, #[serde(default)] pub worker_chain_ids: Vec, #[serde(default)] pub worker_chain_id_mismatch_count: u32 } ``` Source line: `1909`. ## ::VelocityLiveEngineSnapshot [#velocityliveenginesnapshot] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VelocityLiveEngineSnapshot { pub schema: String, pub config: VelocityLiveConfig, pub latest_slot: u64, pub raw_tx_count: u64, pub accepted_tx_count: u64, pub invalid_tx_count: u64, pub dropped_tx_count: u64, pub lane_block_count: u64, pub root_commitment_count: u64, pub last_execution_elapsed_ns: u64, pub parent_hashes: Vec, pub lane_states: Vec, pub lane_committed_tx_counts: Vec, pub lane_statuses: Vec, pub recent_transactions: Vec, pub slot_latencies: Vec, pub latest_root_commitment: Option } ``` Source line: `1968`. ## ::VelocityLiveStatus::bind\_allocation\_commitments [#velocitylivestatusbind_allocation_commitments] ```rust pub fn bind_allocation_commitments( &mut self, allocation_manifest_sha256: Option, genesis_hash: Option, ); ``` Source line: `1989`. ## ::VelocityLaneCommitteeRotationStatus [#velocitylanecommitteerotationstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneCommitteeRotationStatus { pub enabled: bool, pub core_primitives: bool, pub policy_url: String, pub artifact_url: Option, pub enforcement: String, pub rotation_interval_slots: Option, pub committee_size: u32, pub rotation_epoch: u64, pub randomness_seed: String, pub assignment_root: String, pub sampled_assignment_count: u32, pub sampled_assignments: Vec } ``` Source line: `2039`. ## ::VelocityLaneCommitteeAssignmentStatus [#velocitylanecommitteeassignmentstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneCommitteeAssignmentStatus { pub lane_id: u32, pub rotation_epoch: u64, pub member_validator_dids: Vec, pub assignment_hash: String } ``` Source line: `2074`. ## ::VelocitySlashingDemotionStatus [#velocityslashingdemotionstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocitySlashingDemotionStatus { pub enabled: bool, pub core_primitives: bool, pub policy_url: String, pub artifact_url: Option, pub enforcement: String, pub max_p95_latency_ns: u64, pub max_missed_slots: u64, pub max_invalid_roots: u64, pub max_missing_artifacts: u64, pub demoted_lane_groups: u32, pub slashable_faults: u32, pub decision_root: String, pub sampled_decisions: Vec } ``` Source line: `2082`. ## ::VelocityLaneDemotionDecisionStatus [#velocitylanedemotiondecisionstatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLaneDemotionDecisionStatus { pub lane_id_base: u32, pub lane_count: u32, pub slot_id: u64, pub p95_latency_ns: u64, pub demote: bool, pub slash: bool, pub reasons: Vec } ``` Source line: `2119`. ## ::VelocityLiveLaneStatus [#velocitylivelanestatus] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct VelocityLiveLaneStatus { pub lane_id: u32, pub latest_slot: u64, pub latest_block_hash: String, pub tx_root: String, pub receipt_root: String, pub state_delta_root: String, pub post_state_root: String, pub committed_tx_count: u64 } ``` Source line: `2130`. ## ::VelocityLiveTransactionStatus [#velocitylivetransactionstatus] ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VelocityLiveTransactionStatus { pub hash: String, #[serde(rename = "type")] pub tx_type: String, pub from: String, pub to: String, pub value: String, pub gas: u64, #[serde(rename = "gasPrice")] pub gas_price: u64, pub nonce: u64, #[serde(rename = "blockHeight")] pub block_height: u64, pub timestamp: u64, pub status: String, pub lane_id: u32, pub slot_id: u64, pub payload: serde_json::Value } ``` Source line: `2142`. ## ::VelocityLiveEngine [#velocityliveengine] ```rust #[derive(Debug)] pub struct VelocityLiveEngine { } ``` Source line: `2163`. ## ::VelocityLiveEngine::new [#velocityliveenginenew] ```rust pub fn new(config: VelocityLiveConfig) -> Result; ``` Source line: `2265`. ## ::VelocityLiveEngine::from\_snapshot [#velocityliveenginefrom_snapshot] ```rust pub fn from_snapshot(snapshot: VelocityLiveEngineSnapshot) -> Result; ``` Source line: `2326`. ## ::VelocityLiveEngine::snapshot [#velocityliveenginesnapshot-1] ```rust pub fn snapshot(&self) -> VelocityLiveEngineSnapshot; ``` Source line: `2382`. ## ::VelocityLiveEngine::config [#velocityliveengineconfig] ```rust pub fn config(&self) -> &VelocityLiveConfig; ``` Source line: `2404`. ## ::VelocityLiveEngine::advance\_slot [#velocityliveengineadvance_slot] ```rust pub fn advance_slot(&mut self) -> Result; ``` Source line: `2408`. ## ::VelocityLiveEngine::status [#velocityliveenginestatus] ```rust pub fn status(&self) -> VelocityLiveStatus; ``` Source line: `2516`. ## ::VelocityLiveEngine::status\_with\_elapsed\_ns [#velocityliveenginestatus_with_elapsed_ns] ```rust pub fn status_with_elapsed_ns(&self, elapsed_ns: u64) -> VelocityLiveStatus; ``` Source line: `2522`. # sigil-velocity-bench URL: https://docs.sigil.ml/reference/rust/sigil-velocity-bench Markdown: https://docs.sigil.ml/reference/rust/sigil-velocity-bench.md Sigil Velocity benchmark generator and artifact writer Sigil Velocity benchmark generator and artifact writer | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-velocity-bench` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-velocity-bench/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_velocity_bench` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-velocity-bench = { path = "../sigil-velocity-bench" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-velocity-bench/crate) — 41 declarations # sigil-validator-agent · config URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/config Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/config.md Source declarations, signatures and documentation for config. Source: `sigil/node/sigil-validator-agent/src/config.rs`. SHA-256: `060dce9e40b08c2b077dee1422ab591095d89fba4f4c918bf6e1d1a81a419101`. 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. ## config::Config [#configconfig] Top-level configuration. Loaded from TOML in production deployments. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { /// DID this validator-agent identifies as. Used to sign outbound /// `GovernancePropose` transactions and to authenticate WebSocket /// subscriptions to the RPC node. pub agent_did: String, /// Path or HSM-handle URL for the agent's signing key. In /// production this is an HSM URL, never a raw file in cleartext. pub key_path: String, pub rpc: RpcConfig, pub l1: L1Config, pub l2: L2Config, pub l3: L3Config, pub governance: GovernanceConfig } ``` Source line: `10`. ## config::RpcConfig [#configrpcconfig] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RpcConfig { pub ws_url: String, pub http_url: String, pub reconnect_backoff_initial_ms: u64, pub reconnect_backoff_max_ms: u64 } ``` Source line: `28`. ## config::L1Config [#configl1config] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct L1Config { /// Filesystem path to a local cache of approved rule code blobs, /// refreshed at epoch boundary by querying the on-chain registry. pub rule_cache_path: String } ``` Source line: `47`. ## config::L2Config [#configl2config] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct L2Config { /// Sample rate for L2 triage in basis points. 100 = 1%. pub base_sample_bps: u32, /// Severity-weighted boosts. 10000 = 100%. pub sample_boost_medium_bps: u32, pub sample_boost_high_bps: u32, pub sample_boost_critical_bps: u32, /// Local distilled-model endpoint. pub endpoint: String, pub model: String } ``` Source line: `62`. ## config::L3Config [#configl3config] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct L3Config { /// Per-epoch cycle ceiling. Exceeding this hard-stops L3 dispatch /// for the rest of the epoch. pub cycles_budget_per_epoch: u64, /// Default capability tag for routing. pub default_capability_tag: String, /// Maximum dispatches per minute regardless of cycle budget. pub rate_limit_per_minute: u32 } ``` Source line: `88`. ## config::GovernanceConfig [#configgovernanceconfig] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct GovernanceConfig { /// If true, the runtime queues L3-recommended governance actions for /// an external signer/submission bridge. Default false. pub auto_submit_proposals: bool, /// Action allowlist when `auto_submit_proposals` is true. pub allowed_actions: Vec } ``` Source line: `109`. ## config::Config::safe\_defaults\_for\_test [#configconfigsafe_defaults_for_test] Build a config with safe defaults for testing. Production deployments MUST load from operator-managed TOML, not this default. ```rust pub fn safe_defaults_for_test(agent_did: impl Into) -> Self; ``` Source line: `129`. # sigil-validator-agent · crate URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-validator-agent/src/lib.rs`. SHA-256: `cca0a5fec8d03acb9f289f83404e67ae196cef39465b2ad28040f29a53a8b559`. 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. ## config [#config] ```rust pub mod config; ``` Source line: `39`. ## cycle\_budget [#cycle_budget] ```rust pub mod cycle_budget; ``` Source line: `40`. ## dispatcher [#dispatcher] ```rust pub mod dispatcher; ``` Source line: `41`. ## error [#error] ```rust pub mod error; ``` Source line: `42`. ## event [#event] ```rust pub mod event; ``` Source line: `43`. ## rate\_limit [#rate_limit] ```rust pub mod rate_limit; ``` Source line: `44`. ## runtime [#runtime] ```rust pub mod runtime; ``` Source line: `45`. ## snapshot\_builder [#snapshot_builder] ```rust pub mod snapshot_builder; ``` Source line: `46`. ## pub use config::\{Config, GovernanceConfig, L1Config, L2Config, L3Config, RpcConfig}; [#pub-use-configconfig-governanceconfig-l1config-l2config-l3config-rpcconfig] ```rust pub use config::{Config, GovernanceConfig, L1Config, L2Config, L3Config, RpcConfig}; ``` Source line: `48`. ## pub use cycle\_budget::\{CycleBudget, CycleBudgetError}; [#pub-use-cycle_budgetcyclebudget-cyclebudgeterror] ```rust pub use cycle_budget::{CycleBudget, CycleBudgetError}; ``` Source line: `49`. ## pub use dispatcher::\{ [#pub-use-dispatcher] L3Dispatch, L3DispatchKind, L3DispatchResult, L3Dispatcher, L3Outcome, MockL3Dispatcher, }; ```rust pub use dispatcher::{ L3Dispatch, L3DispatchKind, L3DispatchResult, L3Dispatcher, L3Outcome, MockL3Dispatcher, }; ``` Source line: `50`. ## pub use error::\{Result, ValidatorAgentError}; [#pub-use-errorresult-validatoragenterror] ```rust pub use error::{Result, ValidatorAgentError}; ``` Source line: `53`. ## pub use event::\{ChainEvent, EventStream, JsonLineEventStream, MockEventStream, TransactionEvent}; [#pub-use-eventchainevent-eventstream-jsonlineeventstream-mockeventstream-transactionevent] ```rust pub use event::{ChainEvent, EventStream, JsonLineEventStream, MockEventStream, TransactionEvent}; ``` Source line: `54`. ## pub use rate\_limit::\{RateLimiter, RateLimiterError}; [#pub-use-rate_limitratelimiter-ratelimitererror] ```rust pub use rate_limit::{RateLimiter, RateLimiterError}; ``` Source line: `55`. ## pub use runtime::\{ValidatorAgent, ValidatorAgentHandle}; [#pub-use-runtimevalidatoragent-validatoragenthandle] ```rust pub use runtime::{ValidatorAgent, ValidatorAgentHandle}; ``` Source line: `56`. ## pub use snapshot\_builder::\{ [#pub-use-snapshot_builder] JsonFileSnapshotBuilder, MockSnapshotBuilder, SnapshotBuilder, SnapshotFileSchema, }; ```rust pub use snapshot_builder::{ JsonFileSnapshotBuilder, MockSnapshotBuilder, SnapshotBuilder, SnapshotFileSchema, }; ``` Source line: `57`. ## ::SIGIL\_VALIDATOR\_AGENT\_VERSION [#sigil_validator_agent_version] Crate version surfaced to operators. ```rust pub const SIGIL_VALIDATOR_AGENT_VERSION: &str; ``` Source line: `62`. # sigil-validator-agent · cycle_budget URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/cycle_budget Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/cycle_budget.md Source declarations, signatures and documentation for cycle_budget. Source: `sigil/node/sigil-validator-agent/src/cycle_budget.rs`. SHA-256: `0bb39f436c288d0c2479dfe42222e839e6349be8fb102f6b2d288dcc3652704c`. 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. ## cycle\_budget::CycleBudgetError [#cycle_budgetcyclebudgeterror] ```rust #[derive(Debug, thiserror::Error)] pub enum CycleBudgetError { #[error("epoch {epoch} budget exhausted: requested {requested}, remaining {remaining}")] Exhausted { epoch: u64, requested: u64, remaining: u64, }, } ``` Source line: `13`. ## cycle\_budget::CycleBudget [#cycle_budgetcyclebudget] Per-epoch cycle budget tracker. The runtime calls \[`Self::reserve`] before dispatching an L3 call. On epoch rollover, \[`Self::roll_over_to_epoch`] resets the remaining balance to the configured budget. The tracker is `Send + Sync` and safe to share across the runtime's tasks via `Arc`. ```rust #[derive(Debug)] pub struct CycleBudget { } ``` Source line: `29`. ## cycle\_budget::CycleBudget::new [#cycle_budgetcyclebudgetnew] ```rust pub fn new(budget_per_epoch: u64, starting_epoch: u64) -> Self; ``` Source line: `42`. ## cycle\_budget::CycleBudget::budget\_per\_epoch [#cycle_budgetcyclebudgetbudget_per_epoch] Configured per-epoch budget. ```rust pub fn budget_per_epoch(&self) -> u64; ``` Source line: `54`. ## cycle\_budget::CycleBudget::current\_epoch [#cycle_budgetcyclebudgetcurrent_epoch] Current epoch. ```rust pub fn current_epoch(&self) -> u64; ``` Source line: `59`. ## cycle\_budget::CycleBudget::remaining [#cycle_budgetcyclebudgetremaining] Remaining cycles available in the current epoch. ```rust pub fn remaining(&self) -> u64; ``` Source line: `64`. ## cycle\_budget::CycleBudget::consumed\_this\_epoch [#cycle_budgetcyclebudgetconsumed_this_epoch] Cycles consumed so far in the current epoch. ```rust pub fn consumed_this_epoch(&self) -> u64; ``` Source line: `69`. ## cycle\_budget::CycleBudget::reserve [#cycle_budgetcyclebudgetreserve] Try to reserve `cycles` from the current epoch's budget. Returns Ok if reserved, Err if the reservation would exceed the remaining balance. The reservation is debited atomically. ```rust pub fn reserve(&self, cycles: u64) -> Result<(), CycleBudgetError>; ``` Source line: `77`. ## cycle\_budget::CycleBudget::roll\_over\_to\_epoch [#cycle_budgetcyclebudgetroll_over_to_epoch] Roll over to a new epoch. Resets the remaining balance to the configured budget. No-op if `new_epoch == current_epoch`. Rejects backward rollover (returns Err) — epochs only advance. ```rust pub fn roll_over_to_epoch(&self, new_epoch: u64) -> Result<(), &'static str>; ``` Source line: `94`. # sigil-validator-agent · dispatcher URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/dispatcher Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/dispatcher.md Source declarations, signatures and documentation for dispatcher. Source: `sigil/node/sigil-validator-agent/src/dispatcher.rs`. SHA-256: `6f640f2de705b02d8ae52ee447cfb72b4d8f4cafde02efdf6e762467ccf4b1eb`. 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. ## dispatcher::L3DispatchKind [#dispatcherl3dispatchkind] What an L3 dispatch is asking a provider to do. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum L3DispatchKind { /// Investigate a flagged transaction. AnomalyInvestigation, /// Reason about a governance proposal. GovernanceReasoning, /// Code review for an agent-led pipeline (D13). CodeReview, } ``` Source line: `18`. ## dispatcher::L3Dispatch [#dispatcherl3dispatch] One L3 dispatch request. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct L3Dispatch { pub kind: L3DispatchKind, /// Capability tag the provider must serve. pub capability_tag: String, /// Hash of the input the model will process. pub input_hash: [u8; 32], /// Estimated cycle cost reserved up front. pub estimated_cycles: u64, /// Identifier the runtime uses to correlate request and response. pub request_id: [u8; 32] } ``` Source line: `29`. ## dispatcher::L3DispatchResult [#dispatcherl3dispatchresult] What an L3 provider returns. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct L3DispatchResult { pub request_id: [u8; 32], /// Hash of the model that produced the output. Bound into the /// TEE attestation for offline verification. pub model_hash: [u8; 32], /// Hash of the canonical output bytes. pub output_hash: [u8; 32], /// Provider DID that produced the output. pub provider_did: String, /// Recommendation surfaced to downstream consumers. pub recommendation: L3Outcome } ``` Source line: `43`. ## dispatcher::L3Outcome [#dispatcherl3outcome] Recommendation kinds. The runtime maps these to concrete actions (governance proposals, model deprecation, etc.) at consumption time. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "action", rename_all = "PascalCase")] pub enum L3Outcome { /// No action recommended. NoAction, /// Recommend deprecation of an inference model. DeprecateInferenceModel { model_hash: [u8; 32] }, /// Recommend a governance parameter change. ParameterUpdate { parameter_key: String, proposed_value: String, }, /// Free-form findings to log; no automated action. LogFindings { rationale: String }, } ``` Source line: `60`. ## dispatcher::L3Outcome::action\_kind [#dispatcherl3outcomeaction_kind] Stable identifier for allowlist matching. ```rust pub fn action_kind(&self) -> &'static str; ``` Source line: `76`. ## dispatcher::L3Dispatcher [#dispatcherl3dispatcher] Dispatcher abstraction. Production uses a real `dispatch_compute` client; tests use \[`MockL3Dispatcher`]. ```rust #[async_trait] pub trait L3Dispatcher: Send + Sync { async fn dispatch(&self, request: L3Dispatch) -> Result; } ``` Source line: `89`. ## dispatcher::MockL3Dispatcher [#dispatchermockl3dispatcher] In-memory dispatcher for tests. Pre-populate responses keyed by `request_id`; calls to `dispatch` return the matching response or the default if no match is found. ```rust pub struct MockL3Dispatcher { } ``` Source line: `96`. ## dispatcher::MockL3Dispatcher::new [#dispatchermockl3dispatchernew] ```rust pub fn new(default: L3DispatchResult) -> Self; ``` Source line: `103`. ## dispatcher::MockL3Dispatcher::set\_response [#dispatchermockl3dispatcherset_response] ```rust pub fn set_response(&self, request_id: [u8; 32], result: L3DispatchResult); ``` Source line: `111`. ## dispatcher::MockL3Dispatcher::call\_count [#dispatchermockl3dispatchercall_count] ```rust pub fn call_count(&self) -> u32; ``` Source line: `115`. # sigil-validator-agent · error URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/error Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-validator-agent/src/error.rs`. SHA-256: `030b49d9acdd7bcbe640de47d4a9ae24346304f31d6bd4e98ab5d92dc815ccb6`. 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. ## error::ValidatorAgentError [#errorvalidatoragenterror] ```rust #[derive(Debug, Error)] pub enum ValidatorAgentError { #[error("config error: {0}")] Config(String), #[error("cycle budget exhausted for epoch {epoch} (budget {budget}, requested {requested})")] CycleBudgetExhausted { epoch: u64, budget: u64, requested: u64, }, #[error("rate limit exceeded: {dispatched} dispatches in last minute (cap {cap})")] RateLimitExceeded { dispatched: u32, cap: u32 }, #[error("L3 action {action_kind} not on auto-submit allowlist {allowed:?}")] L3ActionNotAllowed { action_kind: String, allowed: Vec, }, #[error("L3 dispatch failed: {0}")] L3DispatchFailed(String), #[error("event stream closed unexpectedly")] EventStreamClosed, #[error("anomaly evaluation error: {0}")] AnomalyEvaluation(#[from] sigil_anomaly::AnomalyError), } ``` Source line: `6`. ## error::Result [#errorresult] ```rust pub type Result = std::result::Result; ``` Source line: `36`. # sigil-validator-agent · event URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/event Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/event.md Source declarations, signatures and documentation for event. Source: `sigil/node/sigil-validator-agent/src/event.rs`. SHA-256: `6d3383e3ffde44daf7eb00397a98c99fca2fa4ed350deeca4d8b7abb5d2f8c93`. 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. ## event::TransactionEvent [#eventtransactionevent] Opaque transaction event from the chain. ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct TransactionEvent { /// BLAKE3 hash of the canonical transaction bytes. pub tx_hash: [u8; 32], /// Canonical transaction bytes (opaque to this crate). pub tx_bytes: Vec, /// Block height at which the transaction was included. pub block_height: u64, /// Block hash at which the transaction was included. pub block_hash: [u8; 32], /// Epoch at which the transaction was included. pub epoch: u64 } ``` Source line: `23`. ## event::ChainEvent [#eventchainevent] Tagged enum of chain events the runtime consumes. ```rust #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "kind", rename_all = "snake_case")] pub enum ChainEvent { /// A new transaction was included in a block. Transaction(TransactionEvent), /// A new epoch began. The runtime uses this to roll the cycle /// budget over. EpochAdvance { new_epoch: u64 }, /// The connection to the RPC node was reset; the runtime should /// treat any in-flight state as potentially stale. Reconnect, } ``` Source line: `39`. ## event::EventStream [#eventeventstream] Trait abstracting the source of chain events. Production uses a WebSocket subscriber; tests use \[`MockEventStream`]. ```rust #[async_trait] pub trait EventStream: Send + Sync { async fn next_event(&self) -> Result; } ``` Source line: `53`. ## event::MockEventStream [#eventmockeventstream] In-memory event stream for tests. Pre-populate via \[`Self::push`]. ```rust #[derive(Default)] pub struct MockEventStream { } ``` Source line: `59`. ## event::MockEventStream::new [#eventmockeventstreamnew] ```rust pub fn new() -> Self; ``` Source line: `64`. ## event::MockEventStream::push [#eventmockeventstreampush] ```rust pub fn push(&self, event: ChainEvent); ``` Source line: `68`. ## event::MockEventStream::push\_all [#eventmockeventstreampush_all] ```rust pub fn push_all(&self, events: impl IntoIterator); ``` Source line: `72`. ## event::MockEventStream::len [#eventmockeventstreamlen] ```rust pub fn len(&self) -> usize; ``` Source line: `79`. ## event::MockEventStream::is\_empty [#eventmockeventstreamis_empty] ```rust pub fn is_empty(&self) -> bool; ``` Source line: `83`. ## event::JsonLineEventStream [#eventjsonlineeventstream] Newline-delimited JSON event stream over any `AsyncRead`. Each line of the underlying source is expected to deserialize to a \[`ChainEvent`] via serde\_json. The stream returns \[`ValidatorAgentError::EventStreamClosed`] when the source reaches EOF. Malformed lines yield \[`ValidatorAgentError::Config`] errors (since they indicate a bug in the upstream producer rather than a recoverable runtime condition). ## Why this exists [#why-this-exists] Decouples the validator-agent from the specific RPC client choice. Operators wire any external fetcher (tokio-tungstenite WebSocket client, reqwest HTTP poller, sigil-rpc subscriber, ssh tunnel, etc.) to emit JSON-lines on stdout, then pipe into the validator-agent. This is a Unix-pipeline composition pattern: each component is testable in isolation and operators choose how to compose them. ## Production wiring [#production-wiring] Once Agent 05's RPC subscription surface is finalized, a sibling crate (`sigil-validator-agent-rpc-bridge` or similar) will provide a `tokio` task that subscribes to the chain via WebSocket and writes `ChainEvent` JSON-lines to a pipe. The validator-agent reads from the pipe via this `JsonLineEventStream`. ```rust pub struct JsonLineEventStream { } ``` Source line: `123`. ## event::JsonLineEventStream\::new [#eventjsonlineeventstreamrnew] ```rust pub fn new(reader: R) -> Self; ``` Source line: `128`. ## event::JsonLineEventStream\::shared [#eventjsonlineeventstreamrshared] Wrap an `Arc` for shared ownership across tasks. ```rust pub fn shared(reader: R) -> Arc; ``` Source line: `135`. # sigil-validator-agent URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent.md Off-chain validator-agent runtime for Sigil. Subscribes to chain events, runs sigil-anomaly L1 rules, samples for L2 small-model triage, dispatches L3 large-model inference via dispatch_compute, aggregates results, optionally submits governance proposals. Code-enforced airgap: this crate has zero deps on sigil-consensus, sigil-tower, sigil-execution, sigil-state, sigil-storage, sigil-network, sigil-node, sigil-rpc (server). It is a CLIENT of the chain, not part of the chain. Off-chain validator-agent runtime for Sigil. Subscribes to chain events, runs sigil-anomaly L1 rules, samples for L2 small-model triage, dispatches L3 large-model inference via dispatch\_compute, aggregates results, optionally submits governance proposals. Code-enforced airgap: this crate has zero deps on sigil-consensus, sigil-tower, sigil-execution, sigil-state, sigil-storage, sigil-network, sigil-node, sigil-rpc (server). It is a CLIENT of the chain, not part of the chain. | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-validator-agent` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-validator-agent/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_validator_agent` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-validator-agent = { path = "../sigil-validator-agent" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-validator-agent/crate) — 17 declarations * [config](/reference/rust/sigil-validator-agent/config) — 7 declarations * [cycle\_budget](/reference/rust/sigil-validator-agent/cycle_budget) — 9 declarations * [dispatcher](/reference/rust/sigil-validator-agent/dispatcher) — 10 declarations * [error](/reference/rust/sigil-validator-agent/error) — 2 declarations * [event](/reference/rust/sigil-validator-agent/event) — 12 declarations * [rate\_limit](/reference/rust/sigil-validator-agent/rate_limit) — 12 declarations * [runtime](/reference/rust/sigil-validator-agent/runtime) — 7 declarations * [snapshot\_builder](/reference/rust/sigil-validator-agent/snapshot_builder) — 9 declarations # sigil-validator-agent · rate_limit URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/rate_limit Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/rate_limit.md Source declarations, signatures and documentation for rate_limit. Source: `sigil/node/sigil-validator-agent/src/rate_limit.rs`. SHA-256: `2bf7ab65e23c6c53539faec6bed0c4c9132027824cf36c4a9f2a9a63f6880983`. 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. ## rate\_limit::RateLimiterError [#rate_limitratelimitererror] ```rust #[derive(Debug, thiserror::Error)] pub enum RateLimiterError { #[error("rate limit exceeded: {dispatched} in last 60s, cap {cap}")] Exceeded { dispatched: u32, cap: u32 }, } ``` Source line: `16`. ## rate\_limit::Clock [#rate_limitclock] Pluggable clock surface so tests can advance time deterministically. ```rust pub trait Clock: Send + Sync { fn now_unix_ms(&self) -> u64; } ``` Source line: `22`. ## rate\_limit::SystemClock [#rate_limitsystemclock] Real wall-clock implementation. ```rust #[derive(Debug, Clone, Copy)] pub struct SystemClock; ``` Source line: `28`. ## rate\_limit::ManualClock [#rate_limitmanualclock] Test clock with manually-advanced time. ```rust #[derive(Debug, Default)] pub struct ManualClock { } ``` Source line: `42`. ## rate\_limit::ManualClock::new [#rate_limitmanualclocknew] ```rust pub fn new(start_ms: u64) -> Self; ``` Source line: `47`. ## rate\_limit::ManualClock::advance\_ms [#rate_limitmanualclockadvance_ms] ```rust pub fn advance_ms(&self, delta_ms: u64); ``` Source line: `52`. ## rate\_limit::RateLimiter [#rate_limitratelimiter] Sliding-window per-minute rate limiter. ```rust pub struct RateLimiter { } ``` Source line: `64`. ## rate\_limit::RateLimiter\::new [#rate_limitratelimitersystemclocknew] ```rust pub fn new(cap_per_minute: u32) -> Self; ``` Source line: `80`. ## rate\_limit::RateLimiter\::with\_clock [#rate_limitratelimitercwith_clock] ```rust pub fn with_clock(cap_per_minute: u32, clock: C) -> Self; ``` Source line: `86`. ## rate\_limit::RateLimiter\::check\_and\_record [#rate_limitratelimiterccheck_and_record] Record a dispatch and return Ok if within cap, Err if not. The dispatch is recorded only on Ok; rejected dispatches do NOT count toward the limit. ```rust pub fn check_and_record(&self) -> Result<(), RateLimiterError>; ``` Source line: `109`. ## rate\_limit::RateLimiter\::dispatched\_in\_window [#rate_limitratelimitercdispatched_in_window] Number of dispatches in the last 60 seconds (approximate; reflects the queue at the most recent prune). ```rust pub fn dispatched_in_window(&self) -> u32; ``` Source line: `125`. ## rate\_limit::RateLimiter\::cap [#rate_limitratelimiterccap] ```rust pub fn cap(&self) -> u32; ``` Source line: `129`. # sigil-validator-agent · runtime URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/runtime Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/runtime.md Source declarations, signatures and documentation for runtime. Source: `sigil/node/sigil-validator-agent/src/runtime.rs`. SHA-256: `29fb095ee09e7ed5e5c8308dbe083830753e9dd63ec7fd3eda240263bca63fca`. 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. ## runtime::ValidatorAgent [#runtimevalidatoragent] The validator-agent runtime. Holds all the pieces; the consumer drives evaluation by calling \[`ValidatorAgent::process_event`] in a loop. ```rust pub struct ValidatorAgent { } ``` Source line: `29`. ## runtime::ValidatorAgentHandle [#runtimevalidatoragenthandle] Handle returned from processing a single chain event. Consumer inspects to decide whether to surface metrics, submit governance proposals, etc. ```rust #[derive(Debug, Default)] pub struct ValidatorAgentHandle { pub flags: Vec, pub l3_dispatched: u32, pub l3_skipped_budget: u32, pub l3_skipped_rate: u32, pub l3_outcomes: Vec, pub governance_proposals_queued: Vec, pub governance_proposals_blocked: Vec } ``` Source line: `41`. ## runtime::ValidatorAgent::new [#runtimevalidatoragentnew] ```rust pub fn new( config: Config, rule_set: RuleSet, starting_epoch: u64, dispatcher: Arc, ) -> Self; ``` Source line: `52`. ## runtime::ValidatorAgent::config [#runtimevalidatoragentconfig] ```rust pub fn config(&self) -> &Config; ``` Source line: `72`. ## runtime::ValidatorAgent::cycle\_budget [#runtimevalidatoragentcycle_budget] ```rust pub fn cycle_budget(&self) -> &CycleBudget; ``` Source line: `76`. ## runtime::ValidatorAgent::process\_event [#runtimevalidatoragentprocess_event] Process a single chain event. Returns a handle describing what happened: flags emitted, L3 dispatches issued, governance proposals queued or blocked. ```rust pub async fn process_event( &self, event: &ChainEvent, view: &SnapshotView, ) -> Result; ``` Source line: `83`. ## runtime::run\_with\_stream [#runtimerun_with_stream] Drive the runtime against an event stream until it yields `EventStreamClosed` or another error. Each event is processed against a freshly-supplied `SnapshotView` (built externally). ```rust pub async fn run_with_stream( agent: &ValidatorAgent, stream: &S, mut snapshot_for: F, ) -> Result<()> where S: EventStream, F: FnMut(&ChainEvent) -> SnapshotView,; ``` Source line: `212`. # sigil-validator-agent · snapshot_builder URL: https://docs.sigil.ml/reference/rust/sigil-validator-agent/snapshot_builder Markdown: https://docs.sigil.ml/reference/rust/sigil-validator-agent/snapshot_builder.md Source declarations, signatures and documentation for snapshot_builder. Source: `sigil/node/sigil-validator-agent/src/snapshot_builder.rs`. SHA-256: `ae94b7b30c2d1e310eddc9345e923dea36ceeb92a953457e3ceed7d09c047d13`. 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. ## snapshot\_builder::SnapshotBuilder [#snapshot_buildersnapshotbuilder] Build a \[`SnapshotView`] for the given event. The snapshot's `block_height` should reflect the block in which the event occurred. The set of keys included must be a superset of every required key declared by the rules in `rule_set`'s metadata; the runtime relies on this to avoid running rules against incomplete views. ```rust #[async_trait] pub trait SnapshotBuilder: Send + Sync { async fn build(&self, event: &ChainEvent, rule_set: &RuleSet) -> Result; } ``` Source line: `50`. ## snapshot\_builder::MockSnapshotBuilder [#snapshot_buildermocksnapshotbuilder] Mock builder for tests. Holds a pre-populated snapshot in memory and returns it (with the event's block height applied) for every call. The snapshot itself is supplied at construction; the same snapshot is returned regardless of `rule_set` content. ```rust pub struct MockSnapshotBuilder { } ``` Source line: `58`. ## snapshot\_builder::MockSnapshotBuilder::new [#snapshot_buildermocksnapshotbuildernew] ```rust pub fn new(base: SnapshotView) -> Self; ``` Source line: `63`. ## snapshot\_builder::MockSnapshotBuilder::replace [#snapshot_buildermocksnapshotbuilderreplace] ```rust pub fn replace(&self, view: SnapshotView); ``` Source line: `69`. ## snapshot\_builder::SnapshotFileSchema [#snapshot_buildersnapshotfileschema] On-disk JSON description of a snapshot view, parsed by \[`JsonFileSnapshotBuilder`]. ## File format [#file-format] ```json { "block_height": 100, "block_hash_hex": "0000000000000000000000000000000000000000000000000000000000000000", "entries": { "metric:avg_gas_per_block:last_64": "e803000000000000", "lineage_depth:abcd...": "05000000" } } ``` `entries` values are hex-encoded bytes — operators write raw byte strings in hex because the on-chain format for many keys is little-endian fixed-width integers (e.g., `e803000000000000` is `1000u64 LE`). The hex-encoded format is operator-readable and avoids forcing operators to write base64. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SnapshotFileSchema { pub block_height: u64, /// Hex-encoded BLAKE3-32 block hash. Must be exactly 64 hex chars. pub block_hash_hex: String, /// Map of snapshot key → hex-encoded byte value. #[serde(default)] pub entries: std::collections::BTreeMap } ``` Source line: `118`. ## snapshot\_builder::SnapshotFileSchema::into\_view [#snapshot_buildersnapshotfileschemainto_view] ```rust pub fn into_view(self) -> std::result::Result; ``` Source line: `128`. ## snapshot\_builder::JsonFileSnapshotBuilder [#snapshot_builderjsonfilesnapshotbuilder] Snapshot builder that loads a single snapshot view from a JSON file. Useful for offline analysis (the `simulate` subcommand) and for reproducible test runs. The same view is returned for every event, with the event's block\_height applied to Transaction events. ```rust pub struct JsonFileSnapshotBuilder { } ``` Source line: `171`. ## snapshot\_builder::JsonFileSnapshotBuilder::load\_from [#snapshot_builderjsonfilesnapshotbuilderload_from] ```rust pub fn load_from(path: impl AsRef) -> std::result::Result; ``` Source line: `177`. ## snapshot\_builder::JsonFileSnapshotBuilder::source [#snapshot_builderjsonfilesnapshotbuildersource] ```rust pub fn source(&self) -> &Path; ``` Source line: `190`. # sigil-wallet-core · crate URL: https://docs.sigil.ml/reference/rust/sigil-wallet-core/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet-core/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-wallet-core/src/lib.rs`. SHA-256: `9bd22529c7bb78489b72a8e79e464859f8b3cbba04dfeeed6a48b58eb5f8359c`. 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. ## ::WalletCoreError [#walletcoreerror] ```rust #[derive(Debug, thiserror::Error)] pub enum WalletCoreError { #[error("transaction error: {0}")] Transaction(String), #[error("amount error: {0}")] Amount(String), #[error("identity error: {0}")] Identity(String), #[error("hex error: {0}")] Hex(#[from] hex::FromHexError), } ``` Source line: `10`. ## ::WalletCoreResult [#walletcoreresult] ```rust pub type WalletCoreResult = Result; ``` Source line: `21`. ## ::transaction\_signing\_bytes [#transaction_signing_bytes] ```rust pub fn transaction_signing_bytes(tx: &Transaction) -> WalletCoreResult>; ``` Source line: `23`. ## ::transaction\_digest\_hex [#transaction_digest_hex] ```rust pub fn transaction_digest_hex(tx: &Transaction) -> WalletCoreResult; ``` Source line: `28`. ## ::sign\_transaction [#sign_transaction] ```rust pub fn sign_transaction( tx: Transaction, signing_key: &SigningKey, ) -> WalletCoreResult; ``` Source line: `33`. ## ::sign\_transaction\_with\_key\_hex [#sign_transaction_with_key_hex] ```rust pub fn sign_transaction_with_key_hex( tx: Transaction, signing_key_hex: &str, ) -> WalletCoreResult; ``` Source line: `41`. ## ::verify\_signed\_transaction [#verify_signed_transaction] ```rust pub fn verify_signed_transaction(tx: &SignedTransaction) -> WalletCoreResult<()>; ``` Source line: `53`. ## ::parse\_display\_amount\_to\_base\_units [#parse_display_amount_to_base_units] ```rust pub fn parse_display_amount_to_base_units( input: &str, base_units_per_display: u128, ) -> WalletCoreResult; ``` Source line: `58`. ## ::format\_base\_units [#format_base_units] ```rust pub fn format_base_units(amount: u128, base_units_per_display: u128) -> WalletCoreResult; ``` Source line: `122`. ## ::address\_hex\_from\_did [#address_hex_from_did] ```rust pub fn address_hex_from_did(did: &str) -> WalletCoreResult; ``` Source line: `136`. ## ::PublicIdentityBundle [#publicidentitybundle] ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PublicIdentityBundle { pub username: Option, pub root_did: String, pub identity_kind: String, pub public_key_hex: String, pub recovery_policy: String, pub signed_genesis_claim: Option } ``` Source line: `143`. ## ::PublicIdentityBundle::validate\_public\_only [#publicidentitybundlevalidate_public_only] ```rust pub fn validate_public_only(&self) -> WalletCoreResult<()>; ``` Source line: `153`. # sigil-wallet-core URL: https://docs.sigil.ml/reference/rust/sigil-wallet-core Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet-core.md Canonical Sigil wallet core for signing, amounts, DID bindings, and cross-surface conformance Canonical Sigil wallet core for signing, amounts, DID bindings, and cross-surface conformance | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-wallet-core` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-wallet-core/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_wallet_core` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-wallet-core = { path = "../sigil-wallet-core" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-wallet-core/crate) — 12 declarations # sigil-wallet · cli URL: https://docs.sigil.ml/reference/rust/sigil-wallet/cli Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/cli.md Source declarations, signatures and documentation for cli. Source: `sigil/node/sigil-wallet/src/cli.rs`. SHA-256: `da6cb74804ef0319bf031fdac7fe4f4fbbe315f84a843d5c095cad1f9fca4a38`. 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. ## cli::Cli [#clicli] Sigil Wallet -- manage identities, transfer tokens, stake, and govern. The Sigil wallet is how agents interact with the Sigil blockchain. Create identities, manage keys, transfer MINT coins, stake as a validator, and participate in on-chain governance. Examples: sigil-wallet identity create --namespace sigil --name alice --kind hmr sigil-wallet balance sigil-wallet transfer --to did:oas:sigil:agent:bob --amount 1000000 sigil-wallet stake deposit --amount 10000000000 --mode producer sigil-wallet username register --name alice --years 1 --set-primary sigil-wallet gov propose --title "Raise gas" --description "Let us raise the limit" ```rust #[derive(Debug, Clone, Parser)] #[command( name = "sigil-wallet", version, about = "Sigil blockchain wallet for agent identity, transfers, staking, and governance", long_about = None, after_help = "For more information, visit https://docs.sigil.ml/wallet" )] pub struct Cli { /// Subcommand to execute. #[command(subcommand)] pub command: Commands, /// RPC endpoint URL for the Sigil node. #[arg(long, global = true, env = "SIGIL_RPC_URL")] pub rpc_url: Option, /// Chain ID to target. #[arg(long, global = true, env = "SIGIL_CHAIN_ID")] pub chain_id: Option } ``` Source line: `26`. ## cli::Commands [#clicommands] Top-level command groups. ```rust #[derive(Debug, Clone, Subcommand)] pub enum Commands { /// Manage identities (create, derive, list, show, export, import). Identity { #[command(subcommand)] cmd: IdentityCommands, }, /// Query account balance. /// /// Examples: /// sigil-wallet balance /// sigil-wallet balance --did did:oas:sigil:hmr:alice Balance { /// DID to check (defaults to configured identity). #[arg(long)] did: Option, }, /// Transfer MINT to another account. /// /// Examples: /// sigil-wallet transfer --to did:oas:sigil:agent:bob --amount 1000000 /// sigil-wallet transfer --from did:oas:sigil:hmr:alice --to did:oas:sigil:agent:bob --amount 5000000 --memo "payment" Transfer { /// Recipient DID. #[arg(long)] to: String, /// Amount in micro-MINT. #[arg(long)] amount: u64, /// Sender DID (defaults to configured identity). #[arg(long)] from: Option, /// Optional memo attached to the transfer. #[arg(long)] memo: Option, }, /// View transaction history. History { /// DID to query (defaults to configured identity). #[arg(long)] did: Option, /// Maximum number of transactions to show. #[arg(long, default_value_t = 20)] limit: u32, }, /// Staking operations. /// /// Examples: /// sigil-wallet stake deposit --amount 10000000000 --mode producer /// sigil-wallet stake withdraw --amount 5000000000 /// sigil-wallet stake delegate --to did:oas:sigil:agent:v1 --amount 1000000000 /// sigil-wallet stake rewards Stake { #[command(subcommand)] cmd: StakeCommands, }, /// Username registry operations. /// /// Examples: /// sigil-wallet username register --name alice --years 1 --set-primary /// sigil-wallet username set-primary --name alice /// sigil-wallet username show --name alice Username { #[command(subcommand)] cmd: UsernameCommands, }, /// Governance operations. /// /// Examples: /// sigil-wallet gov propose --title "Raise gas limit" --description "Proposal to increase gas" /// sigil-wallet gov vote --proposal prop-001 --vote yes /// sigil-wallet gov list /// sigil-wallet gov show prop-001 Gov { #[command(subcommand)] cmd: GovCommands, }, /// Agent Contract Zone operations. /// /// Examples: /// sigil-wallet contract register-code --code ./token.wasm --license Apache-2.0 /// sigil-wallet contract deploy --contract-did did:oas:sigil:contract:token --code-hash Contract { #[command(subcommand)] cmd: ContractCommands, }, /// Wallet configuration. /// /// Examples: /// sigil-wallet config set --rpc http://localhost:12618 /// sigil-wallet config set --chain-id sigil-testnet-1 /// sigil-wallet config set --default-identity did:oas:sigil:hmr:alice /// sigil-wallet config show Config { #[command(subcommand)] cmd: ConfigCommands, }, /// Query Sigil node status. /// /// Examples: /// sigil-wallet node status /// sigil-wallet node info Node { #[command(subcommand)] cmd: NodeCommands, }, } ``` Source line: `42`. ## cli::IdentityCommands [#cliidentitycommands] Identity management subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum IdentityCommands { /// Create a new identity with a fresh Ed25519 keypair. /// /// Examples: /// sigil-wallet identity create --namespace sigil --name alice --kind hmr /// sigil-wallet identity create --namespace sigil --name l1fe-labs --kind enr /// sigil-wallet identity create --namespace sigil --name my-bot --kind agent Create { /// Namespace for the DID (e.g. "sigil"). #[arg(long)] namespace: String, /// Name / identifier within the namespace. #[arg(long)] name: String, /// Identity kind: "hmr", "mhr", "enr", or "agent". #[arg(long, default_value = "hmr")] kind: String, }, /// Derive a child identity from an existing parent. /// /// Examples: /// sigil-wallet identity derive --parent did:oas:sigil:hmr:alice --name bot-1 --kind agent Derive { /// Parent DID to derive from. #[arg(long)] parent: String, /// Name for the child identity. #[arg(long)] name: String, /// Kind of child identity: "hmr", "mhr", "enr", or "agent". #[arg(long, default_value = "agent")] kind: String, }, /// List all identities in the local keystore. List, /// Show details of a specific identity. Show { /// DID of the identity to show. did: String, }, /// Export an identity to a file (encrypted keystore format). Export { /// DID of the identity to export. did: String, /// Output file path. #[arg(long, short)] output: String, }, /// Import an identity from an exported file. Import { /// Path to the keystore file to import. file: String, }, } ``` Source line: `160`. ## cli::StakeCommands [#clistakecommands] Staking subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum StakeCommands { /// Deposit stake to become a validator. /// /// Examples: /// sigil-wallet stake deposit --amount 10000000000 --mode producer /// sigil-wallet stake deposit --amount 1000000000 --mode validator --did did:oas:sigil:agent:v1 Deposit { /// Amount in micro-MINT. #[arg(long)] amount: u64, /// Validator mode: "producer" or "validator". #[arg(long)] mode: String, /// Identity DID (defaults to configured identity). #[arg(long)] did: Option, }, /// Withdraw staked tokens (begins unbonding period). Withdraw { /// Amount in micro-MINT. #[arg(long)] amount: u64, /// Identity DID (defaults to configured identity). #[arg(long)] did: Option, }, /// Delegate stake to a validator. Delegate { /// Validator DID to delegate to. #[arg(long)] to: String, /// Amount in micro-MINT. #[arg(long)] amount: u64, /// Delegator identity DID (defaults to configured identity). #[arg(long)] did: Option, }, /// View accumulated staking rewards. Rewards { /// Identity DID (defaults to configured identity). #[arg(long)] did: Option, }, /// Show staking information for an identity. Info { /// Identity DID (defaults to configured identity). #[arg(long)] did: Option, }, } ``` Source line: `222`. ## cli::UsernameCommands [#cliusernamecommands] Username registry subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum UsernameCommands { /// Register a username by paying the chain-defined lease price. Register { /// Username to register. The chain canonicalizes ASCII case. #[arg(long)] name: String, /// Lease duration in years. #[arg(long, default_value_t = 1)] years: u32, /// Owner DID (defaults to configured identity). #[arg(long)] owner: Option, /// Optional 32-byte metadata content hash as hex or blake3:. #[arg(long)] metadata_cid: Option, /// Submit a follow-up SetReverseUsername transaction after registration. #[arg(long)] set_primary: bool, }, /// Set a username as the primary reverse lookup for a DID. SetPrimary { /// Username to use as primary. #[arg(long)] name: String, /// Owner DID (defaults to configured identity). #[arg(long)] did: Option, }, /// Transfer a username to another DID. Transfer { /// Username to transfer. #[arg(long)] name: String, /// New owner DID. #[arg(long)] to: String, /// Current owner DID (defaults to configured identity). #[arg(long)] from: Option, }, /// Release a username. Release { /// Username to release. #[arg(long)] name: String, /// Current owner DID (defaults to configured identity). #[arg(long)] from: Option, }, /// Set or clear username metadata content hash. SetMetadata { /// Username to update. #[arg(long)] name: String, /// Optional 32-byte metadata content hash as hex or blake3:. Omit with --clear. #[arg(long)] metadata_cid: Option, /// Clear existing metadata. #[arg(long)] clear: bool, /// Owner DID (defaults to configured identity). #[arg(long)] from: Option, }, /// Resolve a username record. Show { /// Username to resolve. #[arg(long)] name: String, }, /// List usernames owned by a DID. List { /// Owner DID (defaults to configured identity). #[arg(long)] did: Option, }, } ``` Source line: `280`. ## cli::GovCommands [#cligovcommands] Governance subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum GovCommands { /// Submit a governance proposal. Propose { /// Proposal title. #[arg(long)] title: String, /// Proposal description. #[arg(long)] description: String, /// Proposer DID (defaults to configured identity). #[arg(long)] did: Option, }, /// Vote on a governance proposal. Vote { /// Proposal ID. #[arg(long)] proposal: String, /// Vote choice: yes, no, abstain, no_with_veto. #[arg(long = "vote")] choice: String, /// Voter DID (defaults to configured identity). #[arg(long)] did: Option, }, /// List governance proposals. List { /// Filter by status: active, passed, rejected. #[arg(long)] status: Option, }, /// Show details of a specific proposal. Show { /// Proposal ID. id: String, }, } ``` Source line: `366`. ## cli::ContractCommands [#clicontractcommands] Smart-contract deployment subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum ContractCommands { /// Register WASM bytecode by content hash before deployment. RegisterCode { /// Path to a WASM bytecode file. #[arg(long)] code: String, /// SPDX license expression or governance-approved license label. #[arg(long)] license: String, /// Optional source artifact URI. #[arg(long)] source_uri: Option, /// Optional BLAKE3/Sigil hash of the source artifact. #[arg(long)] source_hash: Option, /// Optional audit report URI. #[arg(long)] audit_uri: Option, /// Optional JSON object string for extra deterministic metadata. #[arg(long)] metadata_json: Option, /// Sender/controller DID (defaults to configured identity). #[arg(long)] from: Option, }, /// Deploy a contract from previously registered bytecode. Deploy { /// Contract DID to create. #[arg(long)] contract_did: String, /// Hex or `blake3:` code hash registered on-chain. #[arg(long)] code_hash: String, /// Optional Organization Zone ID. #[arg(long)] zone_id: Option, /// Sender/controller DID (defaults to configured identity). #[arg(long)] from: Option, }, } ``` Source line: `409`. ## cli::ConfigCommands [#cliconfigcommands] Configuration subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum ConfigCommands { /// Set a configuration value. Set { /// RPC endpoint URL. #[arg(long)] rpc: Option, /// Chain ID. #[arg(long)] chain_id: Option, /// Default identity DID. #[arg(long)] default_identity: Option, }, /// Show current configuration. Show, } ``` Source line: `454`. ## cli::NodeCommands [#clinodecommands] Node query subcommands. ```rust #[derive(Debug, Clone, Subcommand)] pub enum NodeCommands { /// Show the sync status of the connected node. Status, /// Show node information (version, chain ID). Info, } ``` Source line: `474`. # sigil-wallet · config URL: https://docs.sigil.ml/reference/rust/sigil-wallet/config Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/config.md Source declarations, signatures and documentation for config. Source: `sigil/node/sigil-wallet/src/config.rs`. SHA-256: `3269d576e02006f12cce6a496a95bb36376bd08b2bd2145bf81b327b2ea8aaac`. 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. ## config::NetworkConfig [#confignetworkconfig] Network connection settings. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct NetworkConfig { /// JSON-RPC endpoint URL. pub rpc_url: String, /// Chain identifier. pub chain_id: String } ``` Source line: `19`. ## config::WalletConfig [#configwalletconfig] Wallet identity settings. ```rust #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct WalletConfig { /// The default identity DID to use for transactions. #[serde(skip_serializing_if = "Option::is_none")] pub default_identity: Option } ``` Source line: `37`. ## config::DisplayConfig [#configdisplayconfig] Display preferences. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DisplayConfig { /// Output format: "table" or "json". pub format: String } ``` Source line: `45`. ## config::Config [#configconfig] Top-level wallet configuration. ```rust #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct Config { /// Network connection settings. #[serde(default)] pub network: NetworkConfig, /// Wallet identity settings. #[serde(default)] pub wallet: WalletConfig, /// Display preferences. #[serde(default)] pub display: DisplayConfig } ``` Source line: `60`. ## config::Config::base\_dir [#configconfigbase_dir] Returns the base directory for Sigil wallet data (`~/.sigil/`). ```rust pub fn base_dir() -> WalletResult; ``` Source line: `74`. ## config::Config::config\_path [#configconfigconfig_path] Returns the path to the configuration file (`~/.sigil/config.toml`). ```rust pub fn config_path() -> WalletResult; ``` Source line: `81`. ## config::Config::keystore\_dir [#configconfigkeystore_dir] Returns the path to the keystore directory (`~/.sigil/keystore/`). ```rust pub fn keystore_dir() -> WalletResult; ``` Source line: `86`. ## config::Config::load [#configconfigload] Load configuration from the default path. Returns defaults if the file does not exist. ```rust pub fn load() -> WalletResult; ``` Source line: `92`. ## config::Config::load\_from [#configconfigload_from] Load configuration from a specific path. Returns defaults if the file does not exist. ```rust pub fn load_from(path: &Path) -> WalletResult; ``` Source line: `99`. ## config::Config::save [#configconfigsave] Save configuration to the default path, creating the directory if needed. ```rust pub fn save(&self) -> WalletResult<()>; ``` Source line: `111`. ## config::Config::save\_to [#configconfigsave_to] Save configuration to a specific path, creating parent directories if needed. ```rust pub fn save_to(&self, path: &Path) -> WalletResult<()>; ``` Source line: `117`. # sigil-wallet · crate URL: https://docs.sigil.ml/reference/rust/sigil-wallet/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-wallet/src/lib.rs`. SHA-256: `1aef18c8428bdf5243931cf11c85eb906dbe45a7d59f56533991a442af16903d`. 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. ## cli [#cli] ```rust pub mod cli; ``` Source line: `9`. ## config [#config] ```rust pub mod config; ``` Source line: `10`. ## display [#display] ```rust pub mod display; ``` Source line: `11`. ## error [#error] ```rust pub mod error; ``` Source line: `12`. ## governance [#governance] ```rust pub mod governance; ``` Source line: `13`. ## identity [#identity] ```rust pub mod identity; ``` Source line: `14`. ## keystore [#keystore] ```rust pub mod keystore; ``` Source line: `15`. ## nft [#nft] ```rust pub mod nft; ``` Source line: `16`. ## nonce [#nonce] ```rust pub mod nonce; ``` Source line: `17`. ## rpc\_client [#rpc_client] ```rust pub mod rpc_client; ``` Source line: `18`. ## staking [#staking] ```rust pub mod staking; ``` Source line: `19`. ## wallet [#wallet] ```rust pub mod wallet; ``` Source line: `20`. # sigil-wallet · display URL: https://docs.sigil.ml/reference/rust/sigil-wallet/display Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/display.md Source declarations, signatures and documentation for display. Source: `sigil/node/sigil-wallet/src/display.rs`. SHA-256: `d3e9f459017e1fe97c4ae124ed8a3aaec4e6a8d8afe808d43d79a1ec4b4c2602`. 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. ## display::print\_header [#displayprint_header] Print a boxed header line. ```rust pub fn print_header(title: &str); ``` Source line: `38`. ## display::print\_banner [#displayprint_banner] Print the SIGIL emblem banner with wallet subtitle. Silently skipped when stdout is not a terminal (e.g. piped to a file). ```rust pub fn print_banner(); ``` Source line: `63`. ## display::format\_sigil [#displayformat_sigil] Format a micro-MINT amount for display. Converts micro-MINT (u64) to a human-readable string with the MINT unit. Examples: * 1\_000\_000 -> "1.000000 MINT" * 500\_000 -> "0.500000 MINT" * 10\_000\_000\_000 -> "10,000.000000 MINT" ```rust pub fn format_sigil(micro: u64) -> String; ``` Source line: `85`. ## display::format\_micro\_sigil [#displayformat_micro_sigil] Format a micro-MINT amount as just the micro value with unit label. ```rust pub fn format_micro_sigil(micro: u64) -> String; ``` Source line: `99`. ## display::print\_kv [#displayprint_kv] Print a key-value line with consistent formatting. ```rust pub fn print_kv(key: &str, value: &str); ``` Source line: `117`. ## display::print\_info [#displayprint_info] Print an informational message. ```rust pub fn print_info(msg: &str); ``` Source line: `126`. ## display::print\_success [#displayprint_success] Print a success message. ```rust pub fn print_success(msg: &str); ``` Source line: `131`. ## display::print\_error [#displayprint_error] Print an error message to stderr. ```rust pub fn print_error(msg: &str); ``` Source line: `136`. # sigil-wallet · error URL: https://docs.sigil.ml/reference/rust/sigil-wallet/error Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-wallet/src/error.rs`. SHA-256: `0d5d81a9dffdc68dd30a958de0a77108955ddda30fc3ad55493bca6db0cf6c8f`. 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. ## error::WalletError [#errorwalleterror] Error types for the Sigil wallet. All errors produced by the wallet CLI. ```rust #[derive(Debug, thiserror::Error)] pub enum WalletError { /// Failed to read or write keystore files. #[error("keystore error: {0}")] Keystore(String), /// Cryptographic operation failed (encryption, decryption, signing). #[error("crypto error: {0}")] Crypto(String), /// RPC communication error with the Sigil node. #[error("rpc error: {0}")] Rpc(String), /// Configuration file error (read, write, parse). #[error("config error: {0}")] Config(String), /// Identity management error. #[error("identity error: {0}")] Identity(String), /// Transaction building or signing error. #[error("transaction error: {0}")] Transaction(String), /// IO error. #[error("io error: {0}")] Io(#[from] std::io::Error), /// JSON serialization / deserialization error. #[error("json error: {0}")] Json(#[from] serde_json::Error), /// HTTP request error. #[error("http error: {0}")] Http(#[from] reqwest::Error), /// The user cancelled an interactive prompt. #[error("operation cancelled by user")] Cancelled, /// A required identity was not found in the keystore. #[error("identity not found: {0}")] IdentityNotFound(String), } ``` Source line: `5`. ## error::WalletResult [#errorwalletresult] Convenience alias for wallet results. ```rust pub type WalletResult = Result; ``` Source line: `52`. # sigil-wallet · governance URL: https://docs.sigil.ml/reference/rust/sigil-wallet/governance Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/governance.md Source declarations, signatures and documentation for governance. Source: `sigil/node/sigil-wallet/src/governance.rs`. SHA-256: `c475e7edb12d523010154eb91981ff802577884df8f19e83e0d8ef3715bd98e5`. 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. ## governance::parse\_vote\_choice [#governanceparse_vote_choice] Parse a vote choice string. ```rust pub fn parse_vote_choice(choice: &str) -> WalletResult; ``` Source line: `27`. ## governance::propose [#governancepropose] Submit a governance proposal. ```rust pub async fn propose( rpc_url: &str, chain_id: &str, did: &str, title: &str, description: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `69`. ## governance::vote [#governancevote] Vote on a governance proposal. ```rust pub async fn vote( rpc_url: &str, chain_id: &str, did: &str, proposal_id: &str, choice: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `99`. ## governance::print\_propose [#governanceprint_propose] Print proposal submission confirmation. ```rust pub fn print_propose(did: &str, title: &str, tx_hash: &str); ``` Source line: `127`. ## governance::print\_vote [#governanceprint_vote] Print vote confirmation. ```rust pub fn print_vote(did: &str, proposal_id: &str, choice: &str, tx_hash: &str); ``` Source line: `146`. # sigil-wallet · identity URL: https://docs.sigil.ml/reference/rust/sigil-wallet/identity Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/identity.md Source declarations, signatures and documentation for identity. Source: `sigil/node/sigil-wallet/src/identity.rs`. SHA-256: `4c2433ff664132b061bc370713ef2efe6055df5fe015e5875715efb533698fc2`. 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. ## identity::create [#identitycreate] Create a new root or agent identity with a fresh keypair. ```rust pub fn create( namespace: &str, name: &str, kind: IdentityKind, passphrase: &str, ) -> WalletResult; ``` Source line: `14`. ## identity::derive [#identityderive] Derive a child identity from an existing parent. ```rust pub fn derive( parent_did: &str, name: &str, kind: IdentityKind, passphrase: &str, ) -> WalletResult; ``` Source line: `30`. ## identity::list [#identitylist] List all identities in the keystore. ```rust pub fn list() -> WalletResult>; ``` Source line: `42`. ## identity::show [#identityshow] Show a single identity by DID. ```rust pub fn show(did: &str) -> WalletResult; ``` Source line: `48`. ## identity::export [#identityexport] Export an identity to a file. ```rust pub fn export(did: &str, output: &str) -> WalletResult<()>; ``` Source line: `54`. ## identity::import [#identityimport] Import an identity from a file. ```rust pub fn import(input: &str) -> WalletResult; ``` Source line: `61`. ## identity::resolve\_identity [#identityresolve_identity] Resolve the identity DID to use: explicit argument, config default, or error. ```rust pub fn resolve_identity(explicit: Option<&str>) -> WalletResult; ``` Source line: `68`. ## identity::print\_created [#identityprint_created] Print a created identity in a nice format. ```rust pub fn print_created(entry: &KeystoreEntry); ``` Source line: `82`. ## identity::print\_list [#identityprint_list] Print a table of all identities. ```rust pub fn print_list(entries: &[KeystoreEntry]); ``` Source line: `121`. ## identity::print\_detail [#identityprint_detail] Print detailed view of a single identity. ```rust pub fn print_detail(entry: &KeystoreEntry); ``` Source line: `164`. # sigil-wallet URL: https://docs.sigil.ml/reference/rust/sigil-wallet Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet.md Sigil blockchain wallet CLI for agent identity, transfers, staking, and governance Sigil blockchain wallet CLI for agent identity, transfers, staking, and governance | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-wallet` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-wallet/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_wallet` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-wallet = { path = "../sigil-wallet" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. This manifest declares no Cargo feature flags. ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-wallet/crate) — 12 declarations * [cli](/reference/rust/sigil-wallet/cli) — 9 declarations * [config](/reference/rust/sigil-wallet/config) — 11 declarations * [display](/reference/rust/sigil-wallet/display) — 8 declarations * [error](/reference/rust/sigil-wallet/error) — 2 declarations * [governance](/reference/rust/sigil-wallet/governance) — 5 declarations * [identity](/reference/rust/sigil-wallet/identity) — 10 declarations * [keystore](/reference/rust/sigil-wallet/keystore) — 17 declarations * [nft](/reference/rust/sigil-wallet/nft) — 7 declarations * [nonce](/reference/rust/sigil-wallet/nonce) — 4 declarations * [rpc\_client](/reference/rust/sigil-wallet/rpc_client) — 41 declarations * [staking](/reference/rust/sigil-wallet/staking) — 9 declarations * [wallet](/reference/rust/sigil-wallet/wallet) — 18 declarations # sigil-wallet · keystore URL: https://docs.sigil.ml/reference/rust/sigil-wallet/keystore Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/keystore.md Source declarations, signatures and documentation for keystore. Source: `sigil/node/sigil-wallet/src/keystore.rs`. SHA-256: `d3e22c1beb0e692b9a79d8cb711b5802d859d42aaf4d53be849e3274df379d3c`. 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. ## keystore::IdentityKind [#keystoreidentitykind] Kind of identity entity. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum IdentityKind { /// Human root identity. Hmr, /// Multi-human / machine root identity. Mhr, /// Enterprise / entity root identity. Enr, /// Agent identity (derived from a human root). Agent, } ``` Source line: `42`. ## keystore::KdfParams [#keystorekdfparams] KDF parameters stored alongside the ciphertext. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct KdfParams { pub memory_kib: u32, pub iterations: u32, pub parallelism: u32 } ``` Source line: `82`. ## keystore::CryptoEnvelope [#keystorecryptoenvelope] Cryptographic envelope stored in the keystore file. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CryptoEnvelope { pub cipher: String, pub kdf: String, pub kdf_params: KdfParams, /// Base64-encoded ciphertext (encrypted 32-byte signing key). pub ciphertext: String, /// Base64-encoded nonce (12 bytes). pub nonce: String, /// Base64-encoded salt (16 bytes). pub salt: String } ``` Source line: `100`. ## keystore::KeystoreEntry [#keystorekeystoreentry] A keystore entry representing one identity on disk. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct KeystoreEntry { /// Format version. pub version: u32, /// The DID for this identity. pub did: String, /// Kind of identity (hmr or agent). pub kind: IdentityKind, /// Parent DID (empty for root HMR identities). #[serde(skip_serializing_if = "Option::is_none")] pub parent_did: Option, /// Lineage generation (0 for HMR, 1+ for derived agents). pub generation: u32, /// When this identity was created. pub created_at: DateTime, /// Encrypted key material. pub crypto: CryptoEnvelope, /// Hex-encoded Ed25519 public key. pub public_key: String } ``` Source line: `114`. ## keystore::KeystoreEntry::address\_hex [#keystorekeystoreentryaddress_hex] Derive the stable Sigil wallet address for this identity. Sigil addresses are derived from the canonical DID, not from mutable signing key material, so balances survive key rotation and recovery. ```rust pub fn address_hex(&self) -> WalletResult; ``` Source line: `139`. ## keystore::Keystore [#keystorekeystore] The keystore manages encrypted identity files on disk. ```rust pub struct Keystore { } ``` Source line: `147`. ## keystore::Keystore::open\_default [#keystorekeystoreopen_default] Open the keystore at the default location (`~/.sigil/keystore/`). ```rust pub fn open_default() -> WalletResult; ``` Source line: `153`. ## keystore::Keystore::open [#keystorekeystoreopen] Open or create the keystore at the given directory. ```rust pub fn open(dir: &Path) -> WalletResult; ``` Source line: `159`. ## keystore::Keystore::create\_identity [#keystorekeystorecreate_identity] Generate a new identity with a fresh Ed25519 keypair. The private key is encrypted with the provided passphrase and stored on disk. Returns the created \[`KeystoreEntry`]. ```rust pub fn create_identity( &self, namespace: &str, name: &str, kind: IdentityKind, parent_did: Option<&str>, generation: u32, passphrase: &str, ) -> WalletResult; ``` Source line: `170`. ## keystore::Keystore::derive\_identity [#keystorekeystorederive_identity] Derive a child identity from an existing parent identity. Generates a fresh keypair for the child. The parent must exist in the keystore; its passphrase is not needed since only the DID lineage is tracked, not key derivation. ```rust pub fn derive_identity( &self, parent_did: &str, name: &str, kind: IdentityKind, passphrase: &str, ) -> WalletResult; ``` Source line: `203`. ## keystore::Keystore::list [#keystorekeystorelist] List all identities stored in the keystore. ```rust pub fn list(&self) -> WalletResult>; ``` Source line: `235`. ## keystore::Keystore::load\_entry [#keystorekeystoreload_entry] Load a specific identity by DID. ```rust pub fn load_entry(&self, did: &str) -> WalletResult; ``` Source line: `265`. ## keystore::Keystore::decrypt\_signing\_key [#keystorekeystoredecrypt_signing_key] Decrypt and return the signing key for the given identity. ```rust pub fn decrypt_signing_key(&self, did: &str, passphrase: &str) -> WalletResult; ``` Source line: `274`. ## keystore::Keystore::delete [#keystorekeystoredelete] Delete an identity from the keystore. ```rust pub fn delete(&self, did: &str) -> WalletResult<()>; ``` Source line: `280`. ## keystore::Keystore::export [#keystorekeystoreexport] Export a keystore entry to an arbitrary path (for backup / transfer). ```rust pub fn export(&self, did: &str, output: &Path) -> WalletResult<()>; ``` Source line: `292`. ## keystore::Keystore::import [#keystorekeystoreimport] Import a keystore entry from an external file. ```rust pub fn import(&self, input: &Path) -> WalletResult; ``` Source line: `300`. ## keystore::format\_did [#keystoreformat_did] Format a DID string from its components. Format: `did:oas:{namespace}:{kind}:{name}` ```rust pub fn format_did(namespace: &str, kind: IdentityKind, name: &str) -> String; ``` Source line: `546`. # sigil-wallet · nft URL: https://docs.sigil.ml/reference/rust/sigil-wallet/nft Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/nft.md Source declarations, signatures and documentation for nft. Source: `sigil/node/sigil-wallet/src/nft.rs`. SHA-256: `fab50f3119158acfe84b4beeced9896234a2922f12f13ae264c11b9cb22c325d`. 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. ## nft::create\_collection [#nftcreate_collection] Create a new NFT collection on-chain. ```rust #[allow(clippy::too_many_arguments)] pub async fn create_collection( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, name: &str, symbol: &str, kind: NftKind, issuer_did: &str, controller_did: &str, policy: CollectionPolicy, metadata_uri: Option<&str>, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `73`. ## nft::mint\_nft [#nftmint_nft] Mint a new NFT token. ```rust #[allow(clippy::too_many_arguments)] pub async fn mint_nft( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, token_id: u128, recipient_did: &str, metadata_uri: Option<&str>, metadata_hash: Option, locked: Option, burn_auth: Option, identity: Option, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `107`. ## nft::transfer\_nft [#nfttransfer_nft] Transfer an NFT token to a new owner. ```rust #[allow(clippy::too_many_arguments)] pub async fn transfer_nft( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, token_id: u128, to_did: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `140`. ## nft::burn\_nft [#nftburn_nft] Burn (destroy) an NFT token. ```rust pub async fn burn_nft( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, token_id: u128, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `163`. ## nft::set\_nft\_metadata [#nftset_nft_metadata] Update the metadata URI and/or hash of an NFT (ERC-4906). ```rust #[allow(clippy::too_many_arguments)] pub async fn set_nft_metadata( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, token_id: u128, metadata_uri: Option<&str>, metadata_hash: Option, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `185`. ## nft::verify\_identity\_nft [#nftverify_identity_nft] Advance the verification level on an identity NFT. ```rust #[allow(clippy::too_many_arguments)] pub async fn verify_identity_nft( rpc_url: &str, chain_id: &str, sender_did: &str, collection_id: &str, token_id: u128, new_verification_level: u8, note: Option<&str>, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `210`. ## nft::print\_nft\_tx [#nftprint_nft_tx] Print an NFT transaction confirmation. ```rust pub fn print_nft_tx(action: &str, collection: &str, token_id: u128, tx_hash: &str); ``` Source line: `239`. # sigil-wallet · nonce URL: https://docs.sigil.ml/reference/rust/sigil-wallet/nonce Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/nonce.md Source declarations, signatures and documentation for nonce. Source: `sigil/node/sigil-wallet/src/nonce.rs`. SHA-256: `e9112dd2c1276a59f44954858361abeff90e07d1a19279eeb02d8dc3a551ce7d`. 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. ## nonce::NonceManager [#noncenoncemanager] Manages per-account transaction nonces. Queries a Sigil node's `sigil_getAccountNonce` RPC method for the on-chain nonce, then tracks increments locally so that multiple transactions can be built in a single session without round-tripping to the node for every one. ```rust #[derive(Debug)] pub struct NonceManager { } ``` Source line: `19`. ## nonce::NonceManager::new [#noncenoncemanagernew] Create a new nonce manager targeting the given RPC endpoint. ```rust pub fn new(rpc_url: &str) -> Self; ``` Source line: `28`. ## nonce::NonceManager::next\_nonce [#noncenoncemanagernext_nonce] Return the next nonce for `did`, querying the node if not cached. After a successful call the internal cache is incremented, so the next call for the same DID will return `nonce + 1` without a network round-trip. ```rust pub async fn next_nonce(&mut self, did: &str) -> WalletResult; ``` Source line: `40`. ## nonce::NonceManager::invalidate [#noncenoncemanagerinvalidate] Remove a DID from the local cache. Call this after a transaction fails or is rejected so that the next call to \[`next_nonce`] will re-query the node for the authoritative nonce value. ```rust pub fn invalidate(&mut self, did: &str); ``` Source line: `57`. # sigil-wallet · rpc_client URL: https://docs.sigil.ml/reference/rust/sigil-wallet/rpc_client Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/rpc_client.md Source declarations, signatures and documentation for rpc_client. Source: `sigil/node/sigil-wallet/src/rpc_client.rs`. SHA-256: `2fdac48228793a27b395913665cd3f97e6419906161646fa2bb7ad65f34c5c4e`. 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. ## rpc\_client::NodeInfo [#rpc_clientnodeinfo] Node information response. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct NodeInfo { /// Node software version. pub version: String, /// Chain identifier. pub chain_id: String, /// Protocol version. pub protocol_version: String } ``` Source line: `45`. ## rpc\_client::SyncStatus [#rpc_clientsyncstatus] Sync status response. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SyncStatus { /// Whether the node is fully synced. pub synced: bool, /// Current block height. pub current_height: u64, /// Highest known block height. pub highest_known: u64 } ``` Source line: `56`. ## rpc\_client::MempoolStatus [#rpc_clientmempoolstatus] Mempool status response. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct MempoolStatus { /// Number of transactions in the mempool. pub size: u64, /// Maximum mempool capacity. pub max_size: u64 } ``` Source line: `67`. ## rpc\_client::SendTransactionResult [#rpc_clientsendtransactionresult] Transaction submission response. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SendTransactionResult { /// The hash of the submitted transaction. pub tx_hash: String } ``` Source line: `76`. ## rpc\_client::SponsoredSetupPolicy [#rpc_clientsponsoredsetuppolicy] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SponsoredSetupPolicy { pub version: u64, pub envelope: String, pub sponsor_signs_full_envelope: bool, pub subject_proof_required: bool, pub fees_debited_from: String, pub replay_key: Vec, pub max_idempotency_key_bytes: usize, pub allowed_setup_scopes: Vec, pub currently_enabled_scopes: Vec, pub explicitly_disallowed: Vec } ``` Source line: `82`. ## rpc\_client::SponsoredSetupReceipt [#rpc_clientsponsoredsetupreceipt] ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SponsoredSetupReceipt { pub hash: String, #[serde(default, alias = "blockHeight")] pub block_height: Option, pub tx_index: usize, pub status: String, pub sponsor_did: String, pub subject_did: String, pub setup_scope: String, pub idempotency_key: String } ``` Source line: `96`. ## rpc\_client::BalanceResult [#rpc_clientbalanceresult] Account balance response from `sigil_getBalance`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BalanceResult { pub did: String, pub balance: u64, pub nonce: u64 } ``` Source line: `110`. ## rpc\_client::AccountResult [#rpc_clientaccountresult] Account snapshot response from `sigil_getAccount`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountResult { pub did: String, pub balance: u64, pub nonce: u64, #[serde(default, alias = "stakedAmount")] pub staked_amount: u64, #[serde(default, alias = "transactionCount")] pub transaction_count: u64, #[serde(default, alias = "identityDoc")] pub identity_doc: Option } ``` Source line: `118`. ## rpc\_client::ValidatorResult [#rpc_clientvalidatorresult] Validator snapshot response from `sigil_getValidator`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ValidatorResult { pub did: String, pub stake: u64, #[serde(default)] pub delegated_stake: u64, #[serde(default)] pub total_stake: u64, pub mode: String, pub active: bool, #[serde(default)] pub accumulated_rewards: u64, #[serde(default)] pub unbonding_epoch: Option } ``` Source line: `132`. ## rpc\_client::AccountTransactionsResult [#rpc_clientaccounttransactionsresult] Account transaction list response from `sigil_getAccountTransactions`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountTransactionsResult { pub did: String, pub latest_height: u64, pub limit: usize, pub offset: usize, #[serde(default)] pub transactions: Vec } ``` Source line: `149`. ## rpc\_client::ProposalResult [#rpc_clientproposalresult] Governance proposal query response from `sigil_getProposal`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProposalResult { #[serde(default)] pub proposal: Option, #[serde(default)] pub found: bool } ``` Source line: `160`. ## rpc\_client::ProposalListResult [#rpc_clientproposallistresult] Governance proposal list response from `sigil_listProposals`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ProposalListResult { #[serde(default)] pub proposals: Vec, #[serde(default)] pub count: usize, #[serde(default)] pub limit: usize, #[serde(default)] pub offset: usize } ``` Source line: `169`. ## rpc\_client::RegisterContractCodeResult [#rpc_clientregistercontractcoderesult] Contract-code registration submission response. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RegisterContractCodeResult { /// Hash of the submitted transaction. pub tx_hash: String, /// Content hash of the registered bytecode. pub code_hash: String, /// Bytecode size in bytes. pub code_len: usize, /// Required registration fee in micro-MINT. pub required_fee: u64, /// Whether the node already had this bytecode hash. #[serde(default)] pub already_registered: bool } ``` Source line: `182`. ## rpc\_client::SigilRpcClient [#rpc_clientsigilrpcclient] A typed JSON-RPC client for the Sigil node. ```rust pub struct SigilRpcClient { } ``` Source line: `197`. ## rpc\_client::SigilRpcClient::new [#rpc_clientsigilrpcclientnew] Create a new RPC client targeting the given endpoint URL. The URL should include the path (e.g. `http://localhost:12618/rpc`). ```rust pub fn new(rpc_url: &str) -> WalletResult; ``` Source line: `207`. ## rpc\_client::SigilRpcClient::get\_node\_info [#rpc_clientsigilrpcclientget_node_info] Retrieve node information (version, chain ID, protocol version). ```rust pub async fn get_node_info(&self) -> WalletResult; ``` Source line: `276`. ## rpc\_client::SigilRpcClient::get\_sync\_status [#rpc_clientsigilrpcclientget_sync_status] Retrieve the node's sync status. ```rust pub async fn get_sync_status(&self) -> WalletResult; ``` Source line: `283`. ## rpc\_client::SigilRpcClient::get\_mempool\_status [#rpc_clientsigilrpcclientget_mempool_status] Retrieve mempool status (size, max). ```rust pub async fn get_mempool_status(&self) -> WalletResult; ``` Source line: `292`. ## rpc\_client::SigilRpcClient::get\_balance [#rpc_clientsigilrpcclientget_balance] Retrieve an account's balance and nonce. ```rust pub async fn get_balance(&self, did: &str) -> WalletResult; ``` Source line: `301`. ## rpc\_client::SigilRpcClient::get\_account [#rpc_clientsigilrpcclientget_account] Retrieve an account snapshot. ```rust pub async fn get_account(&self, did: &str) -> WalletResult; ``` Source line: `310`. ## rpc\_client::SigilRpcClient::get\_account\_transactions [#rpc_clientsigilrpcclientget_account_transactions] Retrieve recent transactions involving an account. ```rust pub async fn get_account_transactions( &self, did: &str, limit: u32, ) -> WalletResult; ``` Source line: `319`. ## rpc\_client::SigilRpcClient::get\_validator [#rpc_clientsigilrpcclientget_validator] Retrieve a validator record. Missing validators are returned as `None`. ```rust pub async fn get_validator(&self, did: &str) -> WalletResult>; ``` Source line: `335`. ## rpc\_client::SigilRpcClient::get\_proposal [#rpc_clientsigilrpcclientget_proposal] Retrieve a governance proposal by ID. ```rust pub async fn get_proposal(&self, id: &str) -> WalletResult; ``` Source line: `349`. ## rpc\_client::SigilRpcClient::list\_proposals [#rpc_clientsigilrpcclientlist_proposals] List governance proposals. ```rust pub async fn list_proposals( &self, status: Option<&str>, limit: u32, ) -> WalletResult; ``` Source line: `358`. ## rpc\_client::SigilRpcClient::resolve\_username [#rpc_clientsigilrpcclientresolve_username] Resolve a username record by canonical or user-entered name. ```rust pub async fn resolve_username(&self, name: &str) -> WalletResult>; ``` Source line: `373`. ## rpc\_client::SigilRpcClient::list\_usernames [#rpc_clientsigilrpcclientlist_usernames] List all usernames owned by a DID. ```rust pub async fn list_usernames(&self, owner_did: &str) -> WalletResult>; ``` Source line: `385`. ## rpc\_client::SigilRpcClient::send\_transaction [#rpc_clientsigilrpcclientsend_transaction] Submit a signed transaction to the node's mempool. ```rust pub async fn send_transaction( &self, tx: &SignedTransaction, ) -> WalletResult; ``` Source line: `397`. ## rpc\_client::SigilRpcClient::send\_sponsored\_setup\_transaction [#rpc_clientsigilrpcclientsend_sponsored_setup_transaction] ```rust pub async fn send_sponsored_setup_transaction( &self, tx: &SignedTransaction, ) -> WalletResult; ``` Source line: `409`. ## rpc\_client::SigilRpcClient::get\_sponsored\_setup\_policy [#rpc_clientsigilrpcclientget_sponsored_setup_policy] ```rust pub async fn get_sponsored_setup_policy(&self) -> WalletResult; ``` Source line: `426`. ## rpc\_client::SigilRpcClient::get\_sponsored\_setup\_receipt [#rpc_clientsigilrpcclientget_sponsored_setup_receipt] ```rust pub async fn get_sponsored_setup_receipt( &self, hash: &str, ) -> WalletResult; ``` Source line: `434`. ## rpc\_client::SigilRpcClient::register\_contract\_code [#rpc_clientsigilrpcclientregister_contract_code] Submit a signed `RegisterContractCode` transaction to the typed contract-code registration endpoint. ```rust pub async fn register_contract_code( &self, tx: &SignedTransaction, ) -> WalletResult; ``` Source line: `450`. ## rpc\_client::SigilRpcClient::url [#rpc_clientsigilrpcclienturl] Returns the RPC endpoint URL (for display purposes). ```rust pub fn url(&self) -> &str; ``` Source line: `471`. ## rpc\_client::SigilRpcClient::get\_gal\_hmr [#rpc_clientsigilrpcclientget_gal_hmr] Fetch the typed `HmrAnchor` for a DID, or `None` if the GAL has no HMR anchor for it. ```rust pub async fn get_gal_hmr(&self, did: &str) -> WalletResult>; ``` Source line: `492`. ## rpc\_client::SigilRpcClient::get\_gal\_mhr [#rpc_clientsigilrpcclientget_gal_mhr] Fetch the typed `MhrAnchor` for a DID. ```rust pub async fn get_gal_mhr(&self, did: &str) -> WalletResult>; ``` Source line: `497`. ## rpc\_client::SigilRpcClient::get\_gal\_enr [#rpc_clientsigilrpcclientget_gal_enr] Fetch the typed `EnrAnchor` for a DID. ```rust pub async fn get_gal_enr(&self, did: &str) -> WalletResult>; ``` Source line: `502`. ## rpc\_client::SigilRpcClient::get\_gal\_org\_root [#rpc_clientsigilrpcclientget_gal_org_root] Fetch the typed `OrgLineageRoot` for an org DID. ```rust pub async fn get_gal_org_root( &self, org_did: &str, ) -> WalletResult>; ``` Source line: `507`. ## rpc\_client::SigilRpcClient::get\_gal\_shard [#rpc_clientsigilrpcclientget_gal_shard] Fetch the typed shard summary for a subject DID. The optional `assignment` field is `None` when the GAL has no shard assignment for the DID; the `topology` vector carries any relevant shard-topology lineage entries (split / merge migrate). ```rust pub async fn get_gal_shard(&self, did: &str) -> WalletResult; ``` Source line: `519`. ## rpc\_client::SigilRpcClient::check\_gal\_revocation [#rpc_clientsigilrpcclientcheck_gal_revocation] Revocation-first check. Returns the typed `RevocationStatus` shape — `revoked: bool` plus an optional inline record. Wallet callers MUST treat `revoked == true` as authoritative regardless of any other state. ```rust pub async fn check_gal_revocation( &self, did: &str, ) -> WalletResult; ``` Source line: `529`. ## rpc\_client::SigilRpcClient::get\_gal\_shard\_topology [#rpc_clientsigilrpcclientget_gal_shard_topology] Fetch the full shard topology snapshot. ```rust pub async fn get_gal_shard_topology(&self) -> WalletResult; ``` Source line: `541`. ## rpc\_client::GalShard [#rpc_clientgalshard] Wallet-side response shape for `gal_getShard`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct GalShard { /// Current shard assignment for the subject, or `None` if the GAL /// has no assignment for the DID. #[serde(default)] pub assignment: Option, /// Relevant topology lineage entries (split / merge / migrate /// history). Empty when the shard is freshly added. #[serde(default)] pub topology: Vec } ``` Source line: `552`. ## rpc\_client::GalShardTopology [#rpc_clientgalshardtopology] Wallet-side response shape for `gal_getShardTopology`. ```rust #[derive(Debug, Clone, Serialize, Deserialize)] pub struct GalShardTopology { /// All known shard-topology entries, in chronological order. #[serde(default)] pub entries: Vec } ``` Source line: `565`. # sigil-wallet · staking URL: https://docs.sigil.ml/reference/rust/sigil-wallet/staking Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/staking.md Source declarations, signatures and documentation for staking. Source: `sigil/node/sigil-wallet/src/staking.rs`. SHA-256: `a1c9e6db2cd83c124309e25cbaa1fc65b549796c29751e38876f19be7930fbce`. 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. ## staking::deposit [#stakingdeposit] Deposit stake to become a validator. ```rust pub async fn deposit( rpc_url: &str, chain_id: &str, did: &str, amount: u64, mode: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `64`. ## staking::withdraw [#stakingwithdraw] Withdraw staked tokens (begins unbonding period). ```rust pub async fn withdraw( rpc_url: &str, chain_id: &str, did: &str, amount: u64, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `92`. ## staking::delegate [#stakingdelegate] Delegate stake to another validator. ```rust pub async fn delegate( rpc_url: &str, chain_id: &str, from_did: &str, to_validator_did: &str, amount: u64, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `115`. ## staking::undelegate [#stakingundelegate] Undelegate stake shares from another validator. ```rust pub async fn undelegate( rpc_url: &str, chain_id: &str, from_did: &str, validator_did: &str, shares: u64, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `142`. ## staking::claim\_rewards [#stakingclaim_rewards] Claim accumulated staking rewards. ```rust pub async fn claim_rewards( rpc_url: &str, chain_id: &str, did: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `169`. ## staking::print\_deposit [#stakingprint_deposit] Print staking deposit confirmation. ```rust pub fn print_deposit(did: &str, amount: u64, mode: &str, tx_hash: &str); ``` Source line: `194`. ## staking::print\_withdraw [#stakingprint_withdraw] Print staking withdrawal confirmation. ```rust pub fn print_withdraw(did: &str, amount: u64, tx_hash: &str); ``` Source line: `213`. ## staking::print\_delegate [#stakingprint_delegate] Print delegation confirmation. ```rust pub fn print_delegate(from: &str, to: &str, amount: u64, tx_hash: &str); ``` Source line: `236`. ## staking::print\_rewards\_claim [#stakingprint_rewards_claim] Print rewards claim confirmation. ```rust pub fn print_rewards_claim(did: &str, tx_hash: &str); ``` Source line: `255`. # sigil-wallet · wallet URL: https://docs.sigil.ml/reference/rust/sigil-wallet/wallet Markdown: https://docs.sigil.ml/reference/rust/sigil-wallet/wallet.md Source declarations, signatures and documentation for wallet. Source: `sigil/node/sigil-wallet/src/wallet.rs`. SHA-256: `418a66e127697bb191ddcaf60ed28d0f503765f78f5e1b6aba6f606629f385e4`. 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. ## wallet::transfer [#wallettransfer] Transfer MINT to another account. ```rust #[allow(clippy::too_many_arguments)] pub async fn transfer( rpc_url: &str, chain_id: &str, from_did: &str, to_did: &str, amount: u64, memo: Option<&str>, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `231`. ## wallet::register\_contract\_code [#walletregister_contract_code] Register WASM bytecode for public deployment. ```rust #[allow(clippy::too_many_arguments)] pub async fn register_contract_code( rpc_url: &str, chain_id: &str, from_did: &str, code: Vec, license_metadata: ContractLicenseMetadata, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `260`. ## wallet::deploy\_contract [#walletdeploy_contract] Deploy a contract from a previously registered code hash. ```rust #[allow(clippy::too_many_arguments)] pub async fn deploy_contract( rpc_url: &str, chain_id: &str, from_did: &str, contract_did: &str, code_hash: &str, zone_id: Option, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `283`. ## wallet::register\_username [#walletregister_username] Register a username lease. ```rust #[allow(clippy::too_many_arguments)] pub async fn register_username( rpc_url: &str, chain_id: &str, owner_did: &str, name: &str, years: u32, metadata_cid: Option, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `309`. ## wallet::set\_reverse\_username [#walletset_reverse_username] Set a username as the DID's primary reverse lookup. ```rust pub async fn set_reverse_username( rpc_url: &str, chain_id: &str, owner_did: &str, name: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `328`. ## wallet::transfer\_username [#wallettransfer_username] Transfer a username to a new owner. ```rust #[allow(clippy::too_many_arguments)] pub async fn transfer_username( rpc_url: &str, chain_id: &str, from_did: &str, name: &str, new_owner_did: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `345`. ## wallet::release\_username [#walletrelease_username] Release a username. ```rust pub async fn release_username( rpc_url: &str, chain_id: &str, from_did: &str, name: &str, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `362`. ## wallet::set\_username\_metadata [#walletset_username_metadata] Set or clear username metadata. ```rust #[allow(clippy::too_many_arguments)] pub async fn set_username_metadata( rpc_url: &str, chain_id: &str, from_did: &str, name: &str, metadata_cid: Option, passphrase: &str, nonce: u64, ) -> WalletResult; ``` Source line: `379`. ## wallet::print\_transfer [#walletprint_transfer] Print a transfer confirmation. ```rust pub fn print_transfer(from: &str, to: &str, amount: u64, tx_hash: &str); ``` Source line: `396`. ## wallet::print\_register\_contract\_code [#walletprint_register_contract_code] Print contract-code registration confirmation. ```rust pub fn print_register_contract_code(from: &str, result: &RegisterContractCodeResult); ``` Source line: `415`. ## wallet::print\_deploy\_contract [#walletprint_deploy_contract] Print contract deployment confirmation. ```rust pub fn print_deploy_contract(from: &str, contract_did: &str, code_hash: &str, tx_hash: &str); ``` Source line: `452`. ## wallet::print\_username\_registered [#walletprint_username_registered] Print username registration confirmation. ```rust pub fn print_username_registered(owner: &str, name: &str, years: u32, tx_hash: &str); ``` Source line: `471`. ## wallet::print\_username\_primary [#walletprint_username_primary] Print primary username confirmation. ```rust pub fn print_username_primary(owner: &str, name: &str, tx_hash: &str); ``` Source line: `490`. ## wallet::print\_username\_transfer [#walletprint_username_transfer] Print username transfer confirmation. ```rust pub fn print_username_transfer(from: &str, to: &str, name: &str, tx_hash: &str); ``` Source line: `504`. ## wallet::print\_username\_release [#walletprint_username_release] Print username release confirmation. ```rust pub fn print_username_release(from: &str, name: &str, tx_hash: &str); ``` Source line: `519`. ## wallet::print\_username\_metadata [#walletprint_username_metadata] Print username metadata confirmation. ```rust pub fn print_username_metadata(from: &str, name: &str, tx_hash: &str); ``` Source line: `533`. ## wallet::print\_balance [#walletprint_balance] Print a balance display. ```rust pub fn print_balance(did: &str, balance: u64, chain_id: &str); ``` Source line: `547`. ## wallet::resolve\_sender [#walletresolve_sender] Resolve the sender DID for a wallet operation. Uses the `--did` flag if provided, otherwise falls back to the config default. ```rust pub fn resolve_sender(explicit: Option<&str>) -> WalletResult; ``` Source line: `563`. # sigil-wasm · crate URL: https://docs.sigil.ml/reference/rust/sigil-wasm/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-wasm/src/lib.rs`. SHA-256: `ab97e56b699d35222009e614dd459739f1a858239dccd16a462e935409e5f855`. 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. ## engine [#engine] ```rust pub mod engine; ``` Source line: `29`. ## error [#error] ```rust pub mod error; ``` Source line: `30`. ## executor [#executor] ```rust pub mod executor; ``` Source line: `31`. ## host [#host] ```rust pub mod host; ``` Source line: `32`. ## pub use engine::\{ [#pub-use-engine] ModuleCacheConfig, ModuleCacheStats, WasmEngine, GAS\_PER\_FUEL, MAX\_CODE\_SIZE, MAX\_IO\_BYTES, MAX\_MEMORY\_PAGES, }; ```rust pub use engine::{ ModuleCacheConfig, ModuleCacheStats, WasmEngine, GAS_PER_FUEL, MAX_CODE_SIZE, MAX_IO_BYTES, MAX_MEMORY_PAGES, }; ``` Source line: `34`. ## pub use error::\{HostError, WasmError}; [#pub-use-errorhosterror-wasmerror] ```rust pub use error::{HostError, WasmError}; ``` Source line: `38`. ## pub use executor::\{execute\_call, CallOutput, CallSettings}; [#pub-use-executorexecute_call-calloutput-callsettings] ```rust pub use executor::{execute_call, CallOutput, CallSettings}; ``` Source line: `39`. ## pub use host::\{ [#pub-use-host] capability, ComputeDispatchRequest, HostBackend, HostLogLevel, MacaQuorumProofView, ReceiptView, }; ```rust pub use host::{ capability, ComputeDispatchRequest, HostBackend, HostLogLevel, MacaQuorumProofView, ReceiptView, }; ``` Source line: `40`. # sigil-wasm · engine URL: https://docs.sigil.ml/reference/rust/sigil-wasm/engine Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm/engine.md Source declarations, signatures and documentation for engine. Source: `sigil/node/sigil-wasm/src/engine.rs`. SHA-256: `800562ea44fce59e1b716202a68d3edda14bccf1a90d4655f153da1234221611`. 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. ## engine::MAX\_CODE\_SIZE [#enginemax_code_size] Hard upper bound on a contract's bytecode size, in bytes. Larger blobs are rejected at compile time to keep the on-chain code-blob store small. 2 MiB matches the common deployed-module limit on other chains and is generous for handwritten + simple agent contracts. ```rust pub const MAX_CODE_SIZE: usize; ``` Source line: `15`. ## engine::MAX\_MEMORY\_PAGES [#enginemax_memory_pages] Hard upper bound on guest linear-memory pages (64 KiB each). 16 pages = 1 MiB. The guest may grow up to this limit; growing beyond traps with `MemoryOutOfBounds`. ```rust pub const MAX_MEMORY_PAGES: u32; ``` Source line: `20`. ## engine::MAX\_IO\_BYTES [#enginemax_io_bytes] Hard upper bound on host-supplied call args / return blob, in bytes. ```rust pub const MAX_IO_BYTES: usize; ``` Source line: `23`. ## engine::GAS\_PER\_FUEL [#enginegas_per_fuel] Wasmtime fuel-units per gas-unit. Each consumed fuel unit corresponds to one consumed gas unit; the conversion is 1:1 to keep gas accounting simple and deterministic. ```rust pub const GAS_PER_FUEL: u64; ``` Source line: `28`. ## engine::ModuleCacheConfig [#enginemodulecacheconfig] Process-local compiled-module cache limits. Both `max_modules` and `max_bytes` are enforced; the first limit reached triggers LRU eviction. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct ModuleCacheConfig { pub max_modules: usize, pub max_bytes: usize, pub ttl: Duration } ``` Source line: `40`. ## engine::ModuleCacheStats [#enginemodulecachestats] Snapshot of the process-local compiled-module cache. ```rust #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct ModuleCacheStats { pub entries: usize, pub estimated_bytes: usize, pub hits: u64, pub misses: u64, pub evictions: u64, pub expired: u64 } ``` Source line: `58`. ## engine::WasmEngine [#enginewasmengine] A configured wasmtime engine suitable for deterministic contract execution. Construct one per node and clone into per-call `Store`s. ```rust #[derive(Clone)] pub struct WasmEngine { } ``` Source line: `261`. ## engine::WasmEngine::deterministic [#enginewasmenginedeterministic] Build a deterministic engine. Configuration: * `consume_fuel`: on (mandatory for gas metering) * `wasm_threads`: off (no concurrency from guest) * `wasm_simd`: off (NaN canonicalisation across platforms is not free; we ban SIMD for determinism) * `wasm_relaxed_simd`: off * `wasm_reference_types`: off * `wasm_multi_memory`: off * `wasm_memory64`: off * `wasm_bulk_memory`: on (deterministic; required by most toolchains) * `wasm_multi_value`: on (deterministic) * `nan_canonicalization`: on (forces canonical NaN bits; eliminates platform-specific NaN drift) * `cranelift_pcc`: off (proof-carrying-code is OK to leave default) * `async_support`: off * `parallel_compilation`: off (deterministic compile order) ```rust pub fn deterministic() -> Result; ``` Source line: `285`. ## engine::WasmEngine::compile [#enginewasmenginecompile] Compile contract bytecode. Bytecode size is bounded by `MAX_CODE_SIZE`; oversized blobs are rejected. ```rust pub fn compile(&self, bytes: &[u8]) -> Result; ``` Source line: `296`. ## engine::WasmEngine::compile\_cached [#enginewasmenginecompile_cached] Compile contract bytecode through the process-global LRU cache. The cache is keyed by content hash and is performance-only: hash mismatch fails before lookup, and eviction/expiry can only force recompilation of the exact same bytes. ```rust pub fn compile_cached(&self, code_hash: &SigilHash, bytes: &[u8]) -> Result; ``` Source line: `313`. ## engine::WasmEngine::configure\_module\_cache [#enginewasmengineconfigure_module_cache] Reconfigure the process-global module cache and clear its contents. Intended for node startup configuration and tests. ```rust pub fn configure_module_cache(config: ModuleCacheConfig) -> Result<(), WasmError>; ``` Source line: `340`. ## engine::WasmEngine::clear\_module\_cache [#enginewasmengineclear_module_cache] Clear the process-global module cache while retaining its limits. ```rust pub fn clear_module_cache() -> Result<(), WasmError>; ``` Source line: `349`. ## engine::WasmEngine::module\_cache\_stats [#enginewasmenginemodule_cache_stats] Return current process-global module cache counters. ```rust pub fn module_cache_stats() -> Result; ``` Source line: `358`. # sigil-wasm · error URL: https://docs.sigil.ml/reference/rust/sigil-wasm/error Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-wasm/src/error.rs`. SHA-256: `4515a0264e09522666607965e56b86d182a62a0552c069312a1b5053372f56ab`. 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. ## error::WasmError [#errorwasmerror] Top-level error from the Sigil WASM runtime. ```rust #[derive(Debug, Error)] pub enum WasmError { /// Failed to construct or configure the wasmtime engine. #[error("wasmtime engine error: {0}")] Engine(String), /// Failed to compile the supplied bytecode. #[error("wasm module compilation failed: {0}")] Compile(String), /// Failed to instantiate the module against the linker. #[error("wasm module instantiation failed: {0}")] Instantiate(String), /// The contract did not export the required entrypoint or it had /// the wrong signature. #[error("missing or invalid entrypoint: {0}")] BadEntrypoint(String), /// The contract trapped during execution. State changes from this /// invocation MUST be discarded. #[error("contract trapped during execution: {0}")] Trap(String), /// The contract exhausted its fuel/gas budget. #[error("out of fuel (gas exhausted)")] OutOfFuel, /// Memory access out of bounds (e.g. host pointer/length didn't /// fit inside the guest memory). #[error("memory access out of bounds: {0}")] MemoryOutOfBounds(String), /// The host function call returned a typed error to the guest. /// Distinct from `Trap` — the guest may have caught and continued. #[error("host function error: {0}")] Host(#[from] HostError), /// Generic catch-all for backend-specific failures. #[error("backend error: {0}")] Backend(String), } ``` Source line: `7`. ## error::HostError [#errorhosterror] Errors raised by host backend functions. These are separate from `WasmError::Trap` because a guest may catch them and continue. ```rust #[derive(Debug, Clone, Error, PartialEq, Eq)] pub enum HostError { /// The contract attempted to use a host function it was not granted /// in `ContractRecord.allowed_host_functions`. #[error("host function `{0}` not in contract allowlist")] HostFunctionNotAllowed(String), /// The host function was called with malformed arguments (bad /// pointer, bad length, malformed UTF-8, etc.). #[error("invalid host fn argument: {0}")] InvalidArgument(String), /// The requested key is not present in contract state. #[error("key not found")] KeyNotFound, /// The host backend rejected the call (e.g. storage error, /// compute-marketplace constraint violation). #[error("host backend rejected call: {0}")] Backend(String), /// The contract is not authorised to perform the requested /// privileged action (e.g. dispatch_compute without a mandate, or /// upgrade outside policy). #[error("permission denied: {0}")] PermissionDenied(String), /// The host backend hit an internal limit (event count, message /// queue, etc.). #[error("host limit exceeded: {0}")] LimitExceeded(String), } ``` Source line: `44`. # sigil-wasm · executor URL: https://docs.sigil.ml/reference/rust/sigil-wasm/executor Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm/executor.md Source declarations, signatures and documentation for executor. Source: `sigil/node/sigil-wasm/src/executor.rs`. SHA-256: `d68c921eadbd9d53fc9f1ae7d11f25ef3bce9877bd0eea551040feae68898f90`. 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. ## executor::CallOutput [#executorcalloutput] Per-call output. `output` is the bytes the contract returned via `anvil_set_return`; empty if it returned nothing. ```rust #[derive(Debug, Clone, PartialEq, Eq)] pub struct CallOutput { pub status: i32, pub gas_used: u64, pub output: Vec, pub host_error: Option } ``` Source line: `36`. ## executor::CallSettings [#executorcallsettings] Settings for a single contract invocation. ```rust #[derive(Debug, Clone)] pub struct CallSettings { pub gas_budget: u64, pub entrypoint: String } ``` Source line: `45`. ## executor::execute\_call [#executorexecute_call] Compile + run a contract entrypoint with a fresh `Store`. On any trap, returns `Err(WasmError::Trap)`. The backend value is consumed and dropped — any mutations it staged in an overlay are discarded. The caller MUST treat trap as a hard rollback. On success, the backend is returned alongside the `CallOutput` so the caller can `commit()` staged mutations to the underlying chain state. ```rust pub fn execute_call( engine: &WasmEngine, module: &Module, backend: B, settings: &CallSettings, args: &[u8], ) -> Result<(CallOutput, B), WasmError>; ``` Source line: `89`. # sigil-wasm · host URL: https://docs.sigil.ml/reference/rust/sigil-wasm/host Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm/host.md Source declarations, signatures and documentation for host. Source: `sigil/node/sigil-wasm/src/host.rs`. SHA-256: `c009efdf30d5d0019c0b66e0490db798645fd74d43be2d5c2392244040909c1d`. 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. ## host::capability [#hostcapability] The set of capabilities a contract may exercise during a call. Read by the host adapter when the guest invokes a privileged host function and either checked against `ContractRecord.allowed_host_functions` in advance, or enforced by the backend before mutating any state. ```rust pub mod capability; ``` Source line: `23`. ## host::capability::STATE\_GET [#hostcapabilitystate_get] ```rust pub const STATE_GET: &str; ``` Source line: `24`. ## host::capability::STATE\_SET [#hostcapabilitystate_set] ```rust pub const STATE_SET: &str; ``` Source line: `25`. ## host::capability::STATE\_DELETE [#hostcapabilitystate_delete] ```rust pub const STATE_DELETE: &str; ``` Source line: `26`. ## host::capability::CALLER\_DID [#hostcapabilitycaller_did] ```rust pub const CALLER_DID: &str; ``` Source line: `27`. ## host::capability::BLOCK\_HEIGHT [#hostcapabilityblock_height] ```rust pub const BLOCK_HEIGHT: &str; ``` Source line: `28`. ## host::capability::NATIVE\_TRANSFER [#hostcapabilitynative_transfer] ```rust pub const NATIVE_TRANSFER: &str; ``` Source line: `29`. ## host::capability::LOG [#hostcapabilitylog] ```rust pub const LOG: &str; ``` Source line: `30`. ## host::capability::EMIT\_EVENT [#hostcapabilityemit_event] ```rust pub const EMIT_EVENT: &str; ``` Source line: `31`. ## host::capability::RESOLVE\_IDENTITY [#hostcapabilityresolve_identity] ```rust pub const RESOLVE_IDENTITY: &str; ``` Source line: `32`. ## host::capability::VERIFY\_LINEAGE [#hostcapabilityverify_lineage] ```rust pub const VERIFY_LINEAGE: &str; ``` Source line: `33`. ## host::capability::SEND\_ZONE\_MESSAGE [#hostcapabilitysend_zone_message] ```rust pub const SEND_ZONE_MESSAGE: &str; ``` Source line: `34`. ## host::capability::DISPATCH\_COMPUTE [#hostcapabilitydispatch_compute] ```rust pub const DISPATCH_COMPUTE: &str; ``` Source line: `35`. ## host::capability::RECORD\_MANDATE\_SPEND [#hostcapabilityrecord_mandate_spend] ```rust pub const RECORD_MANDATE_SPEND: &str; ``` Source line: `36`. ## host::capability::READ\_COMPUTE\_RECEIPT [#hostcapabilityread_compute_receipt] ```rust pub const READ_COMPUTE_RECEIPT: &str; ``` Source line: `37`. ## host::capability::READ\_MACA\_QUORUM\_PROOF [#hostcapabilityread_maca_quorum_proof] ```rust pub const READ_MACA_QUORUM_PROOF: &str; ``` Source line: `38`. ## host::HostLogLevel [#hosthostloglevel] Minimal log levels — match `sigil_execution::anvil::LogLevel` ordinal. ```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum HostLogLevel { Debug = 0, Info = 1, Warn = 2, Error = 3, } ``` Source line: `43`. ## host::HostLogLevel::from\_u32 [#hosthostloglevelfrom_u32] Decode from the `level` integer that crosses the WASM boundary. ```rust pub fn from_u32(v: u32) -> Self; ``` Source line: `52`. ## host::HostBackend [#hosthostbackend] Sigil chain backend exposed to a single contract invocation. Each call gets its own `HostBackend` reference; implementors are expected to provide commit/rollback semantics around the backend (e.g. by writing into an overlay that is only flushed on success). ```rust pub trait HostBackend: Send + Sync { /// The DID of the contract currently executing. The runtime passes /// this on every call so the backend can scope state, events, and /// authorization checks per contract. fn contract_did(&self) -> &str; /// Returns `true` if `host_fn` is in the contract's allowlist. /// Implementations should always check the live contract record; /// this is consulted by the runtime as a defense-in-depth gate /// before invoking the actual backend method. fn allows_host_fn(&self, host_fn: &str) -> bool; /// DID of the account/app that submitted the current contract call. /// /// This is consensus input carried by the signed `CallContract` /// transaction, not ambient process state. fn caller_did(&self) -> &str ; /// Current finalized block height visible to this contract call. fn block_height(&self) -> Result ; /// Transfer native micro-MINT from this contract's account to `recipient`. /// /// Backends must stage the debit/credit and commit it only if the enclosing /// WASM call succeeds. fn native_transfer(&mut self, _recipient: &str, _amount: u64) -> Result<(), HostError> ; // --- State (always permitted; gated by allowlist anyway) ------- fn state_get(&mut self, key: &[u8]) -> Result>, HostError>; fn state_set(&mut self, key: &[u8], value: &[u8]) -> Result<(), HostError>; fn state_delete(&mut self, key: &[u8]) -> Result<(), HostError>; // --- Logging + events ----------------------------------------- fn log(&mut self, level: HostLogLevel, message: &str); fn emit_event( &mut self, topic: &str, indexed: &[(String, Vec)], data: &[u8], ) -> Result<(), HostError>; // --- Identity (read-only) ------------------------------------- /// Resolve the OAS identity document for `did`. `None` if not /// registered. Consensus-deterministic implementations must read /// from on-chain identity storage, not from off-chain resolvers. fn resolve_identity(&self, did: &str) -> Result>, HostError>; /// Verify that `did` has a valid lineage chain back to a registered /// human root. Returns `true` if the chain validates against /// on-chain identity storage. Pure read-only. fn verify_lineage(&self, did: &str) -> Result; // --- Cross-zone messaging ------------------------------------- /// Queue a message for `target_zone`. Must NOT execute the target /// inline — message delivery is a separate consensus step. fn send_zone_message( &mut self, target_zone: &str, target_module: Option<&str>, payload: &[u8], ) -> Result<(), HostError>; // --- Compute marketplace (privileged) ------------------------- /// Dispatch a compute job into the marketplace. The backend must /// verify that: /// - the contract has an active mandate / budget /// - the requested verification tier is supported by at least one /// registered provider /// - the call site holds the `dispatch_compute` capability /// /// Returns the assigned `job_id` on success. fn dispatch_compute(&mut self, request: &ComputeDispatchRequest) -> Result; /// Charge the contract's mandate by `amount` micro-MINT. Used by /// non-compute spend paths (e.g. paying a service contract). fn record_mandate_spend( &mut self, mandate_id: &str, amount: u64, memo: Option<&str>, ) -> Result<(), HostError>; // --- Verified read paths -------------------------------------- /// Return the receipt record for `receipt_id`, or `None`. The /// backend MUST only return receipts that are settled and within /// the chain's challenge window (or already past it). fn read_compute_receipt(&self, receipt_id: &str) -> Result, HostError>; /// Return a MACA quorum proof for a (epoch_id, work_id) tuple, or /// `None`. The backend MUST only return finalised quorum proofs. fn read_maca_quorum_proof( &self, epoch_id: u64, work_id: &SigilHash, ) -> Result, HostError>; } ``` Source line: `67`. ## host::ReceiptView [#hostreceiptview] Minimal view of a settled compute receipt exposed to contract code. Avoids dragging the full `ComputeReceipt` (with private fields like signatures) into the WASM ABI. ```rust #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct ReceiptView { pub receipt_id: String, pub job_id: String, pub provider_did: String, pub consumer_did: String, pub model_id: String, pub output_commitment: SigilHash, pub input_commitment: SigilHash, pub model_commitment: Option, pub verification_tier: String, pub cost_micro_mint: u64, pub settled: bool } ``` Source line: `184`. ## host::MacaQuorumProofView [#hostmacaquorumproofview] Minimal view of a MACA quorum proof exposed to contract code. ```rust #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct MacaQuorumProofView { pub epoch_id: u64, pub work_id: SigilHash, pub agreeing: u32, pub total_validators: u32, pub finalised: bool } ``` Source line: `200`. ## host::ComputeDispatchRequest [#hostcomputedispatchrequest] Compute job request issued by a contract via `dispatch_compute`. ```rust #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct ComputeDispatchRequest { pub model_id: String, pub input_commitment: SigilHash, pub code_commitment: Option, pub model_commitment: Option, pub max_cost_micro_mint: u64, pub verification_tier: String, pub mandate_id: String } ``` Source line: `210`. # sigil-wasm URL: https://docs.sigil.ml/reference/rust/sigil-wasm Markdown: https://docs.sigil.ml/reference/rust/sigil-wasm.md Deterministic WASM execution engine for Sigil Agent Contract Zones Deterministic WASM execution engine for Sigil Agent Contract Zones | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-wasm` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-wasm/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_wasm` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-wasm = { path = "../sigil-wasm" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-wasm/crate) — 8 declarations * [engine](/reference/rust/sigil-wasm/engine) — 13 declarations * [error](/reference/rust/sigil-wasm/error) — 2 declarations * [executor](/reference/rust/sigil-wasm/executor) — 3 declarations * [host](/reference/rust/sigil-wasm/host) — 22 declarations # sigil-zk · crate URL: https://docs.sigil.ml/reference/rust/sigil-zk/crate Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/crate.md Source declarations, signatures and documentation for crate. Source: `sigil/node/sigil-zk/src/lib.rs`. SHA-256: `34ded77df384959d671d6e48e7a914cbf9bad9600c5b496465812e88d2650f94`. 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. ## error [#error] ```rust pub mod error; ``` Source line: `32`. ## fallback [#fallback] ```rust pub mod fallback; ``` Source line: `33`. ## lineage\_proof [#lineage_proof] ```rust pub mod lineage_proof; ``` Source line: `34`. ## metrics [#metrics] ```rust pub mod metrics; ``` Source line: `35`. ## pipeline [#pipeline] ```rust pub mod pipeline; ``` Source line: `36`. ## proof [#proof] ```rust pub mod proof; ``` Source line: `37`. ## traits [#traits] ```rust pub mod traits; ``` Source line: `38`. ## pub use error::ZkError; [#pub-use-errorzkerror] ```rust pub use error::ZkError; ``` Source line: `40`. ## pub use fallback::\{HashCommitmentProver, HashCommitmentVerifier}; [#pub-use-fallbackhashcommitmentprover-hashcommitmentverifier] ```rust pub use fallback::{HashCommitmentProver, HashCommitmentVerifier}; ``` Source line: `41`. ## pub use lineage\_proof::\{ [#pub-use-lineage_proof] verify\_structural\_chain, LineageError, LineageNode, LineageVerifier, StructuralLineageVerifier, }; ```rust pub use lineage_proof::{ verify_structural_chain, LineageError, LineageNode, LineageVerifier, StructuralLineageVerifier, }; ``` Source line: `42`. ## pub use metrics::ZkMetrics; [#pub-use-metricszkmetrics] ```rust pub use metrics::ZkMetrics; ``` Source line: `45`. ## pub use pipeline::\{PipelineStage, ProofJob, ProofPipeline}; [#pub-use-pipelinepipelinestage-proofjob-proofpipeline] ```rust pub use pipeline::{PipelineStage, ProofJob, ProofPipeline}; ``` Source line: `46`. ## pub use proof::\{BlockProof, HashCommitmentProof, PublicInputs}; [#pub-use-proofblockproof-hashcommitmentproof-publicinputs] ```rust pub use proof::{BlockProof, HashCommitmentProof, PublicInputs}; ``` Source line: `47`. ## pub use traits::\{Prover, Verifier}; [#pub-use-traitsprover-verifier] ```rust pub use traits::{Prover, Verifier}; ``` Source line: `48`. ## ::TARGET\_VERIFY\_TIME\_MS [#target_verify_time_ms] Target proof verification time in milliseconds. Block Validators must verify proofs within this time to maintain throughput. ```rust pub const TARGET_VERIFY_TIME_MS: u64; ``` Source line: `53`. ## ::PROVING\_SYSTEM\_JOLT\_V1 [#proving_system_jolt_v1] Proving system identifier for Jolt v1 (RISC-V zkSNARK). ```rust pub const PROVING_SYSTEM_JOLT_V1: &str; ``` Source line: `56`. ## ::PROVING\_SYSTEM\_HASH\_COMMIT\_V1 [#proving_system_hash_commit_v1] Proving system identifier for the hash-commitment fallback. ```rust pub const PROVING_SYSTEM_HASH_COMMIT_V1: &str; ``` Source line: `59`. # sigil-zk · error URL: https://docs.sigil.ml/reference/rust/sigil-zk/error Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/error.md Source declarations, signatures and documentation for error. Source: `sigil/node/sigil-zk/src/error.rs`. SHA-256: `94d15c0200b50323ed8fec9f72bd8e923402a8bb7c40ea6d591b44eb590502b2`. 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. ## error::ZkError [#errorzkerror] ZK proof pipeline error types. Errors that can occur in the ZK proof pipeline. ```rust #[derive(Debug, Clone, thiserror::Error)] pub enum ZkError { /// Proof generation failed. #[error("proof generation failed: {0}")] ProofGenerationFailed(String), /// Proof verification failed. #[error("verification failed: {0}")] VerificationFailed(String), /// The proof data is invalid or malformed. #[error("invalid proof: {0}")] InvalidProof(String), /// The proving system is not supported by this verifier. #[error("unsupported proving system: {0}")] UnsupportedProvingSystem(String), /// The proof pipeline is already processing a job. #[error("pipeline is busy")] PipelineBusy, /// No job found with the given ID. #[error("job not found: {0}")] JobNotFound(String), /// The public inputs are invalid or inconsistent. #[error("invalid public inputs: {0}")] InvalidPublicInputs(String), /// Execution trace collection from the WASM runtime failed. #[error("trace collection failed: {0}")] TraceCollectionFailed(String), /// Translation of WASM trace to RISC-V (for Jolt) failed. #[error("trace translation failed: {0}")] TraceTranslationFailed(String), /// Serialization or deserialization error. #[error("serialization error: {0}")] SerializationError(String), } ``` Source line: `5`. ## error::ZkError::is\_busy [#errorzkerroris_busy] Returns true if this error indicates the pipeline is busy. ```rust pub fn is_busy(&self) -> bool; ``` Source line: `49`. ## error::ZkError::is\_verification\_failure [#errorzkerroris_verification_failure] Returns true if this error is a verification failure. ```rust pub fn is_verification_failure(&self) -> bool; ``` Source line: `54`. # sigil-zk · fallback URL: https://docs.sigil.ml/reference/rust/sigil-zk/fallback Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/fallback.md Source declarations, signatures and documentation for fallback. Source: `sigil/node/sigil-zk/src/fallback.rs`. SHA-256: `297b18fb1a75e5f56a285e85cdf3be06cc859a64d24a7c1c0fcec18b99972d8a`. 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. ## fallback::HashCommitmentProver [#fallbackhashcommitmentprover] Hash-commitment prover (fallback when full ZK is unavailable). Generates \[`HashCommitmentProof`] by hashing the execution trace and state transition data, then signing the commitment with Ed25519. The prover's DID is included for attribution. ```rust #[derive(Debug, Clone)] pub struct HashCommitmentProver { /// OAS DID of the prover (Block Producer). pub prover_did: String } ``` Source line: `35`. ## fallback::HashCommitmentProver::new [#fallbackhashcommitmentprovernew] Create a new hash-commitment prover with the given prover DID and Ed25519 signing key. ```rust pub fn new(prover_did: String, signing_key: ed25519_dalek::SigningKey) -> Self; ``` Source line: `44`. ## fallback::HashCommitmentProver::generate\_commitment [#fallbackhashcommitmentprovergenerate_commitment] Generate a hash-commitment "proof" for a block. This hashes the block body as an execution trace commitment and combines the pre/post state roots with the tx root as a state transition commitment. The resulting hashes are signed with the prover's Ed25519 key for cryptographic attribution. This is not a ZK proof but provides a verifiable, signed commitment to specific execution outcomes. ```rust pub fn generate_commitment( &self, block: &Block, pre_state_root: SigilHash, post_state_root: SigilHash, ) -> Result; ``` Source line: `60`. ## fallback::HashCommitmentVerifier [#fallbackhashcommitmentverifier] Hash-commitment verifier. Verifies that a \[`HashCommitmentProof`] is internally consistent with the given block data and state roots, and that the Ed25519 signature is valid. This checks that the hashes were computed correctly and the prover signed them, but does **not** verify that the block was executed correctly (that requires a real ZK proof or re-execution). ```rust #[derive(Debug, Clone, Default)] pub struct HashCommitmentVerifier; ``` Source line: `104`. ## fallback::HashCommitmentVerifier::new [#fallbackhashcommitmentverifiernew] Create a new hash-commitment verifier. ```rust pub fn new() -> Self; ``` Source line: `108`. ## fallback::HashCommitmentVerifier::verify\_commitment [#fallbackhashcommitmentverifierverify_commitment] Verify a hash commitment against a block. Checks: 1. The block height in the proof matches the block. 2. The execution trace hash matches the serialized block body. 3. The state transition hash matches (pre\_root || post\_root || tx\_root). 4. The prover signature is exactly 64 bytes (Ed25519). 5. The Ed25519 signature verifies against the provided public key. # Parameters [#parameters] * `proof`: The hash commitment proof to verify. * `block`: The block to verify against. * `pre_state_root`: State root before executing the block. * `post_state_root`: State root after executing the block. * `verifying_key`: The Ed25519 public key of the claimed prover. # Returns [#returns] `Ok(true)` if all checks pass, `Ok(false)` if hashes don't match, or `Err` if the proof structure is invalid or signature verification fails. ```rust pub fn verify_commitment( &self, proof: &HashCommitmentProof, block: &Block, pre_state_root: SigilHash, post_state_root: SigilHash, verifying_key: &ed25519_dalek::VerifyingKey, ) -> Result; ``` Source line: `131`. # sigil-zk URL: https://docs.sigil.ml/reference/rust/sigil-zk Markdown: https://docs.sigil.ml/reference/rust/sigil-zk.md Zero-knowledge proof pipeline types and traits for Sigil blockchain Zero-knowledge proof pipeline types and traits for Sigil blockchain | Property | Source value | | ---------------- | ------------------------------------------------------ | | Package | `sigil-zk` | | Manifest version | `0.1.0` | | Source | `sigil/node/sigil-zk/Cargo.toml` | | Reference status | source reference | | Publish flag | `true`; this flag is not registry publication evidence | ## Use the source package [#use-the-source-package] In an authorized local checkout, add this package as a path dependency. The Rust crate identifier is `sigil_zk` unless the manifest supplies an explicit library name. Read the exposed modules below for exact imports and configuration. ```toml [dependencies] sigil-zk = { path = "../sigil-zk" } ``` The relative path is resolved from your application's Cargo.toml; adjust it to the actual checkout. This does not assume a package registry release. ## Features [#features] | Feature | Dependencies | | --------- | ---------------------------------- | | `default` | No additional feature dependencies | ## Public source modules [#public-source-modules] * [crate](/reference/rust/sigil-zk/crate) — 17 declarations * [error](/reference/rust/sigil-zk/error) — 3 declarations * [fallback](/reference/rust/sigil-zk/fallback) — 6 declarations * [lineage\_proof](/reference/rust/sigil-zk/lineage_proof) — 6 declarations * [metrics](/reference/rust/sigil-zk/metrics) — 6 declarations * [pipeline](/reference/rust/sigil-zk/pipeline) — 12 declarations * [proof](/reference/rust/sigil-zk/proof) — 9 declarations * [traits](/reference/rust/sigil-zk/traits) — 2 declarations # sigil-zk · lineage_proof URL: https://docs.sigil.ml/reference/rust/sigil-zk/lineage_proof Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/lineage_proof.md Source declarations, signatures and documentation for lineage_proof. Source: `sigil/node/sigil-zk/src/lineage_proof.rs`. SHA-256: `e05033b0e169cb18c2e314a3401f2cff26ad35fdf5d770677d8b1aa3c033949b`. 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. ## lineage\_proof::LineageNode [#lineage_prooflineagenode] Snapshot of the on-chain GAL view of a single DID, used as input to \[`verify_structural_chain`]. Higher layers populate this from `sigil-core::gal` records. ```rust #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct LineageNode { /// The subject DID. pub did: String, /// One of `"hmr"`, `"mhr"`, `"enr"`, or `"agent"` (or any /// non-root kind tag). pub kind: String, /// On-chain status: `"active"`, `"rotating"`, `"revoked"`. pub status: String, /// True when GAL `gal_check_revocation` returned `revoked: true` for /// this DID. Tracked separately from `status` because revocation may /// cascade independently of status. pub revoked: bool } ``` Source line: `26`. ## lineage\_proof::LineageNode::is\_root [#lineage_prooflineagenodeis_root] True when this node represents a terminal root anchor. ```rust pub fn is_root(&self) -> bool; ``` Source line: `42`. ## lineage\_proof::LineageError [#lineage_prooflineageerror] Outcome of a structural lineage check. ```rust #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum LineageError { /// Chain is empty. #[error("empty lineage chain")] Empty, /// One of the nodes is revoked on the GAL. #[error("node {did} is revoked")] Revoked { /// The revoked DID. did: String, }, /// One of the non-terminal nodes has a non-active status. #[error("node {did} has non-active status: {status}")] NonActive { /// The DID with the non-active status. did: String, /// The reported status. status: String, }, /// The terminal node is not a recognized root kind. #[error("terminal node {did} has non-root kind {kind:?}")] TerminalNotRoot { /// The terminal DID. did: String, /// The reported (non-root) kind. kind: String, }, /// A non-terminal node was reported as a root kind, which means the /// lineage chain is structurally invalid (a root cannot have a /// parent). #[error("non-terminal node {did} is a root kind {kind:?}")] InternalNodeIsRoot { /// The internal DID. did: String, /// The reported (root) kind. kind: String, }, } ``` Source line: `49`. ## lineage\_proof::LineageVerifier [#lineage_prooflineageverifier] Verifier abstraction so a future ZK-wrapped variant can plug in without changing call sites. ```rust pub trait LineageVerifier { /// Verify the lineage chain. Implementations may add cryptographic /// signature or zero-knowledge checks; the structural checks below /// are the minimum every implementation must perform. fn verify(&self, chain: &[LineageNode]) -> Result<(), LineageError>; } ``` Source line: `89`. ## lineage\_proof::StructuralLineageVerifier [#lineage_proofstructurallineageverifier] Structural-only verifier: enforces the four invariants documented at the module level. Other verifiers (cryptographic, ZK-wrapped) call this internally and add their own checks on top. ```rust pub struct StructuralLineageVerifier; ``` Source line: `99`. ## lineage\_proof::verify\_structural\_chain [#lineage_proofverify_structural_chain] The reference structural check. Same logic as `StructuralLineageVerifier::verify` but exposed as a free function so it is easy to call from contexts that don't want to hold a verifier instance. ```rust pub fn verify_structural_chain(chain: &[LineageNode]) -> Result<(), LineageError>; ``` Source line: `111`. # sigil-zk · metrics URL: https://docs.sigil.ml/reference/rust/sigil-zk/metrics Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/metrics.md Source declarations, signatures and documentation for metrics. Source: `sigil/node/sigil-zk/src/metrics.rs`. SHA-256: `adb85f57b78b77df2c3a579d8572587aacc0b34f3eaca1112dfaeae02cbb0bc3`. 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. ## metrics::ZkMetrics [#metricszkmetrics] Aggregated ZK proof pipeline metrics. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ZkMetrics { /// Total number of proofs generated. pub proofs_generated: u64, /// Total number of proofs verified. pub proofs_verified: u64, /// Average proof generation time in milliseconds. pub avg_prove_time_ms: f64, /// Average proof verification time in milliseconds. pub avg_verify_time_ms: f64, /// Number of verification failures. pub verification_failures: u64, /// Current pipeline depth (number of completed proofs retained). pub pipeline_depth: usize } ``` Source line: `12`. ## metrics::ZkMetrics::new [#metricszkmetricsnew] Create a new metrics instance with all counters at zero. ```rust pub fn new() -> Self; ``` Source line: `36`. ## metrics::ZkMetrics::record\_proof\_generation [#metricszkmetricsrecord_proof_generation] Record a proof generation event. Updates the running average proof generation time. ```rust pub fn record_proof_generation(&mut self, time_ms: u64); ``` Source line: `52`. ## metrics::ZkMetrics::record\_verification [#metricszkmetricsrecord_verification] Record a proof verification event. Updates the running average verification time and failure count. ```rust pub fn record_verification(&mut self, time_ms: u64, success: bool); ``` Source line: `61`. ## metrics::ZkMetrics::meets\_target [#metricszkmetricsmeets_target] Returns true if the average verification time meets the target (\<= 10ms). ```rust pub fn meets_target(&self) -> bool; ``` Source line: `72`. ## metrics::ZkMetrics::verification\_success\_rate [#metricszkmetricsverification_success_rate] Returns the verification success rate as a fraction (0.0 to 1.0). Returns 1.0 if no verifications have been recorded. ```rust pub fn verification_success_rate(&self) -> f64; ``` Source line: `79`. # sigil-zk · pipeline URL: https://docs.sigil.ml/reference/rust/sigil-zk/pipeline Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/pipeline.md Source declarations, signatures and documentation for pipeline. Source: `sigil/node/sigil-zk/src/pipeline.rs`. SHA-256: `fd759dca42f27ed690d9e9e6dd939279a8dcd1b28f57fa3bfa780c848fadc0b8`. 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. ## pipeline::PipelineStage [#pipelinepipelinestage] Pipeline stages for proof generation. A proof job progresses through these stages sequentially. The pipeline can overlap proof generation with the next block's consensus. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum PipelineStage { /// Collecting execution trace from the WASM runtime. TraceCollection, /// Translating WASM trace to RISC-V (for Jolt proving system). TraceTranslation, /// Generating the zero-knowledge proof from the translated trace. ProofGeneration, /// Proof generation is complete and the proof is available. Complete, /// Pipeline stage failed with an error message. Failed(String), } ``` Source line: `18`. ## pipeline::PipelineStage::is\_terminal [#pipelinepipelinestageis_terminal] Returns true if this stage represents a terminal state (Complete or Failed). ```rust pub fn is_terminal(&self) -> bool; ``` Source line: `33`. ## pipeline::PipelineStage::name [#pipelinepipelinestagename] Returns a human-readable name for this stage. ```rust pub fn name(&self) -> &str; ``` Source line: `38`. ## pipeline::ProofJob [#pipelineproofjob] Status of a single proof generation job. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProofJob { /// Unique identifier for this job. pub job_id: String, /// Block height being proved. pub block_height: u64, /// Hash of the block being proved. pub block_hash: SigilHash, /// Current pipeline stage. pub stage: PipelineStage, /// Unix timestamp (ms) when the job started. pub started_at: u64, /// Unix timestamp (ms) when the job completed (if terminal). pub completed_at: Option, /// The completed proof, if generation succeeded. pub proof: Option, /// Error message, if the job failed. pub error: Option } ``` Source line: `51`. ## pipeline::ProofPipeline [#pipelineproofpipeline] Proof pipeline that manages proof generation jobs. The pipeline can overlap proof generation with the next block's consensus round. It maintains a current job and a bounded history of completed proofs. ```rust #[derive(Debug)] pub struct ProofPipeline { /// The currently running proof job, if any. pub current_job: Option, /// Completed proofs (bounded by `max_pipeline_depth`). pub completed_proofs: Vec, /// Maximum number of completed proofs to retain. pub max_pipeline_depth: usize } ``` Source line: `75`. ## pipeline::ProofPipeline::new [#pipelineproofpipelinenew] Create a new proof pipeline with the given maximum depth for completed proofs. ```rust pub fn new(max_depth: usize) -> Self; ``` Source line: `86`. ## pipeline::ProofPipeline::start\_job [#pipelineproofpipelinestart_job] Start a new proof generation job for the given block. Returns the job ID on success. Fails with \[`ZkError::PipelineBusy`] if there is already an active (non-terminal) job. ```rust pub fn start_job( &mut self, block_height: u64, block_hash: SigilHash, ) -> Result; ``` Source line: `98`. ## pipeline::ProofPipeline::advance\_stage [#pipelineproofpipelineadvance_stage] Advance a job to the next pipeline stage. # Errors [#errors] Returns \[`ZkError::JobNotFound`] if no job matches the given ID. ```rust pub fn advance_stage(&mut self, job_id: &str, new_stage: PipelineStage) -> Result<(), ZkError>; ``` Source line: `129`. ## pipeline::ProofPipeline::complete\_job [#pipelineproofpipelinecomplete_job] Mark a job as successfully completed with the generated proof. The proof is moved to the completed proofs list. If the list exceeds `max_pipeline_depth`, the oldest proof is evicted. # Errors [#errors-1] Returns \[`ZkError::JobNotFound`] if no job matches the given ID. ```rust pub fn complete_job(&mut self, job_id: &str, proof: BlockProof) -> Result<(), ZkError>; ``` Source line: `147`. ## pipeline::ProofPipeline::fail\_job [#pipelineproofpipelinefail_job] Mark a job as failed with an error message. Clears the current job slot so new jobs can start. # Errors [#errors-2] Returns \[`ZkError::JobNotFound`] if no job matches the given ID. ```rust pub fn fail_job(&mut self, job_id: &str, error: String) -> Result<(), ZkError>; ``` Source line: `178`. ## pipeline::ProofPipeline::get\_proof [#pipelineproofpipelineget_proof] Look up a completed proof by block height. Returns `None` if no proof for that height is in the completed list. ```rust pub fn get_proof(&self, block_height: u64) -> Option<&BlockProof>; ``` Source line: `198`. ## pipeline::ProofPipeline::is\_busy [#pipelineproofpipelineis_busy] Returns true if the pipeline has an active (non-terminal) job. ```rust pub fn is_busy(&self) -> bool; ``` Source line: `205`. # sigil-zk · proof URL: https://docs.sigil.ml/reference/rust/sigil-zk/proof Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/proof.md Source declarations, signatures and documentation for proof. Source: `sigil/node/sigil-zk/src/proof.rs`. SHA-256: `4957d3c16aefecc25268bf2e62fb39b3eb29da582bb1607920cbbf052bc46878`. 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. ## proof::BlockProof [#proofblockproof] A zero-knowledge proof of correct block execution. Generated by a Block Producer after executing all transactions in a block. The proof attests that executing the transactions against `parent_state_root` produces `post_state_root`, without revealing the execution details. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BlockProof { /// Height of the block this proof covers. pub block_height: u64, /// Hash of the block being proved. pub block_hash: SigilHash, /// State root before block execution. pub parent_state_root: SigilHash, /// State root after block execution. pub post_state_root: SigilHash, /// Merkle root of the transactions in the block. pub tx_root: SigilHash, /// Merkle root of the transaction receipts. pub receipt_root: SigilHash, /// Identifier for the proving system used (e.g., "jolt-v1", "hash-commit-v1"). pub proving_system: String, /// The raw proof bytes (format is proving-system-dependent). pub proof_bytes: Vec, /// Public inputs that both prover and verifier agree on. pub public_inputs: PublicInputs, /// Hash of the verification key (identifies the circuit). pub verification_key_hash: SigilHash, /// OAS DID of the prover (Block Producer). pub prover_did: String, /// Time taken to generate this proof, in milliseconds. pub proof_generation_time_ms: u64 } ``` Source line: `17`. ## proof::PublicInputs [#proofpublicinputs] Public inputs that both prover and verifier agree on. These values are committed to by the proof and verified against the block. Any mismatch between these values and the actual block data means the proof is invalid. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PublicInputs { /// State root before execution. pub pre_state_root: SigilHash, /// State root after execution. pub post_state_root: SigilHash, /// Block hash being proved. pub block_hash: SigilHash, /// Number of transactions in the block. pub tx_count: u32, /// Total gas consumed by the block. pub gas_used: u64 } ``` Source line: `50`. ## proof::PublicInputs::to\_bytes [#proofpublicinputsto_bytes] Serialize to a deterministic byte representation for proof verification. Layout: pre\_state\_root (32) | post\_state\_root (32) | block\_hash (32) | tx\_count (4 LE) | gas\_used (8 LE) = 108 bytes total. ```rust pub fn to_bytes(&self) -> Vec; ``` Source line: `68`. ## proof::PublicInputs::from\_bytes [#proofpublicinputsfrom_bytes] Deserialize from the deterministic byte representation. Expects exactly 108 bytes in the layout produced by \[`Self::to_bytes`]. ```rust pub fn from_bytes(bytes: &[u8]) -> Result; ``` Source line: `81`. ## proof::PublicInputs::commitment [#proofpublicinputscommitment] Compute a commitment hash of these public inputs. Used for binding the proof to specific public inputs. ```rust pub fn commitment(&self) -> SigilHash; ``` Source line: `122`. ## proof::HashCommitmentProof [#proofhashcommitmentproof] A hash-commitment proof used as a fallback when full ZK is not available. This is not a true zero-knowledge proof. It commits to the execution trace and state transition hashes, signed by the prover's Ed25519 key. Validators verify the signature against the prover's public key to confirm attribution, but cannot verify correctness of execution without re-executing (or trusting the prover). Phase 2 (Jolt Pro) replaces this with real zkSNARKs providing succinctness, privacy, and soundness. ```rust #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct HashCommitmentProof { /// Height of the block this commitment covers. pub block_height: u64, /// BLAKE3 hash of the full execution trace. pub execution_trace_hash: SigilHash, /// BLAKE3 hash of the state transition (pre_root || post_root || tx_root). pub state_transition_hash: SigilHash, /// Ed25519 signature by the prover over (execution_trace_hash || state_transition_hash). /// 64 bytes. pub prover_signature: Vec } ``` Source line: `138`. ## proof::HashCommitmentProof::try\_to\_zk\_proof [#proofhashcommitmentprooftry_to_zk_proof] Convert this hash-commitment proof into a \[`sigil_core::block::ZkProof`] for embedding in a block header. Serializes the proof to JSON bytes as the `proof_bytes` field, sets the proving system to `hash-commit-v1`, and includes the execution trace and state transition hashes as public inputs. ```rust pub fn try_to_zk_proof(&self) -> Result; ``` Source line: `157`. ## proof::HashCommitmentProof::to\_zk\_proof [#proofhashcommitmentproofto_zk_proof] Convert this hash-commitment proof into a \[`sigil_core::block::ZkProof`]. This convenience wrapper no longer silently emits empty proof bytes if serialization fails; callers that can recover should use \[`Self::try_to_zk_proof`]. ```rust pub fn to_zk_proof(&self) -> sigil_core::block::ZkProof; ``` Source line: `178`. ## proof::HashCommitmentProof::from\_zk\_proof [#proofhashcommitmentprooffrom_zk_proof] Deserialize a \[`HashCommitmentProof`] from a \[`sigil_core::block::ZkProof`]. Returns `None` if the proving system is not `hash-commit-v1` or if the proof bytes cannot be deserialized. ```rust pub fn from_zk_proof(zk: &sigil_core::block::ZkProof) -> Option; ``` Source line: `187`. # sigil-zk · traits URL: https://docs.sigil.ml/reference/rust/sigil-zk/traits Markdown: https://docs.sigil.ml/reference/rust/sigil-zk/traits.md Source declarations, signatures and documentation for traits. Source: `sigil/node/sigil-zk/src/traits.rs`. SHA-256: `260212a22761e6942d870d29d7c73f4e03d2d74faf682c6a40225f00a40a5c66`. 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. ## traits::Prover [#traitsprover] Trait for ZK proof generation, implemented by Block Producers. A `Prover` takes a fully-executed block (with known pre/post state roots) and produces a \[`BlockProof`] that any \[`Verifier`] can check without re-executing the block. ```rust pub trait Prover: Send + Sync { /// Generate a proof of correct block execution. /// /// # Arguments /// * `block` - The block whose execution is being proved. /// * `pre_state_root` - The state root before executing this block. /// * `post_state_root` - The state root after executing this block. /// /// # Errors /// Returns [`ZkError`] if proof generation fails (e.g., trace collection, /// circuit constraints unsatisfied, resource limits exceeded). fn prove( &self, block: &Block, pre_state_root: SigilHash, post_state_root: SigilHash, ) -> Result; /// Returns the proving system identifier (e.g., "jolt-v1", "hash-commit-v1"). fn proving_system(&self) -> &str; /// Returns the verification key hash for this prover's circuit. /// /// This identifies the specific circuit version and allows verifiers to /// select the correct verification key. fn verification_key_hash(&self) -> SigilHash; } ``` Source line: `17`. ## traits::Verifier [#traitsverifier] Trait for ZK proof verification, used by Block Validators. A `Verifier` checks a \[`BlockProof`] and returns whether the proof is valid. Verification must complete within the target time (10ms) to maintain block processing throughput. ```rust pub trait Verifier: Send + Sync { /// Verify a block proof. /// /// Must complete in < 10ms to meet Sigil's performance targets. /// /// # Arguments /// * `proof` - The block proof to verify. /// /// # Returns /// `Ok(true)` if the proof is valid, `Ok(false)` if the proof is /// cryptographically valid but does not match the claimed public inputs, /// or `Err` if verification itself fails. fn verify(&self, proof: &BlockProof) -> Result; /// Returns the list of proving system identifiers this verifier supports. fn supported_systems(&self) -> Vec; } ``` Source line: `50`.