[−][src]Trait lnpbp::rgb::contract::nodes::Node
Trait which is implemented by all node types (see NodeType
)
Required methods
fn node_type(&self) -> NodeType
Returns type of the node (see NodeType
). Unfortunately, this can't
be just a const, since it will break our ability to convert concrete
Node
types into &dyn Node
(entities implementing traits with const
definitions can't be made into objects)
fn node_id(&self) -> NodeId
Returns NodeId
, which is a hash of this node commitment
serialization
fn contract_id(&self) -> Option<ContractId>
Returns Option::Some
(
ContractId
)
, which is a hash of
genesis.
- For genesis node, this hash is byte-equal to
NodeId
(however displayed in a reverse manner, to introduce semantical distinction) - For extension node function returns id of the genesis, to which this node commits to
- For state transition function returns
Option::None
, since they do not keep this information; it must be deduced through state transition graph
fn transition_type(&self) -> Option<TransitionType>
Returns Option::Some
(
TransitionType
)
for transitions or
Option::None
for genesis and extension node types
fn extension_type(&self) -> Option<ExtensionType>
Returns Option::Some
(
ExtensionType
)
for extension nodes or
Option::None
for genesis and trate transitions
fn metadata(&self) -> &Metadata
fn parent_owned_rights(&self) -> &ParentOwnedRights
fn parent_public_rights(&self) -> &ParentPublicRights
fn owned_rights(&self) -> &OwnedRights
fn owned_rights_mut(&mut self) -> &mut OwnedRights
fn public_rights(&self) -> &PublicRights
fn public_rights_mut(&mut self) -> &mut PublicRights
fn script(&self) -> &SimplicityScript
Provided methods
fn field_types(&self) -> Vec<FieldType>ⓘ
fn owned_right_types(&self) -> BTreeSet<OwnedRightType>
fn owned_rights_by_type(&self, t: OwnedRightType) -> Option<&Assignments>
fn all_seal_definitions(&self) -> Vec<Confidential>ⓘ
fn known_seal_definitions(&self) -> Vec<Revealed>ⓘ
fn known_seal_definitions_by_type(
&self,
assignment_type: OwnedRightType
) -> Vec<Revealed>ⓘ
&self,
assignment_type: OwnedRightType
) -> Vec<Revealed>ⓘ