The current flow for creating output notes from smart contracts at the TX kernel level is quite involved. You need to manually compute the recipient, construct metadata, create the note, and add assets in separate steps. This complexity propagates up to the Rust compiler level, where creating a simple P2ID output note requires a significant amount of boilerplate (see example from miden-bank).
It would be worth exploring ways to simplify this flow at the TX kernel level, not just for standard note types but for output note creation in general. As discussed with @PhilippGackstatter, the miden_protocol level should remain flexible and unopinionated, so higher-level abstractions could live in miden-standards or above. Potentially this could also be simplified at the compiler level.
This is low priority and can be addressed post-mainnet.
The current flow for creating output notes from smart contracts at the TX kernel level is quite involved. You need to manually compute the recipient, construct metadata, create the note, and add assets in separate steps. This complexity propagates up to the Rust compiler level, where creating a simple P2ID output note requires a significant amount of boilerplate (see example from miden-bank).
It would be worth exploring ways to simplify this flow at the TX kernel level, not just for standard note types but for output note creation in general. As discussed with @PhilippGackstatter, the
miden_protocollevel should remain flexible and unopinionated, so higher-level abstractions could live inmiden-standardsor above. Potentially this could also be simplified at the compiler level.This is low priority and can be addressed post-mainnet.