We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5a2080 commit 629bf17Copy full SHA for 629bf17
example/index.js
@@ -1,5 +1,13 @@
1
-var visualize = require('../').visualizeWithData
2
-var data = require('./transactions')
+var visualize = require('../').visualize
+var bitcoin = require('bitcoinjs-lib')
3
+var TxGraph = require('bitcoin-tx-graph')
4
-visualize(data, 'body')
5
+var graph = new TxGraph()
6
+
7
+var txs = require('./txs.json')
8
+txs.forEach(function(txHex) {
9
+ graph.addTx(bitcoin.Transaction.fromHex(txHex))
10
+})
11
12
+visualize(graph, 'body')
13
example/transactions.json
0 commit comments