pub trait Operation {
// Required methods
fn full_type(&self) -> OpFullType;
fn id(&self) -> OpId;
fn contract_id(&self) -> ContractId;
fn nonce(&self) -> u64;
fn metadata(&self) -> &Metadata;
fn globals(&self) -> &GlobalState;
fn assignments(&self) -> AssignmentsRef<'_>;
fn assignments_by_type(
&self,
t: AssignmentType,
) -> Option<TypedAssigns<BlindSeal<TxPtr>>>;
// Provided methods
fn disclose(&self) -> OpDisclose { ... }
fn disclose_hash(&self) -> DiscloseHash { ... }
}Expand description
RGB contract operation API, defined as trait
Implemented by all contract operation types (see OpFullType):
- Genesis (
Genesis) - State transitions (
Transition)
Required Methods§
Sourcefn full_type(&self) -> OpFullType
fn full_type(&self) -> OpFullType
Returns full contract operation type information
Sourcefn contract_id(&self) -> ContractId
fn contract_id(&self) -> ContractId
Returns ContractId this operation belongs to.
Sourcefn globals(&self) -> &GlobalState
fn globals(&self) -> &GlobalState
Returns reference to a full set of metadata (in form of GlobalState
wrapper structure) for the contract operation.
fn assignments(&self) -> AssignmentsRef<'_>
fn assignments_by_type( &self, t: AssignmentType, ) -> Option<TypedAssigns<BlindSeal<TxPtr>>>
Provided Methods§
Sourcefn disclose(&self) -> OpDisclose
fn disclose(&self) -> OpDisclose
Provides summary about parts of the operation which are revealed.