alexbosworth / ln-accounting

Harmony for LN
MIT License
13 stars 5 forks source link

sample code in readme #6

Open pseudozach opened 1 year ago

pseudozach commented 1 year ago

would be good to have some examples in the readme like ln-service repo.

I've tried this

        const lndReport = await lnAccounting.getAccountingReport({lnd, currency: 'BTC', request: test, category: 'chain-fees'  })
        console.log('lnAccounting ', lnAccounting)

it returns

{ json: true, url: 'https://mempool.space/api/tx/xxx' }

not clear to me what request function should be.

my expectation is to get a list of received onchain transactions, onchain fees paid over a certain interval...

alexbosworth commented 1 year ago

it expects a function like https://www.npmjs.com/package/request

alexbosworth commented 1 year ago

here is a code example of calling into it https://github.com/alexbosworth/balanceofsatoshis/blob/master/balances/get_accounting_report.js