Skip to main content
The zap.encrypt helper lets you encrypt plaintext values before sending them on-chain. Inco Lightning JS currently supports three encrypted handle types:
  • handleTypes.euint256 — 256-bit unsigned integers.
  • handleTypes.ebool — booleans.
  • handleTypes.euint160 — Ethereum addresses (use BigInt to encode the address, effectively an eaddress).

Common setup

Encrypt an euint256

Encrypt an ebool

Encrypt an eaddress (aka euint160)

Addresses must be converted to a BigInt before encryption.
Each example returns a ciphertext HexString you can pass to your contract or store as a handle for later confidential computation. 👉 See also: How encrypted inputs are consumed on the contract side