4.5.2 • Published 4 years ago
@hyperdivision/eth-transaction-tail v4.5.2
eth-transaction-tail
Tails transactions on the Ethereum blockchain
npm install @hyperdivision/eth-transaction-tail
Usage
const Tail = require('eth-transaction-tail')
const tail = new Tail(ipcUrl, {
confirmations: 10, // require this many confirmations
depositFactory: '0x...',
async depositDeployed (event) {
// deposit is deployed
},
async filter (toAddr, erc20address) {
return isInterestingAddress(toAddr)
},
async transaction (transaction) {
console.log('found this transaction', transaction)
},
async deposit (event) {
console.log('found this deposit event')
},
async erc20 (event) {
console.log('found this erc20 transfer event')
}
async checkpoint (since) {
// store this since so you can restart from here
},
since: seq
})
// tail.index is the current block index
await tail.start() // start tailing, will throw if an error is hit
const head = await tail.head({
transaction (transaction) {
console.log('transaction with 0 confirms', transaction)
}
})
await head.start()
// only track txs on a specific addr
head.track(addr, function ontx (tx, confirms, blk) {
...
head.untrack(addr) // to stop
})
4.5.2
4 years ago
4.5.1
4 years ago
4.5.0
4 years ago
4.4.0
5 years ago
4.3.1
5 years ago
4.3.0
5 years ago
4.2.1
5 years ago
4.2.0
5 years ago
4.1.0
5 years ago
4.0.5
5 years ago
4.0.4
5 years ago
4.0.1
5 years ago
4.0.3
5 years ago
4.0.2
5 years ago
4.0.0
5 years ago
3.1.3
5 years ago
3.1.2
5 years ago
3.1.1
5 years ago
3.1.0
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.1.0
5 years ago
2.0.0
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago