Feature description
Add explicit record type selection to audit trail creation so a trail can be created without an initial record while still preserving the fixed on-chain record payload type.
Motivation
Today the Rust SDK infers the trail record type from the initial record payload. That makes the initial record effectively required on the Rust side, even though the Move contract allows creating a trail with no initial record. An explicit record type would remove that mismatch and make empty-trail creation possible.
Requirements
- Allow callers to specify the trail record type explicitly during creation.
- Keep the initial record optional.
- If an initial record is provided, validate that its payload type matches the explicit record type.
- Preserve the current invariant that one trail has one fixed payload type for all records.
- Keep the Move and Rust APIs aligned for trail creation.
Open questions
Should the Rust API expose this as dedicated builders for text/bytes trails, a record type enum, or another typed creation helper?
Are you planning to do it yourself in a pull request?
Yes
Feature description
Add explicit record type selection to audit trail creation so a trail can be created without an initial record while still preserving the fixed on-chain record payload type.
Motivation
Today the Rust SDK infers the trail record type from the initial record payload. That makes the initial record effectively required on the Rust side, even though the Move contract allows creating a trail with no initial record. An explicit record type would remove that mismatch and make empty-trail creation possible.
Requirements
Open questions
Should the Rust API expose this as dedicated builders for text/bytes trails, a record type enum, or another typed creation helper?
Are you planning to do it yourself in a pull request?
Yes