sigil-core · transaction
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
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:
TX_DOMAIN_TAG || serde_json::to_vec(&transaction)and the Ed25519 signing primitive receives BLAKE3(transcript) as its
32-byte message.
pub const TX_DOMAIN_TAG: &[u8];Source line: 78.
transaction::SPONSORED_SETUP_SUBJECT_DOMAIN_TAG
Domain separation tag for subject consent inside sponsored setup envelopes.
pub const SPONSORED_SETUP_SUBJECT_DOMAIN_TAG: &[u8];Source line: 80.
transaction::DEFAULT_SIGNATURE_BATCH_SIZE
Default transaction signature batch size for validator block admission.
pub const DEFAULT_SIGNATURE_BATCH_SIZE: usize;Source line: 83.
transaction::SignedTransaction
A signed transaction ready for inclusion in a block.
#[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<u8>,
/// Compressed Ed25519 public key of the signer (32 bytes).
pub signer_public_key: Vec<u8>
}Source line: 94.
transaction::SignedTransaction::tx_hash
Compute the transaction hash (BLAKE3 of serialized tx).
Returns an error if the transaction cannot be serialized.
pub fn tx_hash(&self) -> Result<SigilHash, CoreError>;Source line: 107.
transaction::SignedTransaction::canonical_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.
pub fn canonical_signing_bytes(tx: &Transaction) -> Result<Vec<u8>, CoreError>;Source line: 118.
transaction::SignedTransaction::sign
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
Returns [CoreError::SerializationError] if the transaction cannot be
serialized.
pub fn sign(tx: Transaction, signing_key: &SigningKey) -> Result<Self, CoreError>;Source line: 138.
transaction::SignedTransaction::verify
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
Returns [CoreError::InvalidSignature] if verification fails for any
reason. Returns [CoreError::SerializationError] if the transaction
payload cannot be serialized.
pub fn verify(&self) -> Result<(), CoreError>;Source line: 166.
transaction::SignedTransaction::verify_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].
pub fn verify_batch(txs: &[SignedTransaction], batch_size: usize) -> Result<(), CoreError>;Source line: 220.
transaction::SignedTransaction::verify_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.
pub fn verify_batch_report_first_failure(
txs: &[SignedTransaction],
batch_size: usize,
) -> Result<(), (usize, CoreError)>;Source line: 230.
transaction::SignedTransaction::batch_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.
pub fn batch_signature_hardware_hint() -> &'static str;Source line: 278.
transaction::Transaction
A Sigil blockchain transaction.
#[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<chrono::Utc>
}Source line: 306.
transaction::SponsoredSetupScope
Strict setup-only scope for sponsored onboarding.
#[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
pub fn as_str(self) -> &'static str;Source line: 336.
transaction::SponsoredSetupData
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.
#[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<TransactionType>,
pub subject_public_key: Vec<u8>,
pub subject_signature: Vec<u8>
}Source line: 355.
transaction::InitialDeviceAnchorData
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.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct InitialDeviceAnchorData {
pub subject_did: String,
pub device_id: String,
pub device_public_key: Vec<u8>,
pub device_commitment: String,
pub attestation_commitment: Option<String>,
pub display_name_commitment: Option<String>,
pub sequence: u64,
pub anchored_at_block: u64
}Source line: 371.
transaction::SponsoredSetupData::subject_signing_bytes
pub fn subject_signing_bytes(&self, chain_id: &str) -> Result<Vec<u8>, CoreError>;Source line: 393.
transaction::SponsoredSetupData::subject_signing_digest
pub fn subject_signing_digest(&self, chain_id: &str) -> Result<[u8; 32], CoreError>;Source line: 414.
transaction::Transaction::hash
Compute the hash of this transaction.
Returns an error if the transaction cannot be serialized.
pub fn hash(&self) -> Result<SigilHash, CoreError>;Source line: 424.
transaction::Transaction::category
Returns the category of this transaction.
pub fn category(&self) -> TransactionCategory;Source line: 431.
transaction::Transaction::declared_access_set
Deterministic read/write declaration for optimistic execution and account-local fee markets.
pub fn declared_access_set(&self) -> TransactionAccessSet;Source line: 437.
transaction::TransactionCategory
Transaction category for routing to semantic validators.
#[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
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.
#[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
pub fn new(partition: impl Into<String>, key: impl Into<String>) -> Self;Source line: 510.
transaction::StateAccess::account_balance
pub fn account_balance(did: impl Into<String>) -> Self;Source line: 517.
transaction::StateAccess::account_nonce
pub fn account_nonce(did: impl Into<String>) -> Self;Source line: 521.
transaction::StateAccess::fee_market_account
pub fn fee_market_account(did: impl Into<String>) -> Self;Source line: 525.
transaction::StateAccess::identity
pub fn identity(did: impl Into<String>) -> Self;Source line: 529.
transaction::StateAccess::validator
pub fn validator(did: impl Into<String>) -> Self;Source line: 533.
transaction::StateAccess::delegation
pub fn delegation(delegator: impl AsRef<str>, validator: impl AsRef<str>) -> Self;Source line: 537.
transaction::StateAccess::proposal
pub fn proposal(id: impl ToString) -> Self;Source line: 544.
transaction::StateAccess::vote
pub fn vote(proposal_id: impl ToString, voter: impl AsRef<str>) -> Self;Source line: 548.
transaction::StateAccess::contract
pub fn contract(did: impl Into<String>) -> Self;Source line: 555.
transaction::StateAccess::contract_code
pub fn contract_code(hash: impl ToString) -> Self;Source line: 559.
transaction::StateAccess::contract_state
pub fn contract_state(contract_did: impl AsRef<str>, key: impl AsRef<str>) -> Self;Source line: 563.
transaction::StateAccess::contract_state_prefix
pub fn contract_state_prefix(contract_did: impl AsRef<str>) -> Self;Source line: 570.
transaction::StateAccess::zone
pub fn zone(id: impl Into<String>) -> Self;Source line: 574.
transaction::StateAccess::zone_queue
pub fn zone_queue(id: impl Into<String>) -> Self;Source line: 578.
transaction::StateAccess::nft_collection
pub fn nft_collection(id: impl Into<String>) -> Self;Source line: 582.
transaction::StateAccess::nft_token
pub fn nft_token(collection_id: impl AsRef<str>, token_id: u128) -> Self;Source line: 586.
transaction::StateAccess::dex_pool
pub fn dex_pool(pool_id: impl Into<String>) -> Self;Source line: 593.
transaction::StateAccess::dex_position
pub fn dex_position(pool_id: impl AsRef<str>, owner_did: impl AsRef<str>) -> Self;Source line: 597.
transaction::StateAccess::dex_asset_balance
pub fn dex_asset_balance(asset_id: impl AsRef<str>, owner_did: impl AsRef<str>) -> Self;Source line: 604.
transaction::StateAccess::dex_asset_balance_owner_prefix
pub fn dex_asset_balance_owner_prefix(owner_did: impl AsRef<str>) -> Self;Source line: 611.
transaction::StateAccess::dao
pub fn dao(id: impl Into<String>) -> Self;Source line: 615.
transaction::StateAccess::mandate
pub fn mandate(id: impl Into<String>) -> Self;Source line: 619.
transaction::StateAccess::labor_job
pub fn labor_job(id: impl Into<String>) -> Self;Source line: 623.
transaction::StateAccess::labor_bid
pub fn labor_bid(id: impl Into<String>) -> Self;Source line: 627.
transaction::StateAccess::labor_contract
pub fn labor_contract(id: impl Into<String>) -> Self;Source line: 631.
transaction::StateAccess::labor_offer
pub fn labor_offer(id: impl Into<String>) -> Self;Source line: 635.
transaction::StateAccess::labor_claim
pub fn labor_claim(id: impl Into<String>) -> Self;Source line: 639.
transaction::StateAccess::training_run
pub fn training_run(id: impl Into<String>) -> Self;Source line: 643.
transaction::StateAccess::training_reward_pool
pub fn training_reward_pool(id: impl Into<String>) -> Self;Source line: 647.
transaction::StateAccess::training_rollout_batch
pub fn training_rollout_batch(run_id: impl AsRef<str>, batch_id: impl AsRef<str>) -> Self;Source line: 651.
transaction::StateAccess::training_weights
pub fn training_weights(run_id: impl AsRef<str>, model_root: impl ToString) -> Self;Source line: 658.
transaction::StateAccess::training_reward_attestation
pub fn training_reward_attestation(
run_id: impl AsRef<str>,
attestation_id: impl AsRef<str>,
) -> Self;Source line: 665.
transaction::StateAccess::training_slash
pub fn training_slash(run_id: impl AsRef<str>, slash_id: impl AsRef<str>) -> Self;Source line: 675.
transaction::StateAccess::compute_provider
#[cfg(feature = "compute")]
pub fn compute_provider(id: impl Into<String>) -> Self;Source line: 683.
transaction::StateAccess::compute_escrow
#[cfg(feature = "compute")]
pub fn compute_escrow(id: impl Into<String>) -> Self;Source line: 688.
transaction::StateAccess::compute_receipt
#[cfg(feature = "compute")]
pub fn compute_receipt(id: impl Into<String>) -> Self;Source line: 693.
transaction::StateAccess::compute_challenge
#[cfg(feature = "compute")]
pub fn compute_challenge(id: impl Into<String>) -> Self;Source line: 698.
transaction::StateAccess::storage_provider
pub fn storage_provider(id: impl Into<String>) -> Self;Source line: 702.
transaction::StateAccess::storage_request
pub fn storage_request(id: impl Into<String>) -> Self;Source line: 706.
transaction::StateAccess::storage_contract
pub fn storage_contract(id: impl Into<String>) -> Self;Source line: 710.
transaction::StateAccess::storage_receipt
pub fn storage_receipt(id: impl Into<String>) -> Self;Source line: 714.
transaction::StateAccess::storage_challenge
pub fn storage_challenge(id: impl Into<String>) -> Self;Source line: 718.
transaction::StateAccess::global
pub fn global(key: impl Into<String>) -> Self;Source line: 722.
transaction::TransactionAccessSet
Deterministic transaction-level read/write declaration.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TransactionAccessSet {
pub reads: BTreeSet<StateAccess>,
pub writes: BTreeSet<StateAccess>
}Source line: 729.
transaction::TransactionAccessSet::new
pub fn new() -> Self;Source line: 735.
transaction::TransactionAccessSet::for_sender
pub fn for_sender(sender_did: &str) -> Self;Source line: 742.
transaction::TransactionAccessSet::read
pub fn read(&mut self, key: StateAccess);Source line: 750.
transaction::TransactionAccessSet::write
pub fn write(&mut self, key: StateAccess);Source line: 754.
transaction::TransactionAccessSet::read_write
pub fn read_write(&mut self, key: StateAccess);Source line: 758.
transaction::TransactionAccessSet::conflicts_with
pub fn conflicts_with(&self, other: &Self) -> bool;Source line: 763.
transaction::TransactionAccessSet::local_fee_accounts
pub fn local_fee_accounts(&self) -> BTreeSet<String>;Source line: 819.
transaction::TransactionType
All 34 transaction types.
#[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
Returns the category of this transaction type.
pub fn category(&self) -> TransactionCategory;Source line: 1369.
transaction::TransactionType::declared_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.
pub fn declared_access_set(&self, sender_did: &str) -> TransactionAccessSet;Source line: 1619.
transaction::TransactionType::name
Returns a human-readable name.
pub fn name(&self) -> &'static str;Source line: 2958.
transaction::IdentityRegisterData
#[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
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct IdentityRevokeData {
pub did: String,
pub reason: String
}Source line: 3257.
transaction::IdentityDelegateData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct IdentityDelegateData {
pub did: String,
pub delegate_did: String,
pub scopes: Vec<String>,
pub expires_at: Option<String>
}Source line: 3263.
transaction::IdentityRecoverData
#[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
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegisterRootData {
pub root_did: String,
pub kind: RootKind,
pub public_keys: Vec<String>,
pub recovery_policy: Option<ControlPolicy>,
pub metadata_commitment: Option<String>
}Source line: 3282.
transaction::RotateRootKeyData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RotateRootKeyData {
pub root_did: String,
pub new_public_keys: Vec<String>,
pub effective_epoch: Option<u64>
}Source line: 3291.
transaction::RevokeRootData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RevokeRootData {
pub root_did: String,
pub reason: String
}Source line: 3298.
transaction::CreateRootGroupData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreateRootGroupData {
pub group_did: String,
pub kind: RootKind,
pub policy: ThresholdPolicy,
pub profit_shares: Vec<crate::authority::ProfitShare>,
pub metadata_commitment: Option<String>
}Source line: 3304.
transaction::UpdateRootGroupPolicyData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UpdateRootGroupPolicyData {
pub group_did: String,
pub new_policy: ThresholdPolicy,
pub reason: Option<String>
}Source line: 3313.
transaction::IssueAgentData
#[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<String>,
pub permissions: Vec<Permission>,
pub revenue_account: Option<String>,
pub metadata_commitment: Option<String>
}Source line: 3320.
transaction::RotateAgentKeyData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RotateAgentKeyData {
pub agent_did: String,
pub new_public_keys: Vec<String>,
pub effective_epoch: Option<u64>
}Source line: 3331.
transaction::RevokeAgentData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RevokeAgentData {
pub agent_did: String,
pub reason: String
}Source line: 3338.
transaction::DelegatePermissionData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DelegatePermissionData {
pub controller_did: String,
pub delegate_did: String,
pub permissions: Vec<Permission>,
pub expires_at_epoch: Option<u64>
}Source line: 3344.
transaction::RevokePermissionData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RevokePermissionData {
pub controller_did: String,
pub delegate_did: String,
pub permissions: Vec<Permission>
}Source line: 3352.
transaction::MarsAnchorData
#[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<String>
}Source line: 3363.
transaction::WeftRootCommitment::to_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.
pub fn to_mars_anchor_data(
&self,
entry_did: impl Into<String>,
publisher_did: impl Into<String>,
version: impl Into<String>,
bond_id: Option<String>,
) -> MarsAnchorData;Source line: 3377.
transaction::MarsAnchorRevokeData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct MarsAnchorRevokeData {
pub entry_did: String,
pub reason: String
}Source line: 3395.
transaction::MarsAnchorTransferData
#[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
#[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
#[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
#[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
Minimum stake for this mode.
pub fn min_stake(&self) -> u64;Source line: 3436.
transaction::UnstakeData
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DelegateStakeData {
pub validator_did: String,
pub amount: u64
}Source line: 3451.
transaction::UndelegateStakeData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct UndelegateStakeData {
pub validator_did: String,
pub shares: u64
}Source line: 3457.
transaction::ClaimRewardsData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ClaimRewardsData {
/// Optional: claim from a specific epoch range.
pub from_epoch: Option<u64>,
pub to_epoch: Option<u64>
}Source line: 3463.
transaction::TransferData
Basic MINT transfer between accounts.
#[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<String>
}Source line: 3471.
transaction::DexCreatePoolData
#[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<u64>
}Source line: 3485.
transaction::DexAddLiquidityData
#[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<u64>
}Source line: 3496.
transaction::DexRemoveLiquidityData
#[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<u64>
}Source line: 3507.
transaction::DexSwapExactInData
#[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<u64>
}Source line: 3517.
transaction::DexSwapExactOutData
#[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<u64>
}Source line: 3527.
transaction::CreateTreasuryData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreateTreasuryData {
pub treasury_did: String,
pub controller_did: String,
pub accepted_token_ids: Vec<String>,
pub withdrawal_policy: ControlPolicy,
pub distribution_policy: Option<DistributionPolicy>
}Source line: 3541.
transaction::DepositTreasuryData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DepositTreasuryData {
pub treasury_did: String,
pub token_id: Option<String>,
pub amount: u128
}Source line: 3550.
transaction::WithdrawTreasuryData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WithdrawTreasuryData {
pub treasury_did: String,
pub token_id: Option<String>,
pub recipient_did: String,
pub amount: u128,
pub memo: Option<String>
}Source line: 3557.
transaction::SetDistributionPolicyData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetDistributionPolicyData {
pub treasury_did: String,
pub distribution_policy: DistributionPolicy
}Source line: 3566.
transaction::DistributeRevenueData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DistributeRevenueData {
pub treasury_did: String,
pub token_id: Option<String>,
pub amount: Option<u128>
}Source line: 3572.
transaction::CreateTokenClassData
#[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<ControlPolicy>,
pub metadata_uri: Option<String>
}Source line: 3579.
transaction::MintTokenData
#[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
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TransferTokenData {
pub token_id: String,
pub recipient_did: String,
pub amount: u128,
pub memo: Option<String>
}Source line: 3605.
transaction::SetTokenPolicyData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetTokenPolicyData {
pub token_id: String,
pub supply_policy: Option<SupplyPolicy>,
pub transfer_policy: Option<ControlPolicy>
}Source line: 3613.
transaction::CreateNftCollectionData
Data for creating a new NFT collection.
#[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<String>
}Source line: 3625.
transaction::MintNftData
Data for minting a new NFT into a collection.
#[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<String>,
/// Optional BLAKE3 hash of the canonical metadata document.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub metadata_hash: Option<crate::hash::SigilHash>,
/// 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<bool>,
/// 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<crate::nft::BurnAuth>,
/// Identity binding — required when minting into an identity collection.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub identity: Option<crate::nft::IdentityBinding>
}Source line: 3647.
transaction::TransferNftData
Data for transferring an NFT between owners.
#[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
Data for burning (destroying) an NFT.
#[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
Data for updating the metadata URI and/or hash of an NFT (ERC-4906).
#[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<String>,
/// New metadata hash, or `None` to leave unchanged.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub metadata_hash: Option<crate::hash::SigilHash>
}Source line: 3711.
transaction::VerifyIdentityNftData
Data for advancing the verification level on an identity NFT.
#[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<String>
}Source line: 3730.
transaction::ContractKind
Agent contract kind. Identifies the role a deployed contract plays in an Organization Zone.
#[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
#[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<String>,
/// Optional BLAKE3 hash of the source artifact or source bundle.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source_hash: Option<SigilHash>,
/// Optional audit report URI.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub audit_uri: Option<String>,
/// Deterministic JSON metadata. Must not contain environment-derived data.
#[serde(default)]
pub metadata: serde_json::Value
}Source line: 3772.
transaction::RegisterContractCodeData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegisterContractCodeData {
/// BLAKE3/Sigil hash of `code`.
pub code_hash: SigilHash,
/// WASM bytecode bytes.
pub code: Vec<u8>,
/// License/source/audit metadata persisted alongside the code hash.
pub license_metadata: ContractLicenseMetadata
}Source line: 3790.
transaction::DeployContractData
#[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<String>,
/// 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<String>,
/// 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<ControlPolicy>,
/// 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<Vec<String>>,
/// Contract kind tag (used by indexer/RPC). Defaults to `Standalone`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub contract_kind: Option<ContractKind>,
/// Opt-in flag required before a contract can be targeted by Vigils.
#[serde(default)]
pub accepts_vigil_callbacks: bool
}Source line: 3800.
transaction::CallContractData
#[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<String>,
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<String>,
/// Declared state reads for deterministic optimistic execution.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub read_set: Vec<StateAccess>,
/// Declared state writes for deterministic optimistic execution.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub write_set: Vec<StateAccess>
}Source line: 3833.
transaction::UpgradeContractData
#[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<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub new_model_commitment: Option<SigilHash>
}Source line: 3852.
transaction::SetContractPolicyData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetContractPolicyData {
pub contract_did: String,
pub upgrade_policy: Option<ControlPolicy>,
pub call_policy: Option<ControlPolicy>,
/// 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<Vec<String>>,
/// Optional update to the Vigils callback opt-in flag.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub accepts_vigil_callbacks: Option<bool>
}Source line: 3866.
transaction::RegisterAppAgentData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegisterAppAgentData {
pub app_did: String,
pub controller_did: String,
pub public_keys: Vec<String>,
pub requested_permissions: Vec<Permission>,
pub allowed_contracts: Vec<String>,
pub allowed_token_ids: Vec<String>,
pub revenue_account: Option<String>,
pub metadata_uri: Option<String>
}Source line: 3881.
transaction::GrantAppPermissionData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GrantAppPermissionData {
pub app_did: String,
pub permissions: Vec<Permission>,
pub expires_at_epoch: Option<u64>
}Source line: 3893.
transaction::RevokeAppPermissionData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RevokeAppPermissionData {
pub app_did: String,
pub permissions: Vec<Permission>
}Source line: 3900.
transaction::UpgradeAppAgentData
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UpgradeAppAgentData {
pub app_did: String,
pub metadata_uri: Option<String>,
pub requested_permissions: Option<Vec<Permission>>,
pub allowed_contracts: Option<Vec<String>>,
pub allowed_token_ids: Option<Vec<String>>
}Source line: 3906.
transaction::ProposalType
Proposal types per spec.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ProposalType {
ParameterChange,
WasiModuleUpgrade,
TreasurySpend,
ValidatorSlashing,
EmergencyAction,
}Source line: 3920.
transaction::ProposalType::threshold_pct
Approval threshold for this proposal type.
pub fn threshold_pct(&self) -> u8;Source line: 3930.
transaction::GovernanceProposeData
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GovernanceVoteData {
pub proposal_id: String,
pub vote: VoteChoice
}Source line: 3951.
transaction::VoteChoice
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum VoteChoice {
Yes,
No,
Abstain,
NoWithVeto,
}Source line: 3957.
transaction::GovernanceExecuteData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GovernanceExecuteData {
pub proposal_id: String
}Source line: 3965.
transaction::GovernanceCancelData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct GovernanceCancelData {
pub proposal_id: String
}Source line: 3970.
transaction::GovernanceEmergencyData
#[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
#[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
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CommitStateData {
pub zone_id: String,
pub state_root: String,
pub state_changes: Vec<StateChange>
}Source line: 4005.
transaction::StateChange
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StateChange {
pub key: Vec<u8>,
pub value: Option<Vec<u8>>
}Source line: 4012.
transaction::CrossZoneMessageData
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct UpgradeModuleData {
pub zone_id: String,
pub new_module_hash: String
}Source line: 4025.
transaction::RegisterWasiValidatorData
#[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<TransactionCategory>
}Source line: 4031.
transaction::RemoveWasiValidatorData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RemoveWasiValidatorData {
pub name: String
}Source line: 4041.
transaction::ComputeProviderRegisterData
#[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<String>,
/// 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<String>,
/// Optional ARISE / dispatch endpoint URL (gRPC or HTTPS).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoint_url: Option<String>,
/// Verification tiers this provider declares support for (T1/T2/T3).
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub verification_tiers: Vec<ComputeVerificationTier>,
/// Free-form capability flags / hardware metadata (model families, GPU type, …).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub capabilities: Option<serde_json::Value>,
/// 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<Vec<u8>>
}Source line: 4051.
transaction::ComputePricing
#[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
#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ComputeProviderUpdateData {
pub provider_did: String,
pub pricing: Option<ComputePricing>,
pub supported_models: Option<Vec<String>>,
pub hardware_attestation: Option<serde_json::Value>,
/// Replace the dispatch endpoint URL.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endpoint_url: Option<String>,
/// Replace declared verification tiers.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub verification_tiers: Option<Vec<ComputeVerificationTier>>,
/// Replace capability metadata.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub capabilities: Option<serde_json::Value>,
/// Rotate the provider's signing pubkey.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub provider_pubkey: Option<Vec<u8>>
}Source line: 4092.
transaction::ComputeProviderRelayerData
#[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
#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ComputeProviderExitData {
pub provider_did: String
}Source line: 4120.
transaction::ComputeEscrowFundData
#[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<String>,
/// Optional budget cap (micro-MINT); enforced per-mandate or per-agent.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub budget_limit: Option<u64>
}Source line: 4126.
transaction::ComputeEscrowWithdrawData
#[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<String>
}Source line: 4141.
transaction::ComputeReceiptSettleData
#[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
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.
#[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
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).
#[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<SigilHash>,
/// Optional commitment to executed code (script / binary digest).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub code_commitment: Option<SigilHash>,
/// Optional commitment to the model used (weights digest / model ID hash).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub model_commitment: Option<SigilHash>,
/// Optional commitment to the agent's tool-call trace.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tool_trace_commitment: Option<SigilHash>
}Source line: 4186.
transaction::TeeAttestation
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 againstnow_epochand policymax_attestation_age_epochsfor 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.
#[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<u8>,
/// Optional certificate chain for the attestation.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub cert_chain: Vec<Vec<u8>>,
/// 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<u64>,
/// 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<String>
}Source line: 4227.
transaction::LumenTopKSample
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.
#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct LumenTopKSample {
pub token_index: u32,
pub quantized_topk: Vec<i64>
}Source line: 4257.
transaction::LumenAttestation
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.
#[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<LumenTopKSample>,
pub polynomial_digest: SigilHash,
pub provider_pubkey: Vec<u8>,
pub provider_signature: Vec<u8>
}Source line: 4269.
transaction::ComputeReceipt
On-chain compute receipt. Replaces the previous shallow form with proof-of-compute commitments and MACA-grade fields.
#[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<String>,
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<String>,
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<TeeAttestation>,
/// Optional Lumen attestation (required when `verification_tier == T15Lumen`).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lumen_attestation: Option<LumenAttestation>,
/// Optional ACT / lineage authority context (JSON envelope).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub authority_context: Option<serde_json::Value>,
/// 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<String>,
/// BLAKE3 hash over all receipt fields except the signature itself.
pub receipt_hash: SigilHash,
/// Ed25519 signature over `receipt_hash`.
pub receipt_signature: Vec<u8>,
/// 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<Vec<u8>>,
/// 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<u32>,
/// Optional DAO context.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub dao_did: Option<String>,
/// Optional mandate id.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub mandate_id: Option<String>
}Source line: 4290.
transaction::ComputeReceipt::compute_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.
#[cfg(feature = "compute")]
pub fn compute_receipt_hash(&self) -> SigilHash;Source line: 4356.
transaction::ComputeReceipt::verify_hash
Returns true when the stored hash matches a recomputed hash.
#[cfg(feature = "compute")]
pub fn verify_hash(&self) -> bool;Source line: 4425.
transaction::ComputeChallengeData
#[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<u64>
}Source line: 4432.
transaction::ComputeChallengeResolveData
#[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<ChallengeRewardShares>
}Source line: 4443.
transaction::ChallengeRewardShares
#[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
Resolution outcome for a compute challenge. Replaces the earlier 2-variant enum with the resolution outcomes the design requires.
#[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
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).
#[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<SigilHash>,
/// 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<u8>,
pub validator_pubkey: Vec<u8>
}Source line: 4497.
transaction::ValidatorRole
#[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
#[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
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.
#[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<SigilHash>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub shard_root: Option<SigilHash>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub merkle_proof: Vec<u8>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub challenge_nonce: Vec<u8>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub challenge_response: Vec<u8>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage_duration_epochs: Option<u64>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub retrieval_proof: Vec<u8>
}Source line: 4550.
transaction::MacaEpochState
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.
#[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
Outcome of a MACA quorum proof — what the validator quorum agreed on
for a single MacaWorkClaim.
#[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
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.
#[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<String>,
/// Ed25519 verifying key the agent uses to sign attestations or
/// epoch / beacon submissions.
pub agent_pubkey: Vec<u8>,
/// Free-form capability metadata (model families, hardware, etc.).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub capabilities: Option<serde_json::Value>
}Source line: 4616.
transaction::MacaPublishBeaconData
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.
#[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<u8>
}Source line: 4636.
transaction::MacaProposeEpochData
A proposer rolls open MacaWorkClaims into a new epoch.
#[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<SigilHash>,
/// 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<SigilHash>,
/// Ed25519 signature over the canonical epoch hash.
pub proposer_signature: Vec<u8>
}Source line: 4648.
transaction::MacaSubmitAttestationData
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.
#[cfg(feature = "compute")]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MacaSubmitAttestationData {
pub epoch_id: u64,
pub attestation: AgentVerificationAttestation
}Source line: 4675.
transaction::MacaFinalizeEpochData
Finalize an open MACA epoch: aggregate per-work attestations into
MacaQuorumProof records and seal the epoch.
#[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<u32>
}Source line: 4684.
transaction::TowerRegisterValidatorData
Register a new validator on the Tower coordination chain.
#[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<String>,
/// Ed25519 public key for Tower consensus signing.
pub consensus_public_key: Vec<u8>
}Source line: 4697.
transaction::TowerUpdateValidatorData
Update Tower validator metadata (region, key rotation, etc.).
#[cfg(feature = "tower")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TowerUpdateValidatorData {
pub validator_did: String,
pub geographic_region: Option<String>,
pub consensus_public_key: Option<Vec<u8>>
}Source line: 4715.
transaction::TowerExitValidatorData
Exit as a Tower validator (begins unbonding/cooldown).
#[cfg(feature = "tower")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TowerExitValidatorData {
pub validator_did: String
}Source line: 4724.
transaction::TowerSubmitEvidenceData
Submit slashing evidence to the Tower Committee for adjudication.
#[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<u8>)>
}Source line: 4731.
transaction::TowerFinalityVoteData
Cast a Casper FFG finality vote.
#[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<u8>
}Source line: 4748.
transaction::TowerDelegateStakeData
Delegate stake to a Tower validator.
#[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
Claim Tower-specific validator rewards.
#[cfg(feature = "tower")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TowerClaimRewardsData {
pub from_epoch: Option<u64>,
pub to_epoch: Option<u64>
}Source line: 4770.
transaction::CzacChannelOpenData
Open a CZAC cross-zone communication channel on-consensus.
#[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
Close a CZAC channel cooperatively.
#[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<u8>
}Source line: 4802.
transaction::CzacChannelSettleData
Settle a closed CZAC channel on-consensus.
#[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
Dispute a CZAC payment channel by submitting a newer balance proof.
#[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<Vec<u8>>
}Source line: 4827.
transaction::GalAnchorEntryData
Anchor a new entry in the Global Anchor Layer (MARS-S sharding).
#[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<String>
}Source line: 4848.
transaction::GalUpdateEntryData
Update an existing GAL entry.
#[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
Revoke a GAL entry (marks as revoked in the Global Anchor Layer).
#[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
Assign an entry to a specific shard in the MARS-S topology.
#[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
Update the shard topology map on-consensus.
#[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
Claim a land parcel in the Nova metaverse.
#[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
Transfer a Nova land parcel to a new owner.
#[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
Deploy a building on a Nova parcel.
#[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
Remove a building from a Nova parcel.
#[cfg(feature = "nova")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct NovaRemoveBuildingData {
pub building_id: String
}Source line: 4949.
transaction::NovaUpdateAvatarData
Update avatar state in the Nova world.
#[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
Create a new Nova world instance.
#[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
Open a seller-owned Nova land auction.
#[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
Place a bid on a Nova land auction.
#[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
Settle a closed Nova land auction.
#[cfg(feature = "nova")]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct NovaSettleAuctionData {
pub auction_id: String
}Source line: 5003.
transaction::NovaSetZonePermissionsData
Set permissions on a Nova spatial zone.
#[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
#[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<TreasuryRef>,
pub default_token_id: Option<String>,
pub hiring_policy: HiringPolicy,
pub metadata_commitment: Option<String>
}Source line: 5025.
transaction::UpdateDaoPolicyData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct UpdateDaoPolicyData {
pub dao_did: String,
pub new_controller_policy: Option<ControlPolicy>,
pub new_governance_policy: Option<GovernancePolicy>,
pub new_hiring_policy: Option<HiringPolicy>,
pub reason: Option<String>
}Source line: 5036.
transaction::IssueMandateData
#[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<DistributionPolicy>,
pub delegation_policy: DelegationPolicy,
pub expires_at_epoch: Option<u64>
}Source line: 5049.
transaction::UpdateMandateData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct UpdateMandateData {
pub mandate_id: String,
pub new_budget_total: Option<u128>,
pub new_scope: Option<MandateScope>,
pub new_spend_limits: Option<SpendLimits>,
pub new_expires_at_epoch: Option<u64>,
pub new_allowed_counterparties: Option<AllowedCounterparties>,
pub reason: Option<String>
}Source line: 5069.
transaction::RevokeMandateData
#[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<u64>
}Source line: 5080.
transaction::RecordMandateSpendData
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct PostLaborJobData {
pub job_id: String,
pub poster_did: String,
pub posting_mandate_id: Option<String>,
pub title_commitment: String,
pub description_commitment: String,
pub category: String,
pub required_skills: Vec<String>,
pub required_attestations: Vec<String>,
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<u64>
}Source line: 5101.
transaction::CancelLaborJobData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CancelLaborJobData {
pub job_id: String,
pub reason: String
}Source line: 5119.
transaction::SubmitLaborBidData
#[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<String>,
pub capabilities_proof_commitment: String
}Source line: 5125.
transaction::WithdrawLaborBidData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WithdrawLaborBidData {
pub bid_id: String,
pub reason: Option<String>
}Source line: 5138.
transaction::AcceptLaborBidData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct AcceptLaborBidData {
pub bid_id: String,
pub job_id: String,
pub accepting_mandate_id: Option<String>
}Source line: 5144.
transaction::CreateLaborContractData
#[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<String>,
pub worker_mandate_id: Option<String>,
pub token_id: String,
pub total_amount: u128,
pub escrow_account_did: String,
pub milestones: Vec<Milestone>,
pub milestone_policy: MilestonePolicy,
pub attestation_policy: AttestationPolicy,
pub dispute_policy: DisputePolicy,
pub reputation_impact: ReputationImpactPolicy,
pub revenue_share: Option<DistributionPolicy>,
pub royalty_recipients: Vec<RoyaltyRecipient>
}Source line: 5151.
transaction::FundLaborEscrowData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct FundLaborEscrowData {
pub contract_id: String,
pub funding_treasury_did: String,
pub funding_mandate_id: Option<String>,
pub amount: u128
}Source line: 5172.
transaction::LaborOpenOfferData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct LaborOpenOfferData {
pub offer_id: String,
pub sponsor_did: String,
pub posting_mandate_id: Option<String>,
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
#[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<String>,
pub requested_payout: u128
}Source line: 5202.
transaction::LaborAttestClaimData
#[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<String>,
/// 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<LumenAttestation>
}Source line: 5212.
transaction::LaborCancelOfferData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct LaborCancelOfferData {
pub offer_id: String,
pub sponsor_did: String,
pub reason: Option<String>
}Source line: 5230.
transaction::SubmitDeliverableData
#[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
#[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<String>
}Source line: 5246.
transaction::ReleaseMilestonePaymentData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ReleaseMilestonePaymentData {
pub contract_id: String,
pub milestone_index: u32,
pub releasing_mandate_id: Option<String>
}Source line: 5257.
transaction::RaiseLaborDisputeData
#[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<String>
}Source line: 5264.
transaction::ResolveLaborDisputeData
#[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<String>
}Source line: 5273.
transaction::SubmitLaborReviewData
#[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
#[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
#[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
#[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<String>,
#[serde(default)]
pub authorized_publishers: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deadline_epoch: Option<u64>
}Source line: 5314.
transaction::TrainRolloutBatchMetadataData
#[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
#[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
#[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<u32>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lineage_parent_did: Option<String>
}Source line: 5353.
transaction::TrainRewardBatchAttestData
#[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<TrainRewardPayoutData>,
pub artifact: ArtifactCommitment,
pub attested_at_epoch: u64
}Source line: 5363.
transaction::TrainWeightsPublishData
#[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<SigilHash>,
pub publisher_did: String,
pub published_at_epoch: u64,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub rollout_batch_id: Option<String>
}Source line: 5376.
transaction::TrainSlashReason
#[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
#[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
#[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
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TrainCloseData {
pub run_id: String,
pub reason: TrainCloseReason
}Source line: 5420.