SDKs
Your application reaches a ledger through an SDK. SDKs are available for Java, Node, and Ruby.
An SDK is a client for the Ledger API: it builds transactions, applies the key signatures they require, submits them, and reads the ledger back. It holds no ledger state of its own, so several services can work against the same ledger without coordinating with each other.
Use the language selector to switch the programming language shown throughout this documentation.
JavaLink to this section
The Java SDK is available via the Maven Central Repository. Java 8, 9, and 10 are supported.
Maven users should add the following to pom.xml:
<dependencies>
<dependency>
<groupId>org.onyx</groupId>
<artifactId>onyx-mesh-sdk</artifactId>
<version>[2.2,3)</version>
</dependency>
</dependencies>Gradle users should add the following to build.gradle:
compile 'org.onyx:onyx-mesh-sdk:2.2'Then use the following import statements in your code:
import org.onyx.api.*;
import org.onyx.http.*;
import org.onyx.exception.*;Node.jsLink to this section
The Node.js SDK is available via NPM. Node 4 or greater is required.
To install, add the following to your package.json:
{
"dependencies": {
"onyx-mesh-sdk": "~2.2.0"
}
}Then use the following import statement in your code:
const onyxMesh = require('onyx-mesh-sdk')RubyLink to this section
The Ruby SDK is available via RubyGems. Ruby 2.3 or greater is required.
To install, add the following to your Gemfile:
gem 'onyx-mesh-sdk', '~> 2.2', require: 'onyx_mesh'