penumbra_custody::policy

Trait Policy

Source
pub trait Policy {
    // Required methods
    fn check_transaction(&self, request: &AuthorizeRequest) -> Result<()>;
    fn check_validator_definition(
        &self,
        _request: &AuthorizeValidatorDefinitionRequest,
    ) -> Result<()>;
    fn check_validator_vote(
        &self,
        _request: &AuthorizeValidatorVoteRequest,
    ) -> Result<()>;
}
Expand description

A trait for checking whether a transaction plan is allowed by a policy.

Required Methods§

Source

fn check_transaction(&self, request: &AuthorizeRequest) -> Result<()>

Checks whether the proposed transaction plan is allowed by this policy.

Source

fn check_validator_definition( &self, _request: &AuthorizeValidatorDefinitionRequest, ) -> Result<()>

Checks whether the proposed validator definition is allowed by this policy.

Source

fn check_validator_vote( &self, _request: &AuthorizeValidatorVoteRequest, ) -> Result<()>

Checks whether the proposed validator vote is allowed by this policy.

Implementors§