Sigil documentation
ReferenceRust referencesigil-rpc

sigil-rpc · methods

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

Available RPC methods exposed by a Sigil node.

#[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

Returns the canonical JSON-RPC method string.

pub fn as_str(&self) -> &'static str;

Source line: 445.

methods::RpcMethod::from_method_str

Parse a method string into an RpcMethod.

Returns None for unknown method names.

pub fn from_method_str(s: &str) -> Option<Self>;

Source line: 675.

methods::RpcMethod::requires_auth

Returns true for methods that mutate state and therefore require an Arsenal ACT (Authorization Capability Token).

pub fn requires_auth(&self) -> bool;

Source line: 907.

methods::RpcMethod::is_query

Returns true for read-only query methods.

pub fn is_query(&self) -> bool;

Source line: 930.

On this page