> For the complete documentation index, see [llms.txt](https://fortress-labs.gitbook.io/snakepath/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fortress-labs.gitbook.io/snakepath/private-gateway/private-computation-contract.md).

# Private Computation Contract

The private computation contract is a CosmWasm smart contract running on Secret Network. It implements the following interface:

### Init Message:

```rust
/// Include parameters to link this contract with the Private Gateway
pub struct State {
    pub gateway_address: HumanAddr,
    pub gateway_hash: String,
    pub gateway_key: Binary,
}
```

### Handle Message:

```rust
/// See Private Gateway docs for PrivContractHandleMsg definition.
pub enum HandleMsg {
    Input { message: PrivContractHandleMsg },
}
```

### Handle Response:

```rust
/// Define a struct for each handle message response. Example:
pub struct ScoreResponse {
    pub name: String,
    pub result: String,
}
```

### Data Structs:

```rust
/// Define a struct for whatever parameters the contract needs. Example:
pub struct Input {
    /// User Ethereum address.
    pub address: String,
    /// User name (optional).
    pub name: Option<String>,
    /// Arbitary data (per use case).
    pub field_1: u32,
    pub field_2: u32,
    pub field_3: u32,
}
```
