# Welcome to the Corda documentation!

Warning

This build of the docs is from the “latest” branch, not a milestone release. It may not reflect the current state of the code. Read the docs for milestone release M9.0.

Corda is an open-source distributed ledger platform. The latest milestone (i.e. stable) release is M9.0. The codebase is on GitHub, and our community can be found on Slack and in our forum.

If you’re new to Corda, you should start by learning about its motivating vision and architecture. A good introduction is the Introduction to Corda webinar and the Introductory white paper. As they become more familiar with Corda, readers with a technical background will also want to dive into the Technical white paper, which describes the platform’s envisioned end-state.

Note

Corda training is now available in London, New York and Singapore! Learn more.

Corda is designed so that developers can easily extend its functionality by writing CorDapps (Corda Distributed Applications). Some example CorDapps are available in the Corda repo’s samples directory. To run these yourself, make sure you follow the instructions in Getting set up, then go to Running the demos.

If, after running the demos, you’re interested in writing your own CorDapps, you can use the CorDapp template as a base. A simple example CorDapp built upon the template is available here, and a video primer on basic CorDapp structure is available here.

From there, you’ll be in a position to start extending the example CorDapp yourself (e.g. by writing new states, contracts, and/or flows). For this, you’ll want to refer to this docsite, and to the tutorials in particular. If you get stuck, get in touch on Slack or the forum.

Once you’re familiar with Corda and CorDapp development, we’d encourage you to get involved in the development of the platform itself. Find out more about contributing to Corda.

# Documentation Contents:

Getting started

- What’s included?
- Getting set up
  - Software requirements
  - Corda source code
  - Next steps
- Troubleshooting
  - Milestone releases
  - Java issues
  - IDEA issues
  - Other common issues
- Running the demos
  - Trader demo
  - IRS demo
  - Attachment demo
  - Raft Notary demo
  - Bank Of Corda demo
  - SIMM and Portfolio Demo - aka the Initial Margin Agreement Demo
- CLI vs IDE
  - IDE - IntelliJ
  - Command Line
  - Debugging

Key concepts

- Overview
- Corda ecosystem
  - CorDapps
- Data model
  - Overview
  - States
  - Contracts
  - Transactions
- Core types
  - State and References
  - NamedByHash and UniqueIdentifier
  - Transaction lifecycle types
  - Party and CompositeKey
  - Multi-signature support
  - Date support
  - Cryptography and maths support
- Financial model
  - Amount
  - Financial states
- Flow framework
- Consensus and notaries
  - Consensus model
  - Notary
  - Validation
  - Timestamping
- Vault
- Security model

CorDapps

- CorDapp basics
  - App plugins
  - Services
  - Starting nodes
  - Installing apps
  - Starting your node
  - Debugging your node
  - Viewing persisted state of your node
  - Building against Corda
  - Gradle plugins for CorDapps
- The example CorDapp
  - Background
  - Getting started
  - Building the example CorDapp
  - Running the example CorDapp
  - Interacting with the example CorDapp
  - Extending the example CorDapp

The Corda node

- Object Serialization
  - What is serialization (and deserialization)?
  - Whitelisting
- Client RPC
  - Security
  - Observables
  - Futures
  - Versioning
  - Thread safety
  - Error handling
  - Wire protocol
  - Whitelisting classes with the Corda node
- Networking and messaging
  - Network Map Service
  - Message queues
  - Security
  - Messaging types
- Persistence
  - Schemas
  - Object relational mapping
- Node administration
  - Logging
  - Database access
  - Monitoring your node
  - Memory usage and tuning
  - Uploading and downloading attachments
  - Uploading interest rate fixes
- Node configuration
  - File location
  - Format
  - Examples
  - Fields
- The Corda plugin framework
- Brief introduction to the node services
  - Services within the node
  - Key management and identity services
  - Messaging and network management services
  - Storage and persistence related services
  - Flow framework and event scheduling services
  - Notary flow implementation services
  - Vault related services
  - Node Web Server
- Node Explorer
  - Running the UI
  - Running demo nodes
  - Interface
- Network permissioning
  - Initial Registration
  - Starting the Registration

Tutorials

- Writing a contract
  - Where to put your code
  - Starting the commercial paper class
  - States
  - Commands
  - The verify function
  - Using state groups
  - Checking the requirements
  - How to test your contract
  - Adding a generation API to your contract
  - How multi-party transactions are constructed and transmitted
  - Non-asset-oriented smart contracts
  - Making things happen at a particular time
  - Encumbrances
  - Clauses
- Writing a contract using clauses
  - What are clauses and why use them?
  - How do clauses work?
  - Commercial paper class
  - Simple Clauses
  - Group clause
  - Summary
  - Debugging
- Writing a contract test
  - Testing single transactions
  - Chaining transactions
- Upgrading Contracts
  - Workflow
  - Authorising upgrade
  - Proposing an upgrade
  - Examples
- Integration testing
- Client RPC API tutorial
  - Whitelisting classes from your CorDapp with the Corda node
  - Security
- Building transactions
  - Introduction
  - The Basic Lifecycle Of Transactions
  - Gathering Inputs
  - Generating Commands
  - Generating Outputs
  - Building the WireTransaction
  - Completing the SignedTransaction
  - Committing the Transaction
  - Partially Visible Transactions
- Writing flows
  - Introduction
  - Theory
  - A two party trading flow
  - Suspendable functions
  - Whitelisted classes with the Corda node
  - Starting your flow
  - Implementing the seller
  - Exception handling
  - Sub-flows and finalisation
  - Implementing the buyer
  - Progress tracking
  - Versioning
  - Future features
- Writing flow tests
- Running a notary service
- Using a notary service
  - Assigning a notary
  - Notarising a transaction
- Writing oracle services
  - Introduction to oracles
  - Implementing an oracle with continuously varying data
  - Using an oracle
- Using attachments
  - Attachments demo
- Event scheduling
  - Introduction
  - How to implement scheduled events
  - An example

Other

- Network Simulator
  - What it is and is not
  - Interface
- Clauses
  - Basic clause structure
  - Composition clauses
  - Other types of clauses
- Transaction tear-offs
  - Merkle trees in Corda
  - Hiding data
  - Example of usage

Component library

- Contract catalogue
  - Cash
  - Commodity
  - Commercial paper
  - Interest rate swap
  - Obligation
- Interest rate swaps
  - Creating an instance and lifecycle
  - Technical details

Appendix

- Load testing
  - Configuration of the load testing cluster
  - Running the load tests
  - Configuration of individual load tests
  - How to write a load test
- What is a corda network?
  - Setting up your own network
- Secure coding guidelines
  - Flows
  - Contracts
- Release process
  - Steps to cut a release
- Release notes
  - Milestone 9
- Changelog
  - Milestone 9
  - Milestone 8
  - Milestone 7
  - Milestone 6
  - Milestone 5
  - Milestone 4
  - Milestone 3
  - Milestone 2
  - Milestone 1
  - Milestone 0
- Code style guide
  - 1. General style
  - 2. Comments
  - 3. Threading
  - 4. Assertions and errors
  - 5. Properties
  - 6. Compiler warnings
- Building the documentation
  - Requirements
  - Build
- Further notes on Kotlin
- Publishing Corda
  - Before Publishing
  - Publishing Locally
  - Publishing to Jcenter
  - Publishing to Maven Central
- Working with the Corda Demo on Azure Marketplace
  - Pre-requisites
  - Deploying the VM
  - Viewing the SIMM Valuation demo
  - Viewing the IRS demo
  - Viewing logs (advanced users)
  - Next Steps

Glossary

- Glossary