p2panda_auth/extension.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3//! Extension arguments required for constructing groups `GroupsOperation`.
4use p2panda_core::{Hash, VerifyingKey};
5#[cfg(any(test, feature = "serde"))]
6use serde::{Deserialize, Serialize};
7
8use crate::group::GroupAction;
9
10/// Additional arguments which can be attached to a p2panda operation in their extensions.
11#[derive(Clone, Debug, PartialEq, Eq)]
12#[cfg_attr(any(test, feature = "serde"), derive(Deserialize, Serialize))]
13pub struct GroupsExtensionArgs<C = ()> {
14 pub group_id: VerifyingKey,
15 pub action: GroupAction<VerifyingKey, C>,
16 pub dependencies: Vec<Hash>,
17}