# Struct signed::SignedRootRotation

> A rotation with both signatures, unverified (verify with `super::verify_chain`).

`zaun_community_protocol::signed::SignedRootRotation` · Struct

```rust
pub struct SignedRootRotation { … }
```

A rotation with both signatures, unverified (verify with `super::verify_chain`).

JSON: `{bytes, sig_old, sig_new}`; canonical: `bytes ‖ sig_old ‖ sig_new`, each as `bytes`.

## Fields

### `bytes: Vec<u8>`

Canonical bytes of the `RootRotation`.

### `sig_old: Signature`

Signature by `old_root`.

### `sig_new: Signature`

Signature by `new_root`.

## Methods

### `sign`

```rust
pub fn sign(rotation: &RootRotation, old: &SecretKey, new: &SecretKey) -> Result<Self, SignedError>
```

Encodes `rotation` once and signs it (hedged) with the retiring key `old` and the new
key `new`, proving possession of both.

# Errors
`SignedError` when the rotation does not encode or signing fails.

### `sign_deterministic`

```rust
pub fn sign_deterministic(rotation: &RootRotation, old: &SecretKey, new: &SecretKey) -> Result<Self, SignedError>
```

As `Self::sign`, deterministically. **Golden test vectors only.**

# Errors
`SignedError` when the rotation does not encode or signing fails.

## Trait implementations

`Clone`, `Debug`, `Decode`, `Deserialize<'de>`, `Encode`, `Eq`, `PartialEq`, `Serialize`, `StructuralPartialEq`

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