public static class CompositeKey.Builder
A helper class for building a class CompositeKey.
class CompositeKeypublic Builder()
A helper class for building a class CompositeKey.
class CompositeKey@NotNull
public net.corda.core.crypto.CompositeKey.Builder addKey(@NotNull
java.security.PublicKey key,
int weight)
Adds a child class CompositeKey node. Specifying a weight for the child is optional and will default to 1.
class CompositeKey,
weight@NotNull
public net.corda.core.crypto.CompositeKey.Builder addKeys(@NotNull
java.security.PublicKey... keys)
@NotNull
public net.corda.core.crypto.CompositeKey.Builder addKeys(@NotNull
java.util.List<? extends java.security.PublicKey> keys)
@NotNull
public java.security.PublicKey build(@Nullable
java.lang.Integer threshold)
Builds the class CompositeKey. If threshold is not specified, it will default to
the total (aggregated) weight of the children, effectively generating an "N of N" requirement.
During process removes single keys wrapped in class CompositeKey and enforces ordering on child nodes.
threshold - specifies the minimum total weight required (in the simple case – the minimum number of childsignatures required) to satisfy the sub-tree rooted at this node.IllegalArgumentException - if the threshold value is invalid.IllegalStateException - if the composite key that would be generated from the current state of the builder
is invalid (for example it would contain no keys).class CompositeKey,
threshold,
class CompositeKey