diff --git a/lib/Sync.js b/lib/Sync.js index b68bd43..d46e818 100644 --- a/lib/Sync.js +++ b/lib/Sync.js @@ -4,7 +4,6 @@ require('classtool'); function spec() { - var config = require('../config/config'); var sockets = require('../app/controllers/socket.js'); var BlockDb = require('./BlockDb').class(); var TransactionDb = require('./TransactionDb').class(); diff --git a/lib/TransactionDb.js b/lib/TransactionDb.js index 7a45d74..1774bae 100644 --- a/lib/TransactionDb.js +++ b/lib/TransactionDb.js @@ -38,7 +38,6 @@ function spec(b) { }; TransactionDb.prototype.drop = function(cb) { - var self = this; var path = config.leveldb + '/txs'; db.close(function() { require('leveldown').destroy(path, function () { @@ -51,7 +50,6 @@ function spec(b) { // TransactionDb.prototype.fromTxIdOne = function(txid, cb) { TODO TransactionDb.prototype.has = function(txid, cb) { - var self = this; var k = OUTS_ROOT + txid; db.get(k, function (err,val) { @@ -70,7 +68,6 @@ function spec(b) { }; TransactionDb.prototype.fromTxId = function(txid, cb) { - var self = this; var k = OUTS_ROOT + txid; var ret=[]; @@ -176,7 +173,6 @@ function spec(b) { }; TransactionDb.prototype.fromTxIdN = function(txid, n, cb) { - var self = this; var k = OUTS_ROOT + txid + '-' + n; @@ -190,7 +186,6 @@ function spec(b) { }; TransactionDb.prototype.fromAddr = function(addr, cb) { - var self = this; var k = ADDR_ROOT + addr; var ret=[]; @@ -234,7 +229,6 @@ function spec(b) { TransactionDb.prototype.removeFromTxId = function(txid, cb) { - var self = this; async.series([ function(c) { diff --git a/public/css/common.css b/public/css/common.css index 5dadba2..4292fb3 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -33,12 +33,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .vm { vertical-align: middle; } -.hightlight_h { - color: blue; - padding-bottom: 5px; - border-bottom: 1px solid #eee; -} - .navbar-default { background-color: #8DC429; border-bottom: 4px solid #64920F; @@ -62,7 +56,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { } .navbar-form { - width: 30%; + width: 35%; } @media (max-width: 991px) { @@ -70,7 +64,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin: 0; } .navbar-form { - width: 15%; + width: 25%; } } diff --git a/public/js/config.js b/public/js/config.js index 613294c..4d3a625 100755 --- a/public/js/config.js +++ b/public/js/config.js @@ -34,10 +34,6 @@ angular.module('insight').config(function($routeProvider) { when('/status', { templateUrl: '/views/status.html', title: 'Status' - }). - when('/developers', { - templateUrl: '/views/developers.html', - title: 'Developers' }) .otherwise({ templateUrl: '/views/404.html', diff --git a/public/js/controllers/header.js b/public/js/controllers/header.js index 3b17ec5..e5fa3ac 100755 --- a/public/js/controllers/header.js +++ b/public/js/controllers/header.js @@ -12,10 +12,6 @@ angular.module('insight.system').controller('HeaderController', { 'title': 'Status', 'link': 'status' - }, - { - 'title': 'Developers', - 'link': 'developers' } ]; diff --git a/public/views/developers.html b/public/views/developers.html deleted file mode 100644 index aac25e4..0000000 --- a/public/views/developers.html +++ /dev/null @@ -1,318 +0,0 @@ -
-The Insight REST API provides you with a convenient, powerful and simple way to read data from the bitcoin network and build your own services with it.
-The REST API currently only supports JSON for the response formats.
-The API is free to use.
-URI:
- -/api/block/00000000009890591fbacf147ffc6c246fa7bad0f2c75a68e3e1ba48b1636d23- -
Result:
- --{ - hash: "00000000009890591fbacf147ffc6c246fa7bad0f2c75a68e3e1ba48b1636d23", - confirmations: 37, - size: 1287, - height: 177951, - version: 2, - merkleroot: "4d549d51e0bca64030b7f3ab74fcc9a82f3de7bba5d6c3f9a8cb2028399fc590", - tx: [ - "1b8354de2102f0f3f72f7e59fd3fdc0a406fa92675a78d7bb1f599067685385a", - "babe2d8b24649df7951e696a4b1686e28764d2d7bbf94d45f612ff598a14017d", - "0351d523fec44a04990b8f9513c44b358eac8b88d5df1074ed36d3ffef5f1582", - "09f1a8dd15a989377753690f2293e5509fa0763a26af661cf7b56eebc6999c59", - "04d972767c5500805ccd41961e2b538b5334af3e41635b2a2ec3750a3c96565a", - "df11424536f618ba511436702f97e886b83a1a0e7d1578a26160177274ca0a39" - ], - time: 1391192318, - nonce: 2374664549, - bits: "1c00ffff", - difficulty: 256, - chainwork: "0000000000000000000000000000000000000000000000000413951687599d9f", - previousblockhash: "000000000034a41747ec564a890d8192fbd2ec0bfa71667b81db145575cde08e", - nextblockhash: "0000000000868ef72603e45325fc0464a5424b7539c51f5905e0ffd2bafc7115", - reward: 50 -}- -
URI:
- -/api/blocks/?blockDate=yyyy-mm-dd- -
Result:
- --{ - blocks: [ Array information of blocks ], - length: 2636, - pagination: { - next: "2014-01-30", - prev: "2014-01-28", - current: "2014-01-29", - isToday: false - } -}- -
URI:
- -/api/block-index/0- -
Result:
- --{ - blockHash: "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" -}- -
URI:
- -/api/tx/0099d9342edab8a59fa4d84cb807cf599ce2210e5240bc39500d8f6b6f4779c0- -
Result:
- --{ - hex: "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0d0358b702017e062f503253482fffffffff01108a082a010000002321029f58ed5b58f1941664d67bcc2ccb5b25c50cc2324ccc9643ff7f8271118c4609ac00000000", - txid: "0099d9342edab8a59fa4d84cb807cf599ce2210e5240bc39500d8f6b6f4779c0", - version: 1, - locktime: 0, - vin: [ - { - coinbase: "0358b702017e062f503253482f", - sequence: 4294967295, - reward: 50, - n: 0 - } - ], - vout: [ - { - value: 50.0017, - n: 0, - scriptPubKey: { - asm: "029f58ed5b58f1941664d67bcc2ccb5b25c50cc2324ccc9643ff7f8271118c4609 OP_CHECKSIG", - hex: "21029f58ed5b58f1941664d67bcc2ccb5b25c50cc2324ccc9643ff7f8271118c4609ac", - reqSigs: 1, - type: "pubkey", - addresses: [ - "mt3r2JMiWqGkHUiMqduo2HoHw5iAHMT7P9" - ] - } - } - ], - blockhash: "0000000000478e746e78012066a14db61ee9a447b35607a42b54d15060eb23d6", - confirmations: 10, - time: 1391201940, - blocktime: 1391201940, - isCoinBase: true, - valueIn: 50, - valueOut: 50.0017, - size: 108 -} -- -
URI:
- -/api/txs/?block=0000000001a6b96db5e1af9f01458c5f0dd880d9cce6e9ed200afb9f0941991b&pageNum=1- -
Result:
- --{ - pagesTotal: 2, - txs: [ Array of Transactions ] -} -- -
URI:
- -/api/txs/?address=mqxfgc12qXdm4ekLrCKPDYqamxUEtK78Vg&pageNum=0- -
Result:
- --{ - pagesTotal: 4, - txs: [ Array of Transactions ] -} -- -
URI:
- -/api/addr/mqxfgc12qXdm4ekLrCKPDYqamxUEtK78Vg- -
Result:
- --{ - balanceSat: 5031766000, - totalReceivedSat: 5853132000, - totalSentSat: 821366000, - txApperances: 66, - transactions: [ Array of Transaction IDs ], - addrStr: "mqxfgc12qXdm4ekLrCKPDYqamxUEtK78Vg", - totalSent: 8.21366, - balance: 50.31766, - totalReceived: 58.53132 -} -- -
URI:
- -/api/status?q=getInfo- -
Result:
- --{ - info: { - version: 89900, - protocolversion: 70002, - walletversion: 60000, - balance: 0, - blocks: 178019, - timeoffset: -345, - connections: 9, - proxy: "", - difficulty: 1, - testnet: true, - keypoololdest: 1389273625, - keypoolsize: 101, - paytxfee: 0, - errors: "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" - } -} -- -
URI:
- -/api/status?q=getDifficulty- -
Result:
- --{ - difficulty: 1 -} -- -
URI:
- -/api/status?q=getTxOutSetInfo- -
Result:
- --{ - txoutsetinfo: { - height: 178020, - bestblock: "00000000fc182ffd65fa397dbe0c60b1932bee4ccef407b36b7d6d9d5fdb5962", - transactions: 242191, - txouts: 421180, - bytes_serialized: 25490639, - hash_serialized: "68decf93d8c883a31c061fcd393966d36fbed07c05b4df739da85585cb70e077", - total_amount: 8900499.25420614 - } -} -- -
URI:
- -/api/status?q=getLastBlockHash- -
Result:
- --{ - lastblockhash: "00000000fc182ffd65fa397dbe0c60b1932bee4ccef407b36b7d6d9d5fdb5962" -} -- -
URI:
- -/api/sync- -
Result:
- --{ - status: "finished", - blockChainHeight: 178009, - syncPercentage: 100, - skippedBlocks: 0, - syncedBlocks: 178011, - error: null -} -- -
URI:
- -/api/version- -
Result:
- --{ - version: "0.0.1" -} -- -
API live documentation
-