Accessing node services

You can access a node’s ServiceHub within FlowLogic.call. This gives you access to all the node’s services:

  • ServiceHub.networkMapCache provides information on other nodes on the network (for example, notaries).
  • ServiceHub.identityService lets you resolve anonymous identities into well-known identities if you have the required certificates.
  • ServiceHub.attachments gives you access to the node’s attachments.
  • ServiceHub.validatedTransactions gives you access to the transactions stored in the node.
  • ServiceHub.vaultService stores the node’s current and historic states.
  • ServiceHub.keyManagementService manages transaction signing and the generation of fresh public keys.
  • ServiceHub.myInfo includes additional information about the node.
  • ServiceHub.clock provides access to the node’s internal time and date.
  • ServiceHub.diagnosticsService provides diagnostic information about the node, including the node version and currently running apps. This data should only be used for diagnostic purposes.
  • ServiceHub.contractUpgradeService provides functionality for secure contract upgrades.

ServiceHub also exposes these properties:

  • ServiceHub.loadState and ServiceHub.toStateAndRef to resolve a StateRef into a TransactionState or a StateAndRef.
  • ServiceHub.signInitialTransaction to sign a TransactionBuilder and convert it into a SignedTransaction.
  • ServiceHub.createSignature and ServiceHub.addSignature to create and add signatures to a SignedTransaction.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.