From cc883a48bc02e23d135921f54ecbc0afd2fdd2dc Mon Sep 17 00:00:00 2001 From: xuhongxin Date: Sat, 25 Aug 2018 19:39:08 +0800 Subject: [PATCH] demo --- src/content/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/content/index.js b/src/content/index.js index 66b2f34..6562308 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -1 +1,23 @@ +import bytom from "bytom-js-sdk" + +//install +//npm link your_local_path_bytom-js-sdk +//npm link bytom-js-sdk +const url = 'http://127.0.0.1:9888' +const accessToken = '' + +const client = new bytom(url, accessToken) + +//create key +const keyPromise = client.keys.create('alias', 'password') +keyPromise.then(key => { + console.log(key) +}) + +//accounts list +const acPromise = client.accounts.listAll() +acPromise.then(res => { + console.log(res) +}) + console.log('This is CONTENT page!') -- 2.11.0