Skip to content

TypeScript client for the Distributed Aggregation Protocol

License

Notifications You must be signed in to change notification settings

divviup/divviup-ts

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Dec 3, 2024
Dec 23, 2024
Sep 15, 2023
Jun 8, 2023
Sep 13, 2022
Sep 30, 2022
Sep 15, 2023
Sep 15, 2023
Dec 9, 2022
Jun 8, 2023
May 18, 2022
Jun 27, 2024
Aug 1, 2024
Dec 26, 2024
Dec 26, 2024
Nov 19, 2024
May 5, 2023
May 5, 2023

Repository files navigation

DivviUp Typescript Client

Coverage Status CI

docs for main

Protocol Versions and Release Branches

The main branch is under continuous development and will usually be partway between DAP and VDAF drafts. divviup-ts uses stable release branches to maintain implementations of different draft versions. Artifacts for some draft version are published from a corresponding release/dap-draft-xy branch. Only supported release branches receive dependency updates and backports.

DAP

Package version Git branch Protocol version Conforms to specification? Status
N/A release-dap-draft-02 draft-ietf-ppm-dap-02 Yes Unmaintained
N/A release-dap-draft-03 draft-ietf-ppm-dap-03 Yes Unmaintained as of May 22, 2023
@divviup/dap@0.1 release-dap-draft-04 draft-ietf-ppm-dap-04 Yes Unmaintained as of June 24, 2024
@divviup/dap@0.7 release-dap-draft-07 draft-ietf-ppm-dap-07 Yes Unmaintained as of June 24, 2024
@divviup/dap@0.9 main draft-ietf-ppm-dap-09 Yes Supported

VDAF and Prio3

VDAF Package Prio3 Package Git branch Protocol version Conforms to specification? Status
N/A N/A release/dap-draft-03 draft-irtf-cfrg-vdaf-03 Yes Unmaintained as of May 22, 2023
@divviup/vdaf@0.1 @divviup/prio3@0.1 release/dap-draft-04 draft-irtf-cfrg-vdaf-05 Yes Unmaintained as of June 24, 2024
@divviup/vdaf@0.7 @divviup/prio3@0.7 release/dap-draft-07 draft-irtf-cfrg-vdaf-07 Yes Unmaintained as of June 24, 2024
@divviup/vdaf@0.8 @divviup/prio3@0.8 main draft-irtf-cfrg-vdaf-08 Yes Supported

Bundling into an npm application

$ npm add @divviup/dap
import Task from "@divviup/dap";

const task = new Task({
  type: "sum",
  bits: 8,
  id: "3XTBHxTtUAtI516GeXZsVIKjBPYVNIYmF94vEBb4jcY",
  leader: "https://dap.api.divviup.org",
  helper: "https://dap.example.com",
  timePrecisionSeconds: 3600,
});

await task.sendMeasurement(42);

CDN URLs

DivviUp publishes bundled and minified builds suitable for use from a script tag. Task will be available on globalThis as divviup.dap.Task.

<script
    src="https://cdn.jsdelivr.net/npm/@divviup/dap@0.7.0/dist/browser.js"
    crossorigin="anonymous"
    integrity="sha384-vDbUcIcXsbrWLhKwkF/wwM0cnW+5y9fiPA695EnPd58okNZwWuLsR0NF98zzyNkT">
</script>
<script
    src="https://unpkg.com/@divviup/dap@0.7.0/dist/browser.js"
    crossorigin="anonymous"
    integrity="sha384-vDbUcIcXsbrWLhKwkF/wwM0cnW+5y9fiPA695EnPd58okNZwWuLsR0NF98zzyNkT">
</script>