net.corda.core.messaging

## Interface CordaRPCOps

- All Superinterfaces:
    RPCOps
  All Known Implementing Classes:
    CordaRPCOpsImpl

      public CordaRPCOps
      extends RPCOps

  RPC operations that the node exposes to clients using the Java client library. These can be called from client apps and are implemented by the node in the CordaRPCOpsImpl class.

  See Also:
    CordaRPCOpsImpl

- - ### Method Summary

    All Methods Instance Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addVaultTransactionNote(SecureHash txnId, java.lang.String txnNote)`
    `boolean` | `attachmentExists(SecureHash id)` Checks whether an attachment with the given hash is stored on the node.
    `void` | `authoriseContractUpgrade(StateAndRef<?> state, java.lang.Class<? extends net.corda.core.contracts.UpgradedContract<?,?>> upgradedContractClass)` Authorise a contract state upgrade. This will store the upgrade authorisation in the vault, and will be queried by ContractUpgradeFlow.Acceptor during contract upgrade process. Invoking this method indicate the node is willing to upgrade the state using the upgradedContractClass. This method will NOT initiate the upgrade process. To start the upgrade process, see ContractUpgradeFlow.Instigator.
    `java.time.Instant` | `currentNodeTime()` Returns the node's current time.
    `void` | `deauthoriseContractUpgrade(StateAndRef<?> state)` Authorise a contract state upgrade. This will remove the upgrade authorisation from the vault.
    `java.util.Map<java.util.Currency,net.corda.core.contracts.Amount>` | `getCashBalances()`
    `java.lang.Iterable<java.lang.String>` | `getVaultTransactionNotes(SecureHash txnId)`
    `kotlin.Pair<java.util.List,rx.Observable>` | `networkMapUpdates()` Returns all parties currently visible on the network with their advertised services and an observable of future updates to the network.
    `NodeInfo` | `nodeIdentity()` Returns Node's identity, assuming this will not change while the node is running.
    `java.io.InputStream` | `openAttachment(SecureHash id)` Download an attachment JAR by ID
    `Party` | `partyFromKey(CompositeKey key)` Returns the `class Party` corresponding to the given key, if found.
    `Party` | `partyFromName(java.lang.String name)` Returns the `class Party` with the given name as it's Party.name
    `<T> FlowHandle<T>` | `startFlowDynamic(java.lang.Class<? extends net.corda.core.flows.FlowLogic<? extends T>> logicType, java.lang.Object args)` Start the given flow with the given arguments, returning an Observable with a single observation of the result of running the flow.
    `kotlin.Pair<java.util.List,rx.Observable>` | `stateMachineRecordedTransactionMapping()` Returns a snapshot list of existing state machine id - recorded transaction hash mappings, and a stream of future such mappings as well.
    `kotlin.Pair<java.util.List,rx.Observable>` | `stateMachinesAndUpdates()` Returns a pair of currently in-progress state machine infos and an observable of future state machine adds/removes.
    `SecureHash` | `uploadAttachment(java.io.InputStream jar)` Uploads a jar to the node, returns it's hash.
    `java.lang.String` | `uploadFile(java.lang.String dataType, java.lang.String name, java.io.InputStream file)` Deprecated.
    `kotlin.Pair<java.util.List,rx.Observable>` | `vaultAndUpdates()` Returns a pair of head states in the vault and an observable of future updates to the vault.
    `kotlin.Pair<java.util.List,rx.Observable>` | `verifiedTransactions()` Returns a pair of all recorded transactions and an observable of future recorded ones.
    `com.google.common.util.concurrent.ListenableFuture<kotlin.Unit>` | `waitUntilRegisteredWithNetworkMap()` Returns a ListenableFuture which completes when the node has registered wih the network map service. It can also complete with an exception if it is unable to.

    - ### Methods inherited from interface net.corda.core.messaging.RPCOps

      `getProtocolVersion`

- - ### Method Detail

    - #### stateMachinesAndUpdates

          kotlin.Pair<java.util.List,rx.Observable> stateMachinesAndUpdates()

      Returns a pair of currently in-progress state machine infos and an observable of future state machine adds/removes.

    - #### vaultAndUpdates

          kotlin.Pair<java.util.List,rx.Observable> vaultAndUpdates()

      Returns a pair of head states in the vault and an observable of future updates to the vault.

    - #### verifiedTransactions

          kotlin.Pair<java.util.List,rx.Observable> verifiedTransactions()

      Returns a pair of all recorded transactions and an observable of future recorded ones.

    - #### stateMachineRecordedTransactionMapping

          kotlin.Pair<java.util.List,rx.Observable> stateMachineRecordedTransactionMapping()

      Returns a snapshot list of existing state machine id - recorded transaction hash mappings, and a stream of future such mappings as well.

    - #### networkMapUpdates

          kotlin.Pair<java.util.List,rx.Observable> networkMapUpdates()

      Returns all parties currently visible on the network with their advertised services and an observable of future updates to the network.

    - #### startFlowDynamic

          <T> FlowHandle<T> startFlowDynamic(java.lang.Class<? extends net.corda.core.flows.FlowLogic<? extends T>> logicType,
                                             java.lang.Object args)

      Start the given flow with the given arguments, returning an Observable with a single observation of the result of running the flow.

    - #### nodeIdentity

          NodeInfo nodeIdentity()

      Returns Node's identity, assuming this will not change while the node is running.

    - #### addVaultTransactionNote

          void addVaultTransactionNote(SecureHash txnId,
                                       java.lang.String txnNote)

    - #### getVaultTransactionNotes

          java.lang.Iterable<java.lang.String> getVaultTransactionNotes(SecureHash txnId)

    - #### getCashBalances

          java.util.Map<java.util.Currency,net.corda.core.contracts.Amount> getCashBalances()

    - #### attachmentExists

          boolean attachmentExists(SecureHash id)

      Checks whether an attachment with the given hash is stored on the node.

    - #### openAttachment

          java.io.InputStream openAttachment(SecureHash id)

      Download an attachment JAR by ID

    - #### uploadAttachment

          SecureHash uploadAttachment(java.io.InputStream jar)

      Uploads a jar to the node, returns it's hash.

    - #### uploadFile

          java.lang.String uploadFile(java.lang.String dataType,
                                      java.lang.String name,
                                      java.io.InputStream file)

      Deprecated.

    - #### authoriseContractUpgrade

          void authoriseContractUpgrade(StateAndRef<?> state,
                                        java.lang.Class<? extends net.corda.core.contracts.UpgradedContract<?,?>> upgradedContractClass)

      Authorise a contract state upgrade. This will store the upgrade authorisation in the vault, and will be queried by ContractUpgradeFlow.Acceptor during contract upgrade process. Invoking this method indicate the node is willing to upgrade the state using the upgradedContractClass. This method will NOT initiate the upgrade process. To start the upgrade process, see ContractUpgradeFlow.Instigator.

      See Also:
        ContractUpgradeFlow.Acceptor, ContractUpgradeFlow.Instigator

    - #### deauthoriseContractUpgrade

          void deauthoriseContractUpgrade(StateAndRef<?> state)

      Authorise a contract state upgrade. This will remove the upgrade authorisation from the vault.

    - #### currentNodeTime

          java.time.Instant currentNodeTime()

      Returns the node's current time.

    - #### waitUntilRegisteredWithNetworkMap

          com.google.common.util.concurrent.ListenableFuture<kotlin.Unit> waitUntilRegisteredWithNetworkMap()

      Returns a ListenableFuture which completes when the node has registered wih the network map service. It can also complete with an exception if it is unable to.

    - #### partyFromKey

          Party partyFromKey(CompositeKey key)

      Returns the `class Party` corresponding to the given key, if found.

      See Also:
        `class Party`

    - #### partyFromName

          Party partyFromName(java.lang.String name)

      Returns the `class Party` with the given name as it's Party.name

      See Also:
        `class Party`