C# / .NET SDK for Canton Network #46 - Milestone 1: Open-Source Release & First Reference NuGets
Milestone 1: Open-Source Release & First Reference NuGets
- Estimated Delivery: 8 weeks from funding approval
- Focus: Open-source existing code, CI/CD, NuGet publishing, codegen MVP (any DAR → C# NuGet) on the new JVM-helper /
daml-lf-archivearchitecture (§2),dpm codegen-cscomponent publication, quickstart, and the first two Splice reference NuGets (Canton.Splice.Amulet,Canton.Splice.Wallet) as proof points that the pipeline produces a clean object model from real-world protocol DARs. Most of the runtime and API-client code already exists; the codegen toolchain itself is being migrated from the PoC's direct-LF-protobuf path to the JVM helper, and the milestone bundles that migration with the packaging and publishing work. The 8-week estimate (vs. the 6 weeks initially scoped) reflects that the codegen architecture migration todaml-lf-archiveis materially larger than the open-source-release work it ships alongside. - Deliverables / Value Metrics:
| Deliverable | Acceptance Criteria | |-------------|---------------------| | Repository published under Canton Foundation GitHub org (or approved location) | Public repo with Apache 2.0 license | | CI/CD pipeline (GitHub Actions) | Automated build, test, and NuGet publish on release tags. Automated codegen + publish triggered by Canton / Splice release tag. | | JVM codegen helper (daml-lf-archive integration) | Small JVM tool wrapping daml-lf-archive (entry point Decode.scala) that reads a .dar and emits the canonical Ast consumed by the C# codegen — see §2. Replaces the PoC's direct LF-protobuf parsing path so the SDK inherits per-LF-version decoders, package-hash computation, and DAR-level structure handling (Dar[Ast.Package]) from the upstream library (SCU compatibility itself is decided at daml build / participant upload — not at codegen). Runs in CI and locally; not a runtime dependency of generated NuGets or applications. | | Daml Codegen CLI (any DAR → C# NuGet) | Successfully generates a usable C# NuGet package from (a) a Splice/Amulet .dar, (b) a synthetic test .dar exercising the full LF type surface, and (c) a third-party / user-supplied .dar. Codegen CLI consumes the JVM helper's intermediate AST and emits C# via Roslyn. Documented end-to-end in the quickstart. | | dpm codegen-cs component publication | Codegen pipeline published as a dpm component, resolvable from any dpm project via components: { codegen-cs: { version: x.y.z } }. dpm codegen-cs --dar <path> invokes the M1 pipeline end-to-end. Coordination with the dpm maintainers confirmed. | | Codegen runtime library | NuGet package published; supports core Daml types (ContractId, Party, Timestamp, Optional, List, Map, Variant, Record) | | gRPC client foundation | Can connect to participant node, submit commands, and parse transaction results | | Authentication | OAuth2/JWT token injection working (already implemented, packaged for open-source release) | | First Splice reference NuGets | Canton.Splice.Amulet and Canton.Splice.Wallet published to public NuGet, version-aligned with current Canton mainnet release. A developer can run dotnet add package Canton.Splice.Wallet and call wallet operations against LocalNet without cloning the Splice repo. These packages double as proof points for the any-DAR codegen pipeline — see §3, Layer 2. | | Quickstart documentation + CLI smoke-test | README walkthrough that a developer can follow end-to-end, plus a small CLI smoke-test program demonstrating codegen + command submission + ACS query against LocalNet; architecture overview | | Ecosystem gate | At least 2 developers outside Peaceful Studio complete the quickstart, with at least one issue or PR opened on the SDK repo |
Verification: Tech & Ops committee or delegate confirms code compiles, tests pass, packages installable from NuGet (including the two Splice packages), and quickstart feedback collected.
| Milestone | Amount | Description | |-------------|---------------------|---------------------| | Milestone 1 - Open-Source Release & Core | 600,000 CC | Public repo, CI/CD across platforms, NuGet publishing, Codegen migration onto the daml-lf-archive JVM helper so we inherit per-LF-version decoding and package-hash handling from upstream.
_Originally posted by @pedrodneves in https://github.com/canton-foundation/canton-dev-fund/issues/46#issuecomment-4914201499_