mirror of
https://github.com/corda/corda.git
synced 2024-12-27 16:28:56 +00:00
f0138dfe17
* Moves code sections in tutorials to code files. * Removes wallet references. * Updates repo layout doc. * Removes remaining cordapp-tutorial references, replaced with cordapp-example. * Fixes broken link. * Misc docs fixes. * Refreshes the ServiceHub and rpc ops api pages. * Updates the cheat sheet. * Updates cookbooks. * Refreshes the running-a-notary tutorial. * Updates flow-testing tutorial * Updates tear-offs tutorial. * Refreshes integration-testing tutorial. * Updates to contract tutorial and accompanying code to bring inline with V1 release. * Refreshes contract-upgrade tutorial. * Fixed broken code sample in "writing a contract" and updated contracts dsl. * Added contract ref to java code. Fixed broken rst markup. * Updates transaction-building tutorial. * Updates the client-rpc and flow-state-machines tutorials. * Updates the oracles tutorial. * Amended country in X500 names from "UK" to "GB" * Update FlowCookbook.kt * Amended cheatsheet. Minor update on contract upgrades tutoraial. * Added `extraCordappPackagesToScan` to node driver. * Changes to match new function signature. * Update to reflect change in location of cash contract name.
28 lines
1.4 KiB
ReStructuredText
28 lines
1.4 KiB
ReStructuredText
API: ServiceHub
|
||
===============
|
||
Within ``FlowLogic.call``, the flow developer has access to the node's ``ServiceHub``, which provides access to the
|
||
various services the node provides. The services offered by the ``ServiceHub`` are split into the following categories:
|
||
|
||
* ``ServiceHub.networkMapCache``
|
||
* Provides information on other nodes on the network (e.g. notaries…)
|
||
* ``ServiceHub.identityService``
|
||
* Allows you to resolve anonymous identities to 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 signing transactions and generating fresh public keys
|
||
* ``ServiceHub.myInfo``
|
||
* Other information about the node
|
||
* ``ServiceHub.clock``
|
||
* Provides access to the node’s internal time and date
|
||
|
||
Additional, ``ServiceHub`` exposes the following 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`` |