It is a project for Bytom Chrome extension JS SDK https://bytom.github.io/Bytom-JS-SDK
Name | Größe | Rev. | Zeit | Autor | Log Message |
---|---|---|---|---|---|
docs | |||||
src | |||||
.eslintrc.js | 549 | d3439cf | 2018-10-11 01:44:27 | xuhongxin | eslint and sign transaction api |
.gitignore | 31 | d6e6789 | 2019-04-18 15:49:56 | Zhiting Lin | Add the doc page. |
README.md | 748 | d6e6789 | 2019-04-18 15:49:56 | Zhiting Lin | Add the doc page. |
jsdoc.conf.json | 317 | d6e6789 | 2019-04-18 15:49:56 | Zhiting Lin | Add the doc page. |
package-lock.json | 54.49 k | e265507 | 2020-08-25 16:56:48 | Zhiting Lin | update key relavant logic |
package.json | 825 | e265507 | 2020-08-25 16:56:48 | Zhiting Lin | update key relavant logic |
npm install bytom-js-sdk
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)
});
Project depends on WebAssembly. \ See Bytom-WebAssembly.