mirror of
https://github.com/corda/corda.git
synced 2025-03-22 03:55:26 +00:00
Add RPC operation for resolving well known identity
This commit is contained in:
parent
9103b3b962
commit
fdb63b7611
@ -241,6 +241,15 @@ interface CordaRPCOps : RPCOps {
|
||||
|
||||
// TODO These need rethinking. Instead of these direct calls we should have a way of replicating a subset of
|
||||
// the node's state locally and query that directly.
|
||||
/**
|
||||
* Returns the well known identity from an abstract party. This is intended to resolve the well known identity
|
||||
* from a confidential identity, however it transparently handles returning the well known identity back if
|
||||
* a well known identity is passed in.
|
||||
*
|
||||
* @param party identity to determine well known identity for.
|
||||
* @return well known identity, if found.
|
||||
*/
|
||||
fun partyFromAnonymous(party: AbstractParty): Party?
|
||||
/**
|
||||
* Returns the [Party] corresponding to the given key, if found.
|
||||
*/
|
||||
|
@ -109,10 +109,12 @@ interface IdentityService {
|
||||
fun partyFromX500Name(principal: X500Name): Party?
|
||||
|
||||
/**
|
||||
* Resolve the well known identity of a party. If the party passed in is already a well known identity
|
||||
* (i.e. a [Party]) this returns it as-is.
|
||||
* Returns the well known identity from an abstract party. This is intended to resolve the well known identity
|
||||
* from a confidential identity, however it transparently handles returning the well known identity back if
|
||||
* a well known identity is passed in.
|
||||
*
|
||||
* @return the well known identity, or null if unknown.
|
||||
* @param party identity to determine well known identity for.
|
||||
* @return well known identity, if found.
|
||||
*/
|
||||
fun partyFromAnonymous(party: AbstractParty): Party?
|
||||
|
||||
|
@ -149,6 +149,7 @@ class CordaRPCOpsImpl(
|
||||
override fun deauthoriseContractUpgrade(state: StateAndRef<*>) = services.vaultService.deauthoriseContractUpgrade(state)
|
||||
override fun currentNodeTime(): Instant = Instant.now(services.clock)
|
||||
override fun waitUntilRegisteredWithNetworkMap() = services.networkMapCache.mapServiceRegistered
|
||||
override fun partyFromAnonymous(party: AbstractParty): Party? = services.identityService.partyFromAnonymous(party)
|
||||
override fun partyFromKey(key: PublicKey) = services.identityService.partyFromKey(key)
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated("Use partyFromX500Name instead")
|
||||
|
Loading…
x
Reference in New Issue
Block a user