arise-sigil · settlement
Source declarations, signatures and documentation for settlement.
Source: sigil/node/../arise-bridge/arise-sigil/src/settlement.rs. SHA-256: 39256086a4976385550306bf9b6aed8a74e90c967766bae2bb38092d1e7cc79b.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
settlement::SettlementAction
Describes the on-chain settlement for a single compute receipt.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SettlementAction {
/// The compute receipt being settled.
pub receipt: ComputeReceipt,
/// Amount to debit from the consumer's escrow.
pub escrow_debit: u64,
/// Amount to credit to the provider's account.
pub provider_credit: u64,
/// The receipt hash to anchor on-chain.
pub receipt_anchor_hash: SigilHash
}Source line: 15.
settlement::create_settlement
Constructs a settlement action from a verified compute receipt.
The function verifies the receipt hash and provider signature, then builds a settlement that debits the consumer's escrow and credits the provider.
pub fn create_settlement(
receipt: &ComputeReceipt,
provider_public_key: &[u8; 32],
) -> Result<SettlementAction, AriseError>;Source line: 30.