# Function client::owner::publish_body

> Signs `descriptor` with `root` (its current root key) and builds the `community.descriptor.publish` body. A given `delegation` is referenced by the descriptor (epoch and hash) and 

`zaun_community_protocol::client::owner::publish_body` · Function

```rust
pub fn publish_body(descriptor: CommunityDescriptor, root: &SecretKey, delegation: Option<&Signed<HostDelegation>>, icon: Option<Vec<u8>>) -> Result<(Signed<CommunityDescriptor>, DescriptorPublish), BuildError>
```

Signs `descriptor` with `root` (its current root key) and builds the
`community.descriptor.publish` body. A given `delegation` is referenced by the descriptor
(epoch and hash) and sent; a given `icon` sets the descriptor's icon hash and is sent.

# Errors
`BuildError::WrongRootKey`, field rule, signing or body (icon size) errors.

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/client/owner/revise/fn.publish_body.html)
