lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commerce.v1.json (5561B)


      1 {
      2   "schema": "radroots.commerce.codec.v1",
      3   "contract_version": 1,
      4   "state": "closed_canonical_data_codec_contract",
      5   "feature": "commerce",
      6   "profile": "radroots.commerce",
      7   "profile_version": 1,
      8   "carrier_kind": 8890,
      9   "content_max_utf8_bytes": 16384,
     10   "json_max_depth": 16,
     11   "header_required_fields": [
     12     "profile",
     13     "version",
     14     "type",
     15     "record_id",
     16     "thread_id",
     17     "order_id",
     18     "author",
     19     "buyer",
     20     "seller",
     21     "created_at",
     22     "author_sequence",
     23     "author_previous",
     24     "parents",
     25     "payload"
     26   ],
     27   "payload_required_fields": {
     28     "quote": [
     29       "terms",
     30       "expires_at",
     31       "in_reply_to"
     32     ],
     33     "request": [
     34       "terms",
     35       "expires_at",
     36       "quote"
     37     ],
     38     "decline": [
     39       "request",
     40       "reason"
     41     ],
     42     "terms_proposed": [
     43       "base_agreement",
     44       "terms",
     45       "expires_at",
     46       "reason"
     47     ],
     48     "terms_authorized": [
     49       "proposal",
     50       "terms_digest",
     51       "expires_at"
     52     ],
     53     "terms_rejected": [
     54       "proposal",
     55       "reason"
     56     ],
     57     "agreement_committed": [
     58       "base_agreement",
     59       "authorization",
     60       "terms_digest",
     61       "authority",
     62       "seller_sequence"
     63     ],
     64     "withdrawal_requested": [
     65       "authorization",
     66       "reason"
     67     ],
     68     "withdrawal_acknowledged": [
     69       "withdrawal",
     70       "seller_sequence"
     71     ],
     72     "cancellation_proposed": [
     73       "agreement",
     74       "residual",
     75       "reason",
     76       "expires_at"
     77     ],
     78     "cancellation_authorized": [
     79       "proposal",
     80       "expires_at"
     81     ],
     82     "residual_released": [
     83       "proposal",
     84       "authorization",
     85       "agreement",
     86       "residual",
     87       "authority",
     88       "seller_sequence"
     89     ],
     90     "ready": [
     91       "agreement",
     92       "fulfillment_group",
     93       "lines",
     94       "window"
     95     ],
     96     "handover": [
     97       "agreement",
     98       "fulfillment_group",
     99       "lines",
    100       "measurements",
    101       "occurred_at",
    102       "authority",
    103       "seller_sequence"
    104     ],
    105     "receipt": [
    106       "handover",
    107       "lines",
    108       "supersedes",
    109       "occurred_at",
    110       "note"
    111     ],
    112     "issue": [
    113       "code",
    114       "description",
    115       "lines",
    116       "source_records"
    117     ],
    118     "resolution_proposed": [
    119       "agreement",
    120       "resolution",
    121       "expires_at"
    122     ],
    123     "resolution_authorized": [
    124       "proposal",
    125       "expires_at"
    126     ],
    127     "resolution_committed": [
    128       "proposal",
    129       "authorization",
    130       "authority",
    131       "seller_sequence"
    132     ]
    133   },
    134   "canonicalization": "RFC8785 subset over complete closed data; ASCII schema keys, exact scalar strings, safe unsigned numeric schema fields, unchanged Unicode and semantic array order.",
    135   "record_id": {
    136     "algorithm": "SHA-256",
    137     "domain_utf8_with_terminal_nul": "radroots.record.v1\u0000",
    138     "preimage": "domain || canonical complete content excluding record_id",
    139     "is_rumor_or_envelope_id": false
    140   },
    141   "decoding": {
    142     "objects_only": true,
    143     "duplicate_unknown_and_missing_fields_rejected": true,
    144     "nullable_fields_must_be_present": true,
    145     "max_parents": 8,
    146     "profile_identified_before_known_payload_interpretation": true,
    147     "unknown_profile_version_or_type": "UnsupportedProfile; caller retains bounded original protected bytes.",
    148     "value_validation": "Every header, complete family payload and CommerceContent constructor executes; this checks self-contained claims, not authenticated history or installed state.",
    149     "empty_tagged_snapshots": "quote_required price, unknown supply and unspecified contents use closed empty wire arms; extra fields are rejected."
    150   },
    151   "retention": {
    152     "count_complete_header_id_and_payload_before_private_allocation": true,
    153     "preimage_and_final_wire_zeroizing": true,
    154     "drop_hash_preimage_before_final_output_allocation": true,
    155     "automatic_private_serialize_or_clone": false,
    156     "caller_owns_original_private_bytes": true,
    157     "private_payload_in_temporary_json_trees": false,
    158     "public_snapshot_exception": "Only explicitly public listing product/option/revision snapshots use temporary JSON trees.",
    159     "retained_bytes": "EncodedRecord fixed object plus retained private buffer capacity; caller domain input and enclosing rumor/seal/wrap allocations are separate."
    160   },
    161   "carrier_matching": {
    162     "fields": [
    163       "kind",
    164       "author",
    165       "created_at"
    166     ],
    167     "exact": true,
    168     "is_signature_or_recipient_verification": false,
    169     "creates_authenticated_capability": false
    170   },
    171   "independent_vectors": {
    172     "path": "crates/protocol/tests/fixtures/commerce_wire.v1.json",
    173     "sha256": "0d0342f2de38a7f5b31f9d650d91940a3423b0e10a80eec923fdeb1e7b8aac07",
    174     "producer_path": "crates/protocol/tests/support/commerce_wire_oracle.mjs",
    175     "producer_sha256": "f375040af69b78bee5176c04fc8f134dba0af63c90b3b6f8328a05a50576bf03",
    176     "source_terms_fixture": "crates/protocol/tests/fixtures/terms_wire.v1.json",
    177     "source_terms_fixture_sha256": "f9a73f25cdb590d5e2edb1a960f449fa0d4dc85959369616d88f776ef0a5e0c7",
    178     "scope": "39 independently produced complete record byte/hash vectors for all19 families, nullable/previous/line-and-measurement-order/unit/issue alternatives and exact16KiB, plus valid-shape16385-byte rejection."
    179   },
    180   "limits": {
    181     "structured_rumor_authoring_enabled": false,
    182     "authenticated_ingress_implemented": false,
    183     "nested_crypto_or_recipient_binding_qualified": false,
    184     "consent_stock_history_or_physical_truth_established": false,
    185     "complete_rumor_seal_wrap_cost_included": false,
    186     "runtime_clock_entropy_signer_network_or_storage_allowed": false
    187   }
    188 }