corda / net.corda.core.crypto / CompositeKey / Builder / build

build

fun build(threshold: Int? = null): PublicKey

Builds the 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 CompositeKey and enforces ordering on child nodes.

Parameters

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.

Exceptions

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).