For developers: mapping concepts to the SDK
Last updated
Was this helpful?
This page is the bridge from Architecture and main components to the canonical PoD SDK documentation on GitHub. It repeats a few facts on purpose so engineers can verify mental models quickly.
For a guided first implementation, read Tutorials: building Privacy on Avalanche (PoD) dApps to pick the integration model, then follow Tutorial: private Adder on Avalanche Fuji for a primitive-only Solidity + TypeScript walkthrough (Avalanche Fuji presets).
The upstream docs recommend:
Then deep dives:
Contract references: Data types, Patterns and checklist, Request builder and remote calls, Fees, gas, and oracle
Inbox
IInbox.sol and cross-domain flow in the domain model diagram.
Callback guard
InboxUser.sol (onlyInbox) — see Features.
PodLib
PodLib.sol and width-specific libraries (PodLib64, PodLib128, PodLib256).
PodUser / presets
PodUser.sol, network mixins such as PodUserFuji.sol.
Types (it*, ct*, gt*)
MpcCore.sol and Data types.
Custom COTI calls
MpcAbiCodec.sol and the custom mode section of Writing privacy contracts.
Client crypto
coti-pod-crypto.ts via CotiPodCrypto (TypeScript integration).
Derived from the SDK’s Writing privacy contracts and Async execution:
Classify data — public metadata vs it* inputs vs ct* outputs vs internal gt* (COTI-only).
Pick integration mode — PodLib helpers vs custom MpcAbiCodec + COTI contract.
Model async state — persist requestId, track pending/completed/failed.
Harden callbacks — onlyInbox, correct abi.decode tuple, validate peer context when applicable.
Configure routing safely — gated configure / configureCoti / inbox updates.
Budget fees — understand msg.value and callbackFeeLocalWei; use Inbox fee views where available (Fees doc).
Test failure paths — spoofed callback must revert, error callbacks must mark failures, decrypt integration must match widths.
If you build directly on COTI V2 with precompiles and private types, start from Build on COTI. PoD adds the Inbox-mediated cross-chain angle; many cryptographic ideas rhyme, but deployment and UX differ.
TypeScript: @coti-io/pod-sdk
Solidity: @coti-io/coti-contracts (PodLib, PodUserFuji, …) — the npm SDK does not ship contract sources
Use contract MyApp is PodLib, PodUserFuji with imports from @coti-io/coti-contracts/contracts/pod/mpc/....
Last updated
Was this helpful?
Was this helpful?
npm install @coti-io/pod-sdk ethers
npm install github:coti-io/coti-contracts#main