class Node : CompositeKey
Represents a node in the key tree. It maintains a list of child nodes – sub-trees, and associated weights carried by child node signatures.
The threshold specifies the minimum total weight required (in the simple case – the minimum number of child signatures required) to satisfy the sub-tree rooted at this node.
<init> |
Node(threshold: Int, children: List<CompositeKey>, weights: List<Int>)
Represents a node in the key tree. It maintains a list of child nodes – sub-trees, and associated weights carried by child node signatures. |
children |
val children: List<CompositeKey> |
keys |
val keys: Set<PublicKey>
Returns all PublicKeys contained within the tree leaves |
threshold |
val threshold: Int |
weights |
val weights: List<Int> |
singleKey |
val singleKey: PublicKey
Returns the enclosed PublicKey for a CompositeKey with a single leaf node |
equals |
fun equals(other: Any?): Boolean |
hashCode |
fun hashCode(): Int |
isFulfilledBy |
fun isFulfilledBy(keys: Iterable<PublicKey>): Boolean
Checks whether keys match a sufficient amount of leaf nodes |
toString |
fun toString(): String |
containsAny |
fun containsAny(otherKeys: Iterable<PublicKey>): Boolean
Checks whether any of the given keys matches a leaf on the tree |
isFulfilledBy |
fun isFulfilledBy(key: PublicKey): Boolean |
toBase58String |
fun toBase58String(): String
This is generated by serializing the composite key with Kryo, and encoding the resulting bytes in base58. A custom serialization format is being used. |