class ApiUtils
Utility functions to reduce boilerplate when developing HTTP APIs
<init> |
ApiUtils(rpc: CordaRPCOps)
Utility functions to reduce boilerplate when developing HTTP APIs |
rpc |
val rpc: CordaRPCOps |
withParty |
fun withParty(partyKeyStr: String, notFound: (String) -> Response = defaultNotFound, found: (Party) -> Response): Response
Get a party and then execute the passed function with the party public key as a parameter. Usage: withParty(key) { doSomethingWith(it) } |