Operation

Trait Operation 

Source
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):

Required Methods§

Source

fn full_type(&self) -> OpFullType

Returns full contract operation type information

Source

fn id(&self) -> OpId

Returns OpId, which is a hash of this operation commitment serialization

Source

fn contract_id(&self) -> ContractId

Returns ContractId this operation belongs to.

Source

fn nonce(&self) -> u64

Returns nonce used in consensus ordering of state transitions

Source

fn metadata(&self) -> &Metadata

Returns metadata associated with the operation, if any.

Source

fn globals(&self) -> &GlobalState

Returns reference to a full set of metadata (in form of GlobalState wrapper structure) for the contract operation.

Source

fn assignments(&self) -> AssignmentsRef<'_>

Source

fn assignments_by_type( &self, t: AssignmentType, ) -> Option<TypedAssigns<BlindSeal<TxPtr>>>

Provided Methods§

Source

fn disclose(&self) -> OpDisclose

Provides summary about parts of the operation which are revealed.

Source

fn disclose_hash(&self) -> DiscloseHash

Implementors§