GithubHelp home page GithubHelp logo

corda5-token-sdk's Introduction

Corda

Corda Token SDK

Reminder

This project is open source under an Apache 2.0 licence. That means you can submit PRs to fix bugs and add new features if they are not currently available.

What is the token SDK?

The token SDK exists to make it easy for CorDapp developers to create CorDapps which use tokens. Functionality is provided to create token types, then issue, move and redeem tokens of a particular type.

The tokens SDK comprises three CorDapp JARs:

  1. Contracts which contains the base types, states and contracts
  2. Workflows which contains flows for issuing, moving and redeeming tokens as well as utilities for the above operations.
  3. Token Builder which contains builder classes and utility functions for creating token objects
  4. Selection that contains both database and in memory token selection of fungible tokens

The token SDK is intended to replace the "finance module" from the core Corda repository.

For more details behind the token SDK's design, see here.

How to use the SDK?

Tokens SDK binaries for the current Developer Preview version of Corda 5 are published to R3's corda-lib Artifactory and can be used from there.

Adding token SDK dependencies to an existing CorDapp

  1. Add a repository definition for R3's corda-lib Artifactory:
    repositories {
        maven { url 'https://software.r3.com/artifactory/corda-lib' }
    }
  1. Add a variable for the tokens release group and the version you wish to use.
   buildscript {
       ext {
           tokens_release_version = '2.0.0-DevPreview-1.0'
           tokens_release_group = 'com.r3.corda.lib.tokens'
       }
   }
  1. Now, you can add the token-sdk dependencies to the dependencies block in each module of your CorDapp.

    For contract modules add:

     cordapp "$tokens_release_group:tokens-contracts:$tokens_release_version"
    

    In your workflow build.gradle add:

     cordapp "$tokens_release_group:tokens-workflows:$tokens_release_version"
    

    You can also add the token selection and token builder to your workflows:

     cordapp "$tokens_release_group:tokens-selection:$tokens_release_version"
     cordapp "$tokens_release_group:tokens-builder:$tokens_release_version"
    

Building locally and installing the token SDK binaries

If you wish to build the token-sdk from source then do the following to publish binaries to your local maven repository:

git clone http://github.com/corda/corda5-token-sdk
cd corda5-token-sdk
./gradlew clean install

You then need to add maven-local() to your repositories and reference the version you published locally in your CorDapp build configuration to use your local build.

Where to go next?

Official documentation

Introduction to token SDK

Most common tasks

Simple delivery versus payment tutorial

Other useful links

Token SDK Design

Experimental in memory token selection

Changelog

Contributing

Contributors

corda5-token-sdk's People

Contributors

adagys avatar afurgal avatar agoldvarg avatar alex-koller-r3 avatar andr3ej avatar blsemo avatar caismanai avatar charlier3 avatar chrisr3 avatar clintonio avatar davidleeuk avatar dhrudevalia avatar exfalso avatar illoyd avatar ischasny avatar jxilt avatar kasiastreich avatar m4ksio avatar mikehearn avatar philippkueng avatar r3domfox avatar rajvjn avatar rick-r3 avatar roastario avatar rogersanick avatar ronanbrowne avatar shamsasari avatar tb-pq avatar willhr3 avatar wzur-r3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.