create account

比特股Web钱包搭建以及接入到私有链 by bitw

View this thread on: hive.blogpeakd.comecency.com
· @bitw ·
比特股Web钱包搭建以及接入到私有链
<html>
<p>&nbsp;BitShares-UI是比特股轻钱包,BitShares API 由 witness_node 程序提供。比特股钱包有两种模式:钱包模式和账号模式,后面再具体阐述这两种模式的区别&nbsp;</p>
<h1>1.依赖环境配置</h1>
<p>BitShares-UI 依赖于 Node.js v6 以上版本,通过nvm可以很方便的管理node版本,执行如下命令<br>
 安装NVM以及V6:&nbsp;</p>
<pre><code>curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash<br>
nvm install v6<br>
</code></pre>
<p>切换到v6:&nbsp;</p>
<pre><code>nvm use v6<br>
</code></pre>
<p>这个查看node是否已经切换到V6:&nbsp;</p>
<pre><code>$ node -v <br>
v6.12.3<br>
</code></pre>
<p>本地切换只针对当前命令行窗口有效,新打开命令行,需要重新切换v6&nbsp;</p>
<h1>2.代码下载及编译</h1>
<h2>获取项目源代码</h2>
<pre><code>git clone https://github.com/bitshares/bitshares-ui.git<br>
cd bitshares-ui<br>
</code></pre>
<h2>安装项目依赖</h2>
<pre><code>npm install<br>
</code></pre>
<h2>编译及启动服务器</h2>
<pre><code>npm start<br>
</code></pre>
<p>成功的话,会看到如下提示:&nbsp;</p>
<pre><code>webpack: Compiled successfully.<br>
</code></pre>
<p>此时打开浏览器输入如下地址就可以看到web钱包已经运行起来:&nbsp;</p>
<pre><code>http://localhost:8080<br>
</code></pre>
<p>默认接入的比特股公有链,这个和比特股的官方钱包是一样的,它是一个钱包同时是一个交易所。<br>
 目前的比特股交易所都是通过这种方式搭建的,主要用来上线一些数字货币以及通过注册账户获取账户的交易手续费来盈利,大致的步骤如下: &nbsp;</p>
<ul>
  <li>搭建见证人节点</li>
  <li>搭建比特股钱包</li>
  <li>搭建水龙头服务</li>
</ul>
<p>具体手续费的分配比例与比特股的账户引荐人制度有关系,以后在具体阐述。&nbsp;</p>
<h1>3.钱包接入到私有链</h1>
<p>上述步奏已经完成了比特股钱包的搭建,并接入到公有链中,那么如何将钱包接入的自己搭建的私有链中呢,其实很简单,在当前打开的钱包中点击Settings-&gt;Access 点击Add node,如下图所示: <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addNode.png &nbsp;添加完成之后选中新建的节点点击active,即激活使用本地节点了,如下图所显示: <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show.png &nbsp;点击Exlpore,看以看到本地节点生成的区[图片上传中...(show.png-7c0d55-1515683017805-0)]<br>
 块,可以通过cli-walletz执行转账,验证区块是否将建议打包,可以多转几次:&nbsp;</p>
<pre><code>unlocked &gt;&gt;&gt; transfer nathan alpha 2 BTS "here is some cash" true<br>
</code></pre>
<p>从下图可以看到,下次区块产生的时候,交易已经被验证了: <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;explore.png &nbsp;从而验证钱包已经接入到私有链了,账户注册需要搭建水龙头服务,后面待续。<br>
</p>
<p>作者:LeonRun<br>
链接:https://www.jianshu.com/p/72396c43c906<br>
來源:简书<br>
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。&nbsp;</p>
</html>
👍  
properties (23)
authorbitw
permlinkweb
categorybitshares
json_metadata{"tags":["bitshares"],"links":["https://www.jianshu.com/p/72396c43c906"],"app":"steemit/0.1","format":"html"}
created2018-02-07 21:29:27
last_update2018-02-07 21:29:27
depth0
children1
last_payout2018-02-14 21:29:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,982
author_reputation88,258,865
root_title比特股Web钱包搭建以及接入到私有链
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id35,753,988
net_rshares510,036,343
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @bitw! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/post4day.png)](http://steemitboard.com/@bitw) You published 4 posts in one day

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-bitw-20180208t121608000z
categorybitshares
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2018-02-08 12:16:06
last_update2018-02-08 12:16:06
depth1
children0
last_payout2018-02-15 12:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length682
author_reputation38,975,615,169,260
root_title比特股Web钱包搭建以及接入到私有链
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id35,903,441
net_rshares0