corda / net.corda.node.utilities / ServiceIdentityGenerator / generateToDisk

# generateToDisk

`fun generateToDisk(dirs: List<Path>, serviceId: String, serviceName: String, threshold: Int = 1): Unit`

Generates signing key pairs and a common distributed service identity for a set of nodes. The key pairs and the group identity get serialized to disk in the corresponding node directories. This method should be called before any of the nodes are started.

### Parameters

`dirs` - List of node directories to place the generated identity and key pairs in.

`serviceId` - The service id of the distributed service.

`serviceName` - The legal name of the distributed service.

`threshold` - The threshold for the generated group CompositeKey.Node.