Skip to content

feat: add the bare-Canton vesting dApp (vesting-lite)#84

Draft
fernandomg wants to merge 6 commits into
mainfrom
feat/vesting-lite
Draft

feat: add the bare-Canton vesting dApp (vesting-lite)#84
fernandomg wants to merge 6 commits into
mainfrom
feat/vesting-lite

Conversation

@fernandomg

Copy link
Copy Markdown
Member

Summary

No related issue. Introduces the vesting dApp on bare Canton ("lite"): a vesting-lite
Daml package, a React 19 frontend that talks to a real ledger through the wallet-service
ledgerApi proxy via explicit disclosure, and a one-command dev stack. Replaces the
stampbook example.

This is the base of a stacked pairfeat/vesting-amulet targets this branch and adds
the Splice/Amulet evolution on top, so its PR diff is exactly the lite→amulet delta.

Note: this branch was cut from an older main; main has since advanced with unrelated
docs/CI work, so it will need a rebase before it can actually merge. The diff here (vs the
merge-base) is scoped to just the vesting changes.

Changes

  • Replace the quickstart-tally Daml package with vesting-lite (factory → proposal → contract;
    linear + milestone schedules; minGrantAmount; value-preserving cancel→residual)
  • Add the vesting-lite Daml test suite
  • Replace the stampbook example with a React 19 / react-router / zustand / Tailwind v4 vesting UI
    (direct-access party picker; explicit-disclosure create; live ACS reads)
  • wallet-service listAccounts returns the backend user's ledger CanActAs rights
  • One-command dev stack + npm workspace wiring

Acceptance criteria

  • Vesting lifecycle works on bare Canton via explicit disclosure
  • Frontend, Daml, and wallet-service suites green during development
  • dev-stack up boots + bootstraps the demo in one command

Test plan

Automated tests

  • Daml: cd dapp/daml/vesting-lite && dpm build then cd ../daml-test && dpm test
  • Frontend: cd dapp/frontend && npm test && npm run typecheck && npm run build && npm run lint
  • wallet-service: cd canton-barebones/wallet-service && npm test && npm run lint
  • Integration driver: PKG=<pkg> node scripts/vesting-lite-driver.mjs

Manual verification

Live browser flow on the bare-Canton stack: party pool from the wallet → create-via-disclosure
→ accept → live vesting → claim until claimable is 0.

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

Module Vesting + Schedule: linear/milestone schedules, a 1.0 CC floor, under a daml umbrella.
Happy path, residual/fully-claimed/sub-floor cancel, and schedule math; 9 scripts via daml:test.
Direct-access UI (Vite 6, React 19, react-router, zustand, Tailwind v4, Vitest) over a Wallet seam.

Parties via wallet.listParties, mutations via wallet.execute; ACS reads direct; exact claim.
Reads the backend user's CanActAs from the ledger; optional WALLET_SERVICE_ACCOUNTS_PREFIX filter.
dev-stack up folds in the guarded vesting bootstrap; node for DAR id; vesting-lite workspace.
Real stack (Vite, React 19, Tailwind v4, zustand, Vitest, Biome; direct-access) + vesting-lite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants