- On-chain: Mark a value as decryptable with
FHE.allowPublic(ctHash) - Off-chain: Client calls
decryptForTx(ctHash)via the SDK to get{ plaintext, signature } - On-chain: Submit the result via
publishDecryptResultorverifyDecryptResult
Publishing Results
publishDecryptResult
Publishes a decrypted result on-chain by verifying the Threshold Network signature. The plaintext is stored and can be read viagetDecryptResultSafe.
Ciphertext handle
Decrypted value from
decryptForTxThreshold Network signature
publishDecryptResultBatch
Publishes multiple results in a single call. Typed overloads exist for all encrypted types.Verifying Results
verifyDecryptResult
Verifies a Threshold Network signature without storing the plaintext on-chain. Returnsbool.
verifyDecryptResultSafe
LikeverifyDecryptResult, but returns false instead of reverting on invalid signature.
verifyDecryptResultBatch
Verifies multiple signatures in a single call. Reverts if any is invalid.verifyDecryptResultBatchSafe
Returns abool[] indicating which entries are valid instead of reverting.