Skip to content
Datum Javascript API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
docs
e2e
examples
lib
test
.eslintignore
.eslintrc.json
.gitignore
LICENSE.txt
README.md
gulpfile.js
index.js
jest.config.js
package-lock.json
package.json

README.md

datum-sdk

javascript api for Datum Blockchain

Documentations

Getting Started

Installation

Node

npm install datum-sdk --save

Browser

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
You can’t perform that action at this time.