Reference: data types (it/ct/gt)
Canonical Solidity source: MpcCore.sol in @coti-io/coti-contracts.
PoD uses three type families. Mixing them at the wrong boundary breaks signature validation, callback decode, or privacy guarantees. For plain-language definitions, see the Glossary.
Why the split exists
it*
User-submitted encrypted input plus signature material
ct*
Encrypted value stored on EVM and decrypted client-side with the account AES key
gt*
Private compute-domain value used on COTI
it* (input payload)
Valid on EVM entrypoints and in MpcAbiCodec payloads.
itBool
{ ctBool ciphertext; bytes signature; }
Signed encrypted bool input
itUint8 … itUint64
{ ctUint* ciphertext; bytes signature; }
Signed encrypted scalar input
itUint128
{ ctUint128 ciphertext; bytes[2] signature; }
Signed 128-bit input
itUint256
{ ctUint256 ciphertext; bytes[2][2] signature; }
Signed 256-bit input
itString
{ ctString ciphertext; bytes[] signature; }
Signed encrypted string
ct* (ciphertext output)
Valid in EVM storage, callback payloads, and read APIs.
ctBool … ctUint128
type ctUint* is uint256
single uint256 word (bigint or 0x hex)
ctUint256
struct { ctUint128 ciphertextHigh; ctUint128 ciphertextLow; }
{ ciphertextHigh, ciphertextLow } tuple
ctString
struct { ctUint64[] value; }
array of 64-bit cells
Note:
ctUint128is a user-defined value type wrapping oneuint256word — not a struct of two limbs. OnlyctUint256uses a two-limb struct.
gt* (private compute domain)
Valid only on COTI-side contracts and executor operations. Never expose gt* in EVM public interfaces.
gtBool … gtUint128
type gtUint* is uint256
gtUint256
struct { gtUint128 high; gtUint128 low; }
gtString
struct { gtUint64[] value; }
Conversion operations (MpcCore)
onBoard(ct*) → gt*— move ciphertext into compute domainoffBoard(gt*) → ct*— contract-held ciphertextoffBoardToUser(gt*, address) → ct*— user-targeted decryptable ciphertext
End-to-end boundary flow
Client builds
it*.EVM accepts
it*and sends a request through the Inbox.MpcAbiCodec.reEncodeWithGt(...)validates and convertsit*togt*argument shape.COTI logic computes on
gt*.COTI returns
ct*.EVM callback stores
ct*.Client decrypts
ct*with the account AES key.
Critical gotcha: EVM it* maps to COTI gt*
For custom COTI-side logic:
EVM function accepts
itUint64 amountCOTI function must be declared
gtUint64 amount
Declaring COTI parameters as it* for methods invoked through the Inbox pipeline will not match ABI expectations.
Required usage rules
EVM private inputs:
it*EVM private results:
ct*COTI private compute:
gt*Keep width consistent (
itUint64 → gtUint64 → ctUint64)Do not store plaintext sensitive values on EVM
Frequent mistakes
Wrong decrypt type or AES key for the stored
ct*widthMismatch between frontend
DataTypeand Solidity type widthDecoding callback tuple as the wrong
ct*typeSkipping
requestIdcorrelation in callback handlers
See also
TypeScript PoD SDK —
DataTypeenum andCotiPodCrypto
Last updated
Was this helpful?