TypeScript PoD SDK (CotiPodCrypto, PodContract)
Encrypt and decrypt data (CotiPodCrypto)
import { CotiPodCrypto, DataType } from "@coti-io/pod-sdk";
// Encrypt plaintext for Solidity itUint256 parameters
const enc = await CotiPodCrypto.encrypt("42", "testnet", DataType.itUint256);
// Decrypt scalar ciphertext read from contract storage
const plain = CotiPodCrypto.decrypt("0x...", accountAesKeyFromOnboarding, DataType.Uint64);Gas estimation and method calls (PodContract)
Important fee config rules
Choosing encryptAndCallMethod vs callMethod
See also
PreviousTutorials: building PoD dApps on AvalancheNextCookbook: private investor allocations with PoD
Last updated
Was this helpful?