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

Builder

class Builder

A helper class for building a CompositeKey.

Constructors

<init>

A helper class for building a CompositeKey.

Builder()

Functions

addKey

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

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

addKeys

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

build

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.

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