Skip to content

Commit

Permalink
feat: Also expose via and command in Payload
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Mar 27, 2024
1 parent 6c926e5 commit 2602110
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ impl<DID: Did, V: varsig::Header<C>, C: Codec> Delegation<DID, V, C> {
&self.payload.audience
}

/// Retrieve the `via` of a [`Delegation`]
pub fn via(&self) -> &Option<DID> {
&self.payload.via
}

/// Retrieve the `command` of a [`Delegation`]
pub fn command(&self) -> &String {
&self.payload.command
}

/// Retrive the `policy` of a [`Delegation`]
pub fn policy(&self) -> &Vec<Predicate> {
&self.payload.policy
Expand Down

0 comments on commit 2602110

Please sign in to comment.