corda/docs/source/corda-api.rst
josecoll ef7ccd3147 Merge Open Source to Enterprise (#79)
* Check array size before accessing

* Review fixes

* CORDA-540: Make Verifier work in AMQP mode (#1870)

* reference to finance module via not hardcoded group ID (#1515)

*  generic way to reference to group id when loading finance.jar via cordapp

* Fixed the node shell to work with the DataFeed class

* Attempt to make NodeStatePersistenceTests more stable (#1895)

By ensuring that the nodes are properly started and aware of each other before firing any flows through them.
Also minor refactoring.

* Disable unstable test on Windows (#1899)

* CORDA-530 Don't soft-lock non-fungible states (#1794)

* Don't run unlock query if nothing was locked
* Constructors should not have side-effects

* [CORDA-442] let Driver run without network map (#1890)

* [CORDA-442] let Driver run without network map

- Nodes started by driver run without a networkMapNode.

- Driver does not take a networkMapStartStrategy anymore

- a new parameter in the configuration "noNetworkMapServiceMode" allows for a node not to be a networkMapNode nor to connect to one.

- Driver now waits for each node to write its own NodeInfo file to disk and then copies it into each other node.

- When driver starts a node N, it waits for every node to be have N nodes in their network map.

Note: the code to copy around the NodeInfo files was already in DemoBench, the NodeInfoFilesCopier class was just moved from DemoBench into core (I'm very open to core not being the best place, please advise)

* Added missing cordappPackage dependencies. (#1894)

* Eliminate circular dependency of NodeSchedulerService on ServiceHub. (#1891)

* Update customSchemas documentation. (#1902)

* [CORDA-694] Commands visibility for Oracles (without sacrificing privacy) (#1835)

new checkCommandVisibility feature for Oracles

* CORDA-599 PersistentNetworkMapCache no longer circularly depends on SH (#1652)

* CORDA-725 - Change AMQP identifier to officially assigned value

This does change our header format so pre-cached test files need
regenerating

* CORDA-725 - update changelog

* CORDA-680 Update cordapp packages documentation (#1901)

* Introduce MockNetworkParameters

* Cordformation in Kotlin (#1873)

Cordformation rewritten in kotlin.

* Kotlin migration

* Review Comments

* CORDA-704: Implement `@DoNotImplement` annotation (#1903)

* Enhance the API Scanner plugin to monitor class annotations.
* Implement @DoNotImplement annotation, and apply it.
* Update API definition.
* Update API change detection to handle @DoNotImplement.
* Document the `@DoNotImplement` annotation.

* Experimental support for PostgreSQL (#1525)

* Cash selection refactoring such that 3d party DB providers are only required to implement Coin Selection SQL logic.

* Re-added debug logging statement.

* Updated to include PR review feedback from VK

* Refactoring following rebase from master.

* Fix broken JUnits following rebase.

* Use JDBC ResultSet getBlob() and added custom serializer to address concern raised by tomtau in PR.

* Fix failing JUnits.

* Experimental support for PostgreSQL: CashSelection done using window functions

* Moved postgresql version information into corda/build.gradle

* Using a PreparedStatement in CashSelectionPostgreSQLImpl

* Changed the PostgreSQL Cash Selection implementation to use the new refactored AbstractCashSelection

* * Retire MockServiceHubInternal (#1909)

* Introduce rigorousMock
* Add test-utils and node-driver to generated documentation

* Fix-up: Bank Of Corda sample (#1912)

In the previous version when running with `--role ISSUER` the application failed to start.
The reason was that in spite of `quantity` and `currency` were optional,
un-necessary `requestParams` been constructed regardless.

* move SMM

* Interface changes for multi-threading

* CORDA-351: added dependency check plugin to gradle build script (#1911)

* CORDA-351: added dependency check plugin to gradle build script

* CORDA-351: Added suppression stub file with example

* CORDA-351: added suppresionFile property

* CORDA-435 - Ensure Kryo only tests use Kryo serializatin context

Also correct lambda typos (from lamba)

* Network map service REST API wrapper (#1907)

* Network map client - WIP

* Java doc and doc for doc site

* remove javax.ws dependency

* NetworkParameter -> NetworkParameters

* move network map client to node

* Fix jetty test dependencies

* NetworkParameter -> NetworkParameters

* Address PR issues

* Address PR issues and unit test fix

* Address PR issues

* Fixing Bank-Of-Corda Demo in `master` (#1922)

* Fix-up: Bank Of Corda sample

Use correct CorDapp packages to scan

(cherry picked from commit 2caa134)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Correct run configuration

* Fix-up port numbers

* CORDA-435 - AMQP serialisation cannot work with private vals

They won't be reported as properties by the introspector and thus we
will fail to find a constructor for them. This makes sense as we will be
unable to serialise an object whose members we cannot read

* CORDA-435 - AMQP enablement fixes

AMQP has different serialization rules than Kryo surrounding the way we
introspect objects to work out how to construct them

* [CORDA-442] make MockNetwork not start a networkmap node (#1908)

* [CORDA-442] make MockNetwork not start a networkmap node

Now MockNetwork will put the appropriate NodeInfos inside each running node networkMapCache.

Tests relating to networkmap node starting and interaction have been removed since they where relaying on MockNetwork

* Minor fix for api checker script to support macOS

* Retrofit changes from Enterprise PR #61 (#1934)

* Introduce MockNodeParameters/Args (#1923)

* CORDA-736 Add some new features to corda.jar via node.conf for testing (#1926)

* CORDA-699 Add injection or modification of memory network messages (#1920)

* Updated API stability changeset to reflect new schema attribute name.
2017-10-25 13:54:34 +01:00

6.0 KiB

Corda API

The following are the core APIs that are used in the development of CorDapps:

api-states api-persistence api-contracts api-vault-query api-transactions api-flows api-identity api-service-hub api-rpc api-core-types

Before reading this page, you should be familiar with the key concepts of Corda <key-concepts>.

Internal APIs and stability guarantees

Warning

For Corda 1.0 we do not currently provide a stable wire protocol or support for database upgrades. Additionally, the JSON format produced by the client-jackson module may change in future. Therefore, you should not expect to be able to migrate persisted data from 1.0 to future versions.

Additionally, it may be necessary to recompile applications against future versions of the API until we begin offering ABI stability as well. We plan to do this soon after the release of Corda 1.0.

Finally, please note that the 1.0 release has not yet been security audited. You should not run it in situations where security is required.

Corda artifacts can be required from Java 9 Jigsaw modules. From within a module-info.java, you can reference one of the modules e.g., requires net.corda.core;.

Warning

while Corda artifacts can be required from module-info.java files, they are still not proper Jigsaw modules, because they rely on the automatic module mechanism and declare no module descriptors themselves. We plan to integrate Jigsaw more thoroughly in the future.

Corda stable modules

The following modules have a stable API we commit not to break in following releases, unless an incompatible change is required for security reasons:

  • Core (net.corda.core): core Corda libraries such as crypto functions, types for Corda's building blocks: states, contracts, transactions, attachments, etc. and some interfaces for nodes and protocols
  • Client RPC (net.corda.client.rpc): client RPC
  • Client Jackson (net.corda.client.jackson): JSON support for client applications

Corda incubating modules

The following modules don't yet have a completely stable API, but we will do our best to minimise disruption to developers using them until we are able to graduate them into the public API:

  • net.corda.node.driver: test utilities to run nodes programmatically
  • net.corda.confidential.identities: experimental support for confidential identities on the ledger
  • net.corda.node.test.utils: generic test utilities
  • net.corda.finance: a range of elementary contracts (and associated schemas) and protocols, such as abstract fungible assets, cash, obligation and commercial paper
  • net.corda.client.jfx: support for Java FX UI
  • net.corda.client.mock: client mock utilities
  • Cordformation: Gradle integration plugins

Corda unstable modules

The following modules are available but we do not commit to their stability or continuation in any sense:

  • net.corda.buildSrc: necessary gradle plugins to build Corda
  • net.corda.node: core code of the Corda node (eg: node driver, node services, messaging, persistence)
  • net.corda.node.api: data structures shared between the node and the client module, e.g. types sent via RPC
  • net.corda.samples.network.visualiser: a network visualiser that uses a simulation to visualise the interaction and messages between nodes on the Corda network
  • net.corda.samples.demos.attachment: demonstrates sending a transaction with an attachment from one to node to another, and the receiving node accessing the attachment
  • net.corda.samples.demos.bankofcorda: simulates the role of an asset issuing authority (eg. central bank for cash)
  • net.corda.samples.demos.irs: demonstrates an Interest Rate Swap agreement between two banks
  • net.corda.samples.demos.notary: a simple demonstration of a node getting multiple transactions notarised by a distributed (Raft or BFT SMaRt) notary
  • net.corda.samples.demos.simmvaluation: A demo of SIMM valuation and agreement on a distributed ledger
  • net.corda.samples.demos.trader: demonstrates four nodes, a notary, an issuer of cash (Bank of Corda), and two parties trading with each other, exchanging cash for a commercial paper
  • net.corda.node.smoke.test.utils: test utilities for smoke testing
  • net.corda.node.test.common: common test functionality
  • net.corda.tools.demobench: a GUI tool that allows to run Corda nodes locally for demonstrations
  • net.corda.tools.explorer: a GUI front-end for Corda
  • net.corda.tools.graphs: utilities to infer project dependencies
  • net.corda.tools.loadtest: Corda load tests
  • net.corda.verifier: allows out-of-node transaction verification, allowing verification to scale horizontally
  • net.corda.webserver: is a servlet container for CorDapps that export HTTP endpoints. This server is an RPC client of the node
  • net.corda.sandbox-creator: sandbox utilities
  • net.corda.quasar.hook: agent to hook into Quasar and provide types exclusion lists

Warning

Code inside any package in the net.corda namespace which contains .internal or in net.corda.node for internal use only. Future releases will reject any CorDapps that use types from these packages.

Warning

The web server module will be removed in future. You should call Corda nodes through RPC from your web server of choice e.g., Spring Boot, Vertx, Undertow.

The @DoNotImplement annotation

Certain interfaces and abstract classes within the Corda API have been annotated as @DoNotImplement. While we undertake not to remove or modify any of these classes' existing functionality, the annotation is a warning that we may need to extend them in future versions of Corda. Cordapp developers should therefore just use these classes "as is", and not attempt to extend or implement any of them themselves.

This annotation is inherited by subclasses and subinterfaces.