pub fn create_unsigned_public_policy_op(
        &mut self,
        owner: PublicKey,
        permissions: BTreeMap<User, PublicPermissions>,
    ) -> Result<PolicyWriteOp<PublicPolicy>> {
        self.check_permission(Action::Admin, None, None)?;

        match &mut self.data {
            SeqData::Public(data) => {
                data.create_policy_op(PublicPolicy { owner, permissions }, self.operations_pk)
            }
            SeqData::Private(_) => Err(Error::InvalidOperation),
        }
    }
/// Sets the new policy for Public Sequence.
Sets the new policy for Public Sequence.
Sets the new policy for Public Sequence .
pub fn create_unsigned_public_policy_op(
        &mut self,
        owner: PublicKey,
        permissions: BTreeMap<User, PublicPermissions>,
    ) -> Result<PolicyWriteOp<PublicPolicy>> {
        self.check_permission(Action::Admin, None, None)?;
        match &mut self.data {
            SeqData::Public(data) => {
                data.create_policy_op(PublicPolicy { owner, permissions }, self.operations_pk)
            }
            SeqData::Private(_) => Err(Error::InvalidOperation),
        }
    }
pub fn create_unsigned_public_policy_op ( & mut self , owner : PublicKey , permissions : BTreeMap < User , PublicPermissions > , ) -> Result < PolicyWriteOp < PublicPolicy > > { self . check_permission ( Action :: Admin , None , None ) ? ; match & mut self . data { SeqData :: Public ( data ) => { data . create_policy_op ( PublicPolicy { owner , permissions } , self . operations_pk ) } SeqData :: Private ( _ ) => Err ( Error :: InvalidOperation ) , } }
Sets the new policy for Public Sequence.
Sets the new policy for Public Sequence .
&mut self
owner
PublicKey
permissions
BTreeMap<User, PublicPermissions>
&mut self
owner
PublicKey
permissions
BTreeMap<User, PublicPermissions>