1.1.11 • Published 5 years ago

eth-token-tracker v1.1.11

Weekly downloads
272
License
ISC
Repository
github
Last release
5 years ago

Eth Token Tracker CircleCI

A JS module for tracking Ethereum tokens and their values over time.

Installation

npm install eth-token-tracker -S

Usage

const TokenTracker = require('eth-token-tracker')

var tokenTracker = new TokenTracker({

  userAddress: addresses[0], // whose balance to track
  provider,                  // a web3-style provider
  pollingInterval: 4000,     // block polling interval (optional)

  // Tell it about the tokens to track:
  tokens: [
    {
      address: tokenAddress,
    }
  ],
})

// You can use this method to check the state of the tokens
var balances = tokenTracker.serialize()

// You can also subscribe to updates
tokenTracker.on('update', function (balances) {
  console.log(`Your balance of ${balances[0].symbol} is ${balances[0].string}`)
})

// You can add additional tokens after initialization:
tokenTracker.add({ address: otherTokenAddress })

// Make sure to clean up, or it will hold a reference:
tokenTracker.stop()
1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago