# Kalypso <-> Zkbob ![Screenshot 2024-05-17 at 2.25.34 PM](https://hackmd.io/_uploads/H1Cnx3V70.png) ## Setup and Integration with Kalypso 1. Alice generates an encrypted request and sends it to the Proxy. This request is encrypted using the asymmetric key of the matching engine. The corresponding private key exists only within the Matching Engine Enclave. This can be programmatically verified through attestation and the Kalypso smart contract. 2. Alice then forwards this encrypted request to the Proxy. 3. The Proxy forwards the request to the Kalypso Server. The Kalypso Server connects with all relevant enclaves to verify whether the request is provable. If it is provable, the request is placed on-chain; otherwise, the Proxy is alerted that the request is not provable, and the request is avoided. 4. The Proxy then sends the proof and public data back to the prover. 5. The rest of the flow remains the same as before. ## Kalypso Server **Kalypso Server** exposes the endpoint `POST /proveEncryptedTx`, allowing the **Proxy** to place requests on Kalypso Contracts using the encrypted information sent by ***Alice***. #### Gas Key **Kalypso Server** should be provided with gas key which will be used to place requests on behalf of ***Alice***. #### POST /proveEncryptedTx Payload ``` interface PublicAndSecretInputPair { marketId : number | HexString publicInputs: Buffer | HexString; encryptedSecret: Buffer | HexString; acl: Buffer | HexString; } ```