# Struct client::member::InvitePayload

> The canonical `InvitePayload`. Unsigned: after connecting, the welcome must show a descriptor deriving `community_id`, a delegation naming `host_id`, and a host proof — which `Invi

`zaun_community_protocol::client::member::InvitePayload` · Struct

```rust
pub struct InvitePayload { … }
```

The canonical `InvitePayload`. Unsigned: after connecting, the welcome must show a
descriptor deriving `community_id`, a delegation naming `host_id`, and a host proof —
which `InvitePayload::session_config` makes the session check.

`Debug` never shows the secret (`InviteSecret` is redacted); it is zeroized on drop.

## Fields

### `community_id: CommunityId`

The community.

### `host_id: HostId`

The host to connect to.

### `host_address: String`

The host's SimpleX contact address, ≤ 2 048 bytes.

### `invite_secret: InviteSecret`

The invitation secret.

### `expires_at: Option<u64>`

Expiry, ms; none = never.

### `protocol_min: u16`

Lowest protocol version of the community.

### `protocol_max: u16`

Highest protocol version of the community.

## Methods

### `parse`

```rust
pub fn parse(link: &str) -> Result<Self, LinkError>
```

Parses a link strictly: prefix, canonical base64url, canonical payload, no trailing
bytes. Decoded bytes are zeroized.

# Errors
`LinkError`, which never echoes the input.

### `to_link`

```rust
pub fn to_link(&self) -> Result<InviteLink, LinkError>
```

Formats the link. The intermediate bytes are zeroized; the returned link is redacted
in `Debug`.

# Errors
`LinkError::Field` for an empty or oversized address or a bad version range.

### `is_expired`

```rust
pub fn is_expired(&self, now_ms: u64) -> bool
```

Whether the invitation has expired at `now_ms`.

### `supports`

```rust
pub const fn supports(&self, ours: VersionRange) -> bool
```

Whether the community's version range overlaps `ours`.

### `session_config`

```rust
pub fn session_config(&self) -> SessionConfig
```

A session configuration that pins the link's host and community.

## Trait implementations

`Clone`, `Debug`, `Eq`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/client/member/link/struct.InvitePayload.html)
