javascript api for Datum Blockchain
npm install datum-sdk --save
Add this link in your page
<script src="https://cdn.jsdelivr.net/npm/datum-sdk/dist/datum.min.js"></script>
Steps to setup your React-Native project to use Datum-SDK
npm run test:e2e
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)
});
For more code snippets checkout our getting started documentations
Run tests based Mocha test framework
mocha ./test