Skip to content

Commit 629bf17

Browse files
committed
update example
1 parent a5a2080 commit 629bf17

File tree

4 files changed

+42
-410
lines changed

4 files changed

+42
-410
lines changed

example/index.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
var visualize = require('../').visualizeWithData
2-
var data = require('./transactions')
1+
var visualize = require('../').visualize
2+
var bitcoin = require('bitcoinjs-lib')
3+
var TxGraph = require('bitcoin-tx-graph')
34

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')
513

example/transactions.json

-313
This file was deleted.

0 commit comments

Comments
 (0)