UNPKG

keystore_wdc

Version:

``` npm i keystore_wdc; const KeyStore = require('keystore_wdc'); const ks = new KeyStore(); ``` #### 生成keystore ``` async function create(){ const keystore = await ks.Create("your password"); } ``` * 返回keystore,密码格式不正确返回-1。

19 lines (15 loc) 376 B
const baseX = require('./base-x'); class base58 { constructor() { this.BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; this.bs58 = baseX(this.BASE58); } decode(code) { return this.bs58.decode(code); } encode(code) { return this.bs58.encode(code); } } module.exports = base58;