hc_deepkey_types/
authorized_spec_change.rs1use crate::AuthoritySpec;
2use hdi::prelude::*;
3
4pub type Authorization = (u8, Signature);
5
6#[hdk_entry_helper]
7#[derive(Clone)]
8pub struct AuthorizedSpecChange {
9 pub new_spec: AuthoritySpec,
10 pub authorization_of_new_spec: Vec<Authorization>,
14}
15
16impl AuthorizedSpecChange {
17 pub fn new(new_spec: AuthoritySpec, authorization_of_new_spec: Vec<Authorization>) -> Self {
18 Self {
19 new_spec,
20 authorization_of_new_spec,
21 }
22 }
23 pub fn as_new_spec_ref(&self) -> &AuthoritySpec {
24 &self.new_spec
25 }
26 pub fn as_authorization_of_new_spec_ref(&self) -> &Vec<Authorization> {
27 &self.authorization_of_new_spec
28 }
29}