# Welcome to the Corda!

Warning

This build of the docs is from the master branch, not a milestone release. It may not reflect the current state of the code.

This is the developer guide for Corda, a proposed architecture for distributed ledgers. Here are the sources of documentation you may find useful, from highest level to lowest:

1. The Introductory white paper describes the motivating vision and background of the project. It is the kind of document your boss should read. It describes why the project exists and briefly compares it to alternative systems on the market.
2. The Technical white paper describes the entire intended design from beginning to end. It is the kind of document that you should read, or at least, read parts of. Note that because the technical white paper describes the intended end state, it does not always align with the implementation.
3. This user guide. It describes how to use the system to write apps, as currently implemented. It assumes you already have read the relevant sections of the technology white paper and now wish to learn how to use it.
4. The API docs.

Read on to learn:

Overview

- What’s included?
  - Kotlin
- Getting set up
  - If IntelliJ complains about lack of an SDK
  - Doing it without IntelliJ
- Data model
  - Overview
  - Comparison with Bitcoin
  - Comparison with Ethereum
  - Rationale for and tradeoffs in adopting a UTXO-style model
  - Rationale
  - Pros
  - Cons
- Data types
  - Amount
  - State
  - NamedByHash and UniqueIdentifier
  - FungibleAssets and Cash
  - Transaction lifecycle types
  - Party and PublicKey
  - Multi-signature support
  - Date support
  - Cryptography & maths support
- Transaction Tear-offs
  - Merkle trees in Corda
  - Hiding data
  - Example of usage
- Consensus model
  - Notary
  - Validation
  - Timestamping
  - Running a notary service
  - Obtaining a signature
- Networking and messaging
  - Messaging types
  - Network Map Service
- Persistence
  - Schemas
  - Object Relational Mapping
- Creating a Cordapp
  - 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
  - Building Gradle Plugins
  - Using Gradle Plugins
  - Template build.gradle
  - Cordformation
- Running the demos
  - Trader demo
  - IRS demo
  - Attachment demo
  - SIMM and Portfolio Demo
- Node administration
  - Database access
  - Monitoring your node
  - Uploading and downloading attachments
  - Uploading interest rate fixes
- The Corda Configuration File
  - Configuration File Location
  - Configuration File Format
  - Configuration File Examples
  - Configuration File Fields

Tutorials

- Where to start
  - The trader demo
- 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
  - Commercial paper class
  - Clauses
  - Group Clause
  - Summary
  - Debugging
- Writing a contract test
  - Testing single transactions
  - Chaining transactions
- Client RPC API Tutorial
- Protocol state machines
  - Introduction
  - Theory
  - A two party trading protocol
  - Suspendable functions
  - Starting your protocol
  - Implementing the seller
  - Subprotocols
  - Implementing the buyer
  - Progress tracking
  - Unit testing
  - Versioning
  - Future features
- Writing oracle services
  - Introduction
  - The two basic approaches
  - Asserting continuously varying data
  - Pay-per-play oracles
- Using attachments
  - Attachments demo
- Event scheduling
  - Introduction
  - How to implement scheduled events
  - An example

Contracts

- Contract catalogue
  - Cash
  - Commodity
  - Commercial Paper
  - Interest Rate Swap
  - Obligation
- Interest Rate Swaps
  - Creating an instance and lifecycle
  - Technical Details
- Initial Margin Agreements
  - SIMM Introduction
  - Process steps
  - Running the app

Node API

- Client RPC
  - Security
  - Observables
  - Versioning
  - Thread safety
  - Error handling
  - Wire protocol

Appendix

- Load testing
  - Configuration of the load testing cluster
  - Running the load tests
  - Configuration of individual load tests
  - How to write a load test
- Secure coding guidelines
  - Protocols
  - Contracts
- Release process
- Steps to cut a release
- Release notes
  - Milestone 5
  - Milestone 4
  - Milestone 3
  - Milestone 2
  - Milestone 1
  - Milestone 0
- Network Simulator
  - Interface
- Node Explorer
  - Running the UI
  - Running Demo Nodes
  - Interface
- Code style guide
  - 1. General style
  - 2. Comments
  - 3. Threading
  - 4. Assertions and errors
  - 5. Properties
  - 6. Compiler warnings
- Building the documentation
  - Requirements
  - Build