Background
Users want to book expert time slots in advance (e.g., "meet tomorrow at 3 PM"). Currently the contract only supports live on-demand sessions.
Goal
Implement a reserve_session(expert, token, rate_per_second, scheduled_start, duration_cap) function that locks funds in escrow until the scheduled time.
Acceptance Criteria
- New
SessionStatus::Reserved state.
- Session auto-activates when
ledger_time >= scheduled_start.
- Seeker can cancel before
scheduled_start - 1 hour for a full refund.
- Late cancellation forfeits a configurable
cancellation_fee_bps.
Key Files
contracts/src/lib.rs, contracts/src/scheduling.rs
Background
Users want to book expert time slots in advance (e.g., "meet tomorrow at 3 PM"). Currently the contract only supports live on-demand sessions.
Goal
Implement a
reserve_session(expert, token, rate_per_second, scheduled_start, duration_cap)function that locks funds in escrow until the scheduled time.Acceptance Criteria
SessionStatus::Reservedstate.ledger_time >= scheduled_start.scheduled_start - 1 hourfor a full refund.cancellation_fee_bps.Key Files
contracts/src/lib.rs,contracts/src/scheduling.rs