// Setix COSR — public settlement-unit value types // // Package: setix.cosr.v1 // Source: canonical-truth SOURCE, authored in the main repo; mirrored // byte-identical to setix.{com,ai,dev}/proto/cosr.proto by the // Architect sync wave; asserted by canonical-truth-probe.sh. // Per architecture/39 §39.2/§39.3 + ADR-2026-0251 (amended ADR-2026-0265). // // COSR = Coin of Setix Reserve, the THREAD settlement unit. // // WHAT THIS IS: public value-unit + settlement-amount type shapes — the same // public surface as the settlement fields of /schemas/thread/v1.json. // // WHAT THIS IS NOT: the COSR issuance/reserve machinery. Those internals are // NOT part of the public type surface and are intentionally // omitted (E14 / ADR-2026-0236 G10). Field numbers are local // protobuf ordinals, not protocol wire tags. // // DENOMINATION: amounts are micro-COSR — decimal uint64 strings (JS-safe), per // the public JSON convention. 1 COSR = 1,000,000 µCOSR. syntax = "proto3"; package setix.cosr.v1; // A COSR amount, in micro-COSR (decimal uint64 string). message CosrAmount { string micro = 1; // decimal uint64 string of micro-COSR (e.g. "5000" = 0.005 COSR) } // The outcome of a settlement. // // proto3 reserves enum value 0 as the default. The protocol's own outcome codes // are 0 = accepted, 1 = rejected (see Settlement.outcome in proto/thread.proto and // /schemas/thread/v1.json); the enum members below are LOCAL ordinals, offset so // that 0 remains the proto3 unspecified default. Do not put these ordinals on the wire. enum SettlementOutcome { SETTLEMENT_OUTCOME_UNSPECIFIED = 0; // proto3 default; not a valid protocol outcome SETTLEMENT_OUTCOME_ACCEPTED = 1; // protocol outcome 0 — release escrow to the seller SETTLEMENT_OUTCOME_REJECTED = 2; // protocol outcome 1 — refund escrow to the buyer } // The escrow movement at settlement. Mirrors the public settlement amounts of // /schemas/thread/v1.json. message SettlementAmounts { CosrAmount released = 1; // on accepted: agreed_price - fee CosrAmount refunded = 2; // on rejected: agreed_price CosrAmount fee = 3; // platform fee = agreed_price * fee_bps / 10000; query the live fee via the thread.get_fee_schedule tool // Invariant: released.micro + refunded.micro <= agreed_price. }