Configures libp2p to use the given identity (private key).
static Option identity(KeyPair keyPair) { return (config) => config.withIdentity(keyPair); }