SDK for building privacy dApps on EVM with COTI Privacy on Demand (PoD): async Inbox messaging patterns and TypeScript crypto helpers.
From npm (when published):
npm install @coti/pod-sdkFrom GitHub:
npm install github:cotitech-io/coti-pod-sdkGitHub installs build from source via the prepare script. npm installs use the
prebuilt dist output published in the package tarball.
Validate the npm package locally:
npm run ci:verify
npm run publish:dry-runPublish flow:
-
Bump the version with one of:
npm version patch # 0.1.0 -> 0.1.1 for fixes/small changes npm version minor # 0.1.0 -> 0.2.0 for backwards-compatible features npm version major # 0.1.0 -> 1.0.0 for breaking changes
This updates
package.jsonandpackage-lock.json, creates a git commit, and creates a matching tag such asv0.1.1. -
Merge the version commit to
main, then push the generated tag, for examplegit push && git push --tags. -
The
Publish npm packageGitHub Action publishes the matchingv*.*.*tag to npm only if the tagged commit is onmain.
To test the publish workflow without publishing, run Publish npm package manually
from GitHub Actions and keep dry_run enabled.
The repository must have an NPM_TOKEN secret with permission to publish
@coti/pod-sdk.
Production documentation lives in /docs:
/docs/README.md(documentation index)/docs/01-privacy-decentralized-apps-on-any-evm-chain-with-coti-pod.md/docs/02-showcase.md/docs/03-features.md/docs/04-getting-started.md/docs/05-writing-privacy-contracts-on-ethereum.md/docs/05a-async-execution.md/docs/05b-multi-party-computing-library-mpclib.md/docs/05c-examples-with-description.md/docs/06-typescript-integration-ux-development.md/docs/06a-coti-typescript-sdk.md/docs/06b-encrypt-decrypt.md/docs/06c-onboarding-account-account-aes-key.md/docs/contracts/01-it-ct-gt-data-types.md/docs/contracts/02-contract-patterns-and-checklist.md/docs/contracts/03-request-builder-and-remote-calls.md
MkDocs setup lives in /docs:
- Config:
/docs/mkdocs.yml - GitBook navigation:
/docs/SUMMARY.md - Dependencies:
/docs/requirements.txt - Commands:
/docs/Makefile(make install,make serve,make build)
From repo root:
npm run docs:installnpm run docs:servenpm run docs:build
Docs CI/CD:
- Pull requests and pushes to
mainbuild the docs with MkDocs. - Pushes to
mainthat change/docsrunPublish docs to GitBook. - Manual
Publish docs to GitBookruns default todry_run, which builds docs without pushing. Non-dry-run docs publishing must run frommain. - To publish to GitBook, configure GitBook Git Sync to a repository/branch, then
set
GITBOOK_SYNC_REPOSITORY(for examplecotitech-io/coti-pod-sdk-gitbook), optionalGITBOOK_SYNC_BRANCH(defaults tomain), and aGITBOOK_SYNC_TOKENsecret with write access to that repository.
0.1.0