Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Corda + Ktor - connecting to the node
fun connectToNode(
host: String = System.getProperty("config.rpc.host"),
rpcPort: Int = System.getProperty("config.rpc.port").toInt(),
username: String = System.getProperty("config.rpc.username"),
password: String = System.getProperty("config.rpc.password")
): CordaRPCConnection {
val rpcAddress = NetworkHostAndPort(host, rpcPort)
val rpcClient = CordaRPCClient(rpcAddress)
return rpcClient.start(username, password)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.