ServicesForResolution
Keywords: net.corda.core.node.ServicesForResolution interface
Date: 2023-09-18

net.corda.core.node

## Interface ServicesForResolution

- All Known Subinterfaces:
    AppServiceHub, ServiceHub
  All Known Implementing Classes:
    MockServices

      @DoNotImplement
      public ServicesForResolution

  Subset of node services that are used for loading transactions from the wire into fully resolved, looked up forms ready for verification.

- - ### Constructor Detail

    - #### ServicesForResolution

          public ServicesForResolution()

  - ### Method Detail

    - #### getIdentityService

          @NotNull
          IdentityService getIdentityService()

      An identity service maintains a directory of parties by their associated distinguished name/public keys and thus supports lookup of a party given its key, or name. The service also manages the certificates linking confidential identities back to the well known identity (i.e. the identity in the network map) of a party.

    - #### getAttachments

          @NotNull
          AttachmentStorage getAttachments()

      Provides access to storage of arbitrary JAR files (which may contain only data, no code).

    - #### getCordappProvider

          @NotNull
          CordappProvider getCordappProvider()

      Provides access to anything relating to cordapps including contract attachment resolution and app context

    - #### getNetworkParametersService

          @NotNull
          NetworkParametersService getNetworkParametersService()

      Provides access to historical network parameters that are used in transaction resolution.

    - #### getNetworkParameters

          @NotNull
          NetworkParameters getNetworkParameters()

      Returns the network parameters the node is operating under.

    - #### loadState

          @NotNull
          TransactionState<?> loadState(@NotNull
                                                 StateRef stateRef)

      Given a `class StateRef` loads the referenced transaction and looks up the specified output `interface ContractState`.

      WARNING Do not use this method unless you really only want a single state - any batch loading should go through `loadStates` as repeatedly calling `loadState` can lead to repeat deserialsiation work and severe performance degradation.

      Throws:
        `TransactionResolutionException` - if `stateRef` points to a non-existent transaction.
      See Also:
        `class StateRef`, `interface ContractState`, `loadStates`, `loadState`

    - #### loadStates

          @NotNull
          java.util.Set<net.corda.core.contracts.StateAndRef> loadStates(@NotNull
                                                                                  java.util.Set<net.corda.core.contracts.StateRef> stateRefs)

      Given a Set of `class StateRef`'s loads the referenced transaction and looks up the specified output `interface ContractState`.

      Throws:
        `TransactionResolutionException` - if any of the `stateRefs` point to a non-existent transaction.
      See Also:
        Set, `class StateRef`, `interface ContractState`

    - #### loadContractAttachment

          @NotNull
          Attachment loadContractAttachment(@NotNull
                                                     StateRef stateRef)

      Returns the `interface Attachment` that defines the given `class StateRef`, which must be in the visible subset of the ledger.

      See Also:
        `interface Attachment`, `class StateRef`

    - #### specialise

          @NotNull
          LedgerTransaction specialise(@NotNull
                                                LedgerTransaction ltx)

      Provides a callback for the Node to customise the `class LedgerTransaction`.

      See Also:
        `class LedgerTransaction`