Skip to content

themoritz/txgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

txgraph

txgraph.info

Interactive Sankey style visualization of the Bitcoin transaction graph.

txgraph.info

Features

  • Expand/collapse transaction inputs and outputs
  • Annotate and colorize transactions as well as inputs/outputs
  • Export transaction details to Beancount.
  • Infinite zoom/pan
  • Adjust layout parameters

Development

This repo covers just the fontend. The backend is a fork of electrs.

Testing locally

Native

Make sure you are using the latest version of stable rust by running rustup update.

cargo run --release

On Linux you need to first run:

sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev

Web

We use Trunk to build for web target.

  1. Install Trunk with cargo install --locked trunk.
  2. Run trunk serve to build and serve on http://127.0.0.1:8080. Trunk will rebuild automatically if you edit the project.
  3. Open `http://127.0.0.1:8080/index.html

Fonts

This project uses a custom Iosevka font. You can use the build plan in the src/fonts folder, and then create the subset using the following command (in the src/fonts folder):

pyftsubset iosevka-custom-{regular|bold}.ttf --unicodes-file=include-unicodes.txt --text-file=include-text.txt

On macOS, pyftsubset can be installed using brew install fonttools.

Testnet

If you want to develop against Bitoin Testnet, set the environment variable TESTNET=1 (e.g. in the .envrc file). You may want to touch build.rs to trigger a complete rebuild.