Type Alias massa_models::operation::SecureShareOperation
source · pub type SecureShareOperation = SecureShare<Operation, OperationId>;
Expand description
signed operation
Aliased Type§
struct SecureShareOperation {
pub content: Operation,
pub serialized_data: Vec<u8>,
pub signature: Signature,
pub content_creator_pub_key: PublicKey,
pub content_creator_address: Address,
pub id: OperationId,
}
Fields§
§content: Operation
Reference contents. Not required for the security protocols.
Use the Lightweight equivalent structures when you need verifiable serialized data, but do not need to read the values directly (such as when sending)
serialized_data: Vec<u8>
Content in sharable, deserializable form. Is used in the secure verification protocols.
signature: Signature
A cryptographically generated value using serialized_data
and a public key.
content_creator_pub_key: PublicKey
The public-key component used in the generation of the signature
content_creator_address: Address
Derived from the same public key used to generate the signature
id: OperationId
A secure hash of the data. See also massa_hash::Hash
Implementations§
sourcepub fn get_validity_range(
&self,
operation_validity_period: u64,
) -> RangeInclusive<u64>
pub fn get_validity_range( &self, operation_validity_period: u64, ) -> RangeInclusive<u64>
get the range of periods during which an operation is valid
Range: (op.expire_period - cfg.operation_validity_period) -> op.expire_period
(included)
sourcepub fn get_gas_usage(
&self,
base_operation_gas_cost: u64,
sp_compilation_cost: u64,
) -> u64
pub fn get_gas_usage( &self, base_operation_gas_cost: u64, sp_compilation_cost: u64, ) -> u64
Get the maximum amount of gas used by the operation.
base_operation_gas_cost comes from the configuration and is the cost of a basic operation (BASE_OPERATION_GAS_COST)
sourcepub fn get_ledger_involved_addresses(&self) -> PreHashSet<Address>
pub fn get_ledger_involved_addresses(&self) -> PreHashSet<Address>
get the addresses that are involved in this operation from a ledger point of view
sourcepub fn get_max_spending(&self, roll_price: Amount) -> Amount
pub fn get_max_spending(&self, roll_price: Amount) -> Amount
Gets the maximal amount of coins that may be spent by this operation (incl. fee)
sourcepub fn get_roll_involved_addresses(
&self,
) -> Result<PreHashSet<Address>, ModelsError>
pub fn get_roll_involved_addresses( &self, ) -> Result<PreHashSet<Address>, ModelsError>
get the addresses that are involved in this operation from a rolls point of view