Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/aleph-types/src/message/base_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ impl Message {
pub fn confirmed(&self) -> bool {
!self.confirmations.is_empty()
}

/// Returns the address of the sender of the message. Note that the sender is not necessarily
/// the owner of the resources, as the owner may have delegated their authority to create
/// specific resources through the permission system.
pub fn sender(&self) -> &Address {
&self.sender
}

/// Returns the address of the owner of the resources.
pub fn owner(&self) -> &Address {
&self.content.address
}
}

// Custom deserializer that uses message_type to efficiently deserialize content
Expand Down