Skip to content
It is a project for Bytom Chrome extension JS SDK
Branch: master
Clone or download
Pull request Compare This branch is 14 commits ahead of Bytom-Community:master.
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.
docs update document. May 8, 2019
src update the JS SDK API May 8, 2019
.eslintrc.js
.gitignore
README.md Add the doc page. Apr 18, 2019
jsdoc.conf.json Add the doc page. Apr 18, 2019
package-lock.json update the blockcenter js api. Apr 29, 2019
package.json update the blockcenter js api. Apr 29, 2019

README.md

Bytom-JS-SDK

npm version

Install

npm install bytom-js-sdk

Use

let net = {
    main: "http://main-net-host/",
    test: "http://test-net-host/"
};
let bytom = new Bytom(net, chrome.runtime.getURL("main.wasm"));

//set Bytom net type (main test), default main net.
bytom.setNetType('test');
console.log(bytom.getNetType());

//create key
bytom.sdk.keys.create("test_alias", "123456").then((res)=>{
    console.log(res)
}).catch(error => {
    console.log(error)
});

WebAssembly build

Project depends on WebAssembly.
See Bytom-WebAssembly.

You can’t perform that action at this time.