sip-protocol / sip-protocol/sipher
feat(scheduled-ops): durable-nonce family (scheduleSend + drip)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Background
Spec 5 PR-A. Sipher's `drip` and `scheduleSend` tools currently persist scheduled-op rows to SQLite but the COURIER crank can't broadcast them — the user signature isn't available when the op fires. Per the spec, the right primitive for time-bounded ops (hours to weeks) is a pre-signed durable-nonce flow: user signs once at create time, server stores the signed tx, broadcasts when due.
What to do
- `scheduled_ops` table — add columns: `signed_tx BLOB`, `nonce_account TEXT`, `op_kind TEXT` (`'awaiting_seal' | 'sealed' | 'pending' | ...`)
- `drip` / `scheduleSend` tool result — return `serializedTxs: string[]` + `nonceInitInstructions` for user to broadcast first, then sign all N chunks
- New endpoint `POST /api/scheduled-ops/:batchId/seal { signedTxs }` to persist signed txs
- COURIER executor — for `op_kind === 'sealed'`, read `signed_tx` and broadcast via `connection.sendRawTransaction`
- New tool `cancelScheduledOp(opId)` that withdraws the nonce account, invalidating remaining signed txs
Why
- Unblocks 4 of 6 scheduled tools
- User signs ONCE; server can broadcast indefinitely until nonce is consumed
- Tx is bytes-immutable post-sign — server can't tamper
Cost
~2-3 weeks (one PR). Sub-tasks:
- Nonce setup UX (user pays ~0.045 SOL for 30 nonce accounts in a 30-day drip)
- Encrypt-at-rest for signed-tx blobs in SQLite
- Cancellation path (nonce withdraw)
- Feature flag: `SIPHER_SCHEDULED_OPS_ENABLED=false` until devnet-verified
References
- Spec: `docs/superpowers/specs/2026-05-15-scheduled-op-broadcasts-design.md` (Family B section, lines ~84-163)
- Predecessor: #281
Acceptance
- drip(amount=10 SOL, days=7) produces 7 unsigned txs anchored to 7 nonce accounts
- User signs nonce init batch first, then signs 7 drip txs without broadcasting
- Server persists signed txs; COURIER broadcasts at scheduled times
- Cancellation drains nonce account → invalidates pending signed_tx
- Torque growth-hook fires per chunk with `sipher_recurring_send_tick` events
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the scheduled_ops schema, drip/scheduleSend tool results, the COURIER executor, and the design spec at docs/superpowers/specs/2026-05-15-scheduled-op-broadcasts-design.md, especially Family B. Trace the existing scheduled-operation flow before addressing sealing, cancellation, storage, and broadcasting. Done means the listed acceptance scenarios pass, including durable-nonce setup, scheduled broadcasts, cancellation, and recurring-send events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite, typescript
- Domain
- backend-api-design, blockchain, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100