Event types
Trust levels
Each event carries a describing how the data was attested. See Trust levels for the concept overview.Currency and value units
currency is a first-class parameter on submitEvent / submit_event. Revenue events take a 3-10 char uppercase alphanumeric code (USD, HKD, JPY, …); activity events must pass "". The SDK applies a smart default when omitted on single-event submits (revenue → "USD", activity → ""); batchSubmitEvents / batch_submit_events requires it explicitly.
value is an ISO 4217 minor-unit integer:
The pipeline converts
value to USD cents using the FX rate at timestamp. The converted amount surfaces on GET /machine/{did} as usd_value (USD cents integer) on revenue events when data_visibility is onchain. amount_status distinguishes "ok", "unsupported_currency" (currency not in the FX whitelist), and "fx_unavailable" (degraded FX feed). Non-"ok" rows score conservatively and surface mcr_degraded: true on GET /mcr/{did}.
Activity events ignore the FX path entirely. They don’t accumulate revenue.
Validation
CallvalidateSubmitEventParams before submitting. It throws ValidationError on the first invalid field.
Validation rules
The contract additionally rejects
metadata larger than 4096 bytes with a MetadataTooLarge . The SDK validators don’t enforce this client-side, so oversized payloads surface as a failure (RuntimeError/RpcError with code: "MetadataTooLarge") rather than ValidationError.
Computing the data hash
The EventRegistry stores a of the raw data, not the data itself. Compute it withcomputeDataHash (JS) or compute_data_hash (Python).
dataHash field in the on-chain MachineEvent struct. Consumers who need to verify the original data compare its keccak256 against the stored hash.
Submitting a revenue event (type 0)
Submitting an activity event (type 1)
Activity events record operational telemetry with no direct revenue value.Cross-chain revenue pattern
When a machine earns revenue on another (e.g., ), reference the source transaction for on-chain verifiable trust (level 1).Supported chain IDs
Operational limits
The SDK enforces per-transaction value caps and rate limits before submitting.
Set limits to
0 to disable (the default).
Error handling
submitEvent / submit_event raise four distinct error types. Validation and limit errors are local; RuntimeError (JS) / RpcError (Python) wraps every chain or RPC failure. JS collapses chain and HTTP errors into a single RuntimeError; Python keeps them separate (RpcError for chain, ApiError for HTTP).
RuntimeError (JS) and RpcError/ApiError (Python).
Next steps
- Events concept for deeper coverage of event types and trust levels
- SDK reference for full method signatures

