# Function signed::verify_chain

> Verifies a rotation chain from the genesis key: `genesis` must derive `community_id`; for rotation `i` (1-based, list order) `sig_old` verifies under `Kᵢ₋₁` **before** decoding, th

`zaun_community_protocol::signed::verify_chain` · Function

```rust
pub fn verify_chain(community_id: &CommunityId, genesis: &PublicKey, chain: &[SignedRootRotation]) -> Result<ChainHead, RotationError>
```

Verifies a rotation chain from the genesis key: `genesis` must derive
`community_id`; for rotation `i` (1-based, list order) `sig_old` verifies under `Kᵢ₋₁`
**before** decoding, then `community_id`, `rotation_seq = i`, `old_root = Kᵢ₋₁`,
`new_suite ≥` the previous suite and `sig_new` under `new_root` are checked.

# Errors
`RotationError` naming the first failing rotation.

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/signed/rotation/chain/fn.verify_chain.html)
