TypeScript PoD SDK (CotiPodCrypto, PodContract)
Encrypt and decrypt data (CotiPodCrypto)
CotiPodCrypto)import { CotiPodCrypto, DataType } from "@coti/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)
PodContract)Important fee config rules
Choosing encryptAndCallMethod vs callMethod
encryptAndCallMethod vs callMethodSee also
Last updated
Was this helpful?