Add ledger support
Merge pull request #125 from syl20bnr/ledger_support

Add ledger support