1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

キュー〇ー3分で作れるBitcoin Block Explorer

Last updated at Posted at 2017-11-15

前置き

Bitcoin Block Explorerを作ってみたかった。それだけ。
キュー〇ーは関係ないです。けど、ダウンロード時間を除けばすぐにできます。3分は釣りですごめんなさい。

出来上がるもの

image.png

用意するもの

  • Ubuntu 14.04 (他のOSでもたぶん可能)
  • 愛情

作り方

ほとんどここに書いてあるとおりです。
下準備をします。

sudo apt-get update

nvmを用意します。(https://github.com/creationix/nvm)

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

※この後言われた通りに~/.profileに追記などしてください。追記後はsource ~/.profileを。

Nodeをインストールします。

nvm install v4

ØMQなどをインストールします。

sudo apt-get install libzmq3-dev build-essential

メインのものをインストールして起動します。

npm install -g bitcore
bitcored

完成:relaxed:

image.png

補足

  • 起動して放置しておけば勝手に同期してくれます。140GBぐらいのデータ(2017年11月)を数日かけて取ってきます。
  • ブロックチェーンのサイズはBlockchain Size - Blockchainから見れます。綺麗。
  • 私がやってるときはエラーがでました。anduckさんのプログラム書き換え案で動くようになりました。
  • 設定をいじればBitcoinライクな通貨のExplorerが作れるらしいです。MonacoinのExplorerとかもあります。同様にDogecoinとかのExplorerとかも作れるはずです。
  • デフォルトでWebAPIが備わってます。insightで出来てるであろう公開されているサイトがいくつかありますが、API使えます。タダ乗りできますが、信用度は微妙なのでオススメしません。GitHub - bitpay/insight-api
  • Vagrantで試しました。使ったVagrantfileは以下のものです。
Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.network "private_network", ip: "192.168.33.10"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "2048"
  end
end

宣伝

フォローお願いします🍞@redshoga

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?