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

Builder

class Builder

A helper class for building a CompositeKey.

Constructors

<init>

Builder()

A helper class for building a CompositeKey.

Functions

addKey

fun addKey(key: PublicKey, weight: Int = 1): Builder

Adds a child CompositeKey node. Specifying a weight for the child is optional and will default to 1.

addKeys

fun addKeys(vararg keys: PublicKey): Builder
fun addKeys(keys: List<PublicKey>): Builder

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.