# Struct signed::HostDelegation

> The root key's authorisation of one host to operate the community.

`zaun_community_protocol::signed::HostDelegation` · Struct

```rust
pub struct HostDelegation { … }
```

The root key's authorisation of one host to operate the community.

## Fields

### `community_id: CommunityId`

2: the community.

### `host_id: HostId`

3: MUST equal the derivation from `host_public_key`.

### `host_public_key: PublicKey`

4: the host key.

### `host_addresses: Vec<String>`

5: 1–4 SimpleX contact addresses of the host, each ≤ 2 048 bytes.

### `scopes: Scopes`

6: scopes.

### `epoch: u64`

7: ≥ 1.

### `not_before: u64`

8: ms.

### `expires_at: Option<u64>`

9: ms; none = until replaced or revoked.

### `issued_at: u64`

10: ms.

## Methods

### `grants`

```rust
pub fn grants(&self, required: Scopes) -> bool
```

Whether the delegation grants every scope in `required` (unknown bits never count).

## Trait implementations

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

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