Background & current state
Multi-step user flows (e.g., register → credit → claim, or approve → spend) can require multiple signatures, hurting UX. Soroban auth entries can sometimes be composed so a user approves once. The frontend currently signs each step separately.
Goal
Compose multiple contract authorizations into a single user approval where the protocol allows, reducing signature prompts in multi-step flows.
Technical design
- Build a single transaction with multiple Soroban operations /
InvokeHostFunction auth entries, collect the required SorobanAuthorizationEntrys, and have the user sign them in one prompt via the wallet provider.
- Provide a helper in the SDK/frontend (
composeAuth(entries)); fall back to sequential signing where composition isn't valid.
Edge cases
- Operations requiring different signers → can't compose; fall back.
- Auth-entry expiry (
signatureExpirationLedger) → set sensibly; handle expiry mid-flow.
- Simulation needed per op to build correct auth → ensure ordering/nonce correctness.
- Partial failure within a composed tx → all-or-nothing semantics; communicate clearly.
Task breakdown
Acceptance criteria
Testing & verification
- E2E counting wallet prompts pre/post; unit tests for composition + expiry.
Out of scope
- Protocol changes; cross-wallet differences beyond the abstraction.
Dependencies / related
- Benefits all multi-step flows; relates to SDK (NEW-085).
References
- Soroban authorization framework; auth entries.
Difficulty: medium · Effort: M · dx
Background & current state
Multi-step user flows (e.g., register → credit → claim, or approve → spend) can require multiple signatures, hurting UX. Soroban auth entries can sometimes be composed so a user approves once. The frontend currently signs each step separately.
Goal
Compose multiple contract authorizations into a single user approval where the protocol allows, reducing signature prompts in multi-step flows.
Technical design
InvokeHostFunctionauth entries, collect the requiredSorobanAuthorizationEntrys, and have the user sign them in one prompt via the wallet provider.composeAuth(entries)); fall back to sequential signing where composition isn't valid.Edge cases
signatureExpirationLedger) → set sensibly; handle expiry mid-flow.Task breakdown
Acceptance criteria
Testing & verification
Out of scope
Dependencies / related
References
Difficulty: medium · Effort: M · dx