0.2.3 • Published 5 years ago

@datumnetwork/datum-sdk v0.2.3

Weekly downloads
1
License
LGPL-3.0-or-later
Repository
github
Last release
5 years ago

datum-sdk

javascript api for Datum Blockchain

Documentations

Getting Started

Installation

Node

npm install datum-sdk --save

Browser

npm.io

Add this link in your page

<script src="https://cdn.jsdelivr.net/npm/datum-sdk/dist/datum.min.js"></script>

React-Native

Steps to setup your React-Native project to use Datum-SDK

Test

E2E tests

npm run test:e2e

Usage

Use the Datum object directly from global namespace:

console.log(Datum); // {version: {…}}

Create Datum Identity

const password = 'Hollow Morpheus Mauled...';
Datum.createIdentity(
  password
).then((res) => {
  console.log(res) // {seed:"...", keystore:"{"encSeed":{"encStr":"eddG2...","hdIndex":1,"version":3}"}
}).catch((e) => {
  console.error(e)
});

Examples

For more code snippets checkout our getting started documentations

Check our examples folder.

Testing (mocha)

Run tests based Mocha test framework

mocha ./test