# Struct signed::HostSessionProof

> The host's proof of key possession in `session.welcome`. Signed by the host key.

`zaun_community_protocol::signed::HostSessionProof` · Struct

```rust
pub struct HostSessionProof { … }
```

The host's proof of key possession in `session.welcome`. Signed by the host key.

## Fields

### `host_id: HostId`

2: the host.

### `client_nonce: Nonce`

3: from `session.hello`.

### `host_challenge: Challenge`

4: the challenge sent in this welcome.

### `community_id: Option<CommunityId>`

5: the bound or requested community.

### `delegation_epoch: Option<u64>`

6: the epoch the host operates under for field 5.

### `issued_at: u64`

7: ms since the epoch.

## Methods

### `verify_for_client`

```rust
pub fn verify_for_client(signed: &SignedJson, host_public_key: &PublicKey, client_nonce: &Nonce, pair: Option<&ValidPair>) -> Result<Signed<Self>, SessionProofError>
```

The client's check: verifies under `host_public_key`, requires `host_id` to
derive from it and `client_nonce` to be the client's fresh nonce. When a community is
named, `pair` must be a (descriptor, delegation) pair already validated by
`super::validate_pair` for that community, delegating to this `host_id` under this
epoch; its `min_suite` then applies to the proof's signature.

# Errors
`SessionProofError` for a bad signature, encoding or mismatch.

## Trait implementations

`Clone`, `Debug`, `Decode`, `Encode`, `Eq`, `PartialEq`, `SignedObject`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/signed/session/struct.HostSessionProof.html)
