0.0.41 • Published 4 years ago

coin-clustering v0.0.41

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

CoinClustering

Address clustering for bitcoin based cryptocurrencies

Under construction!

Prerequisites

Node and NPM

Bitcoin core or API compatible client such as Litecoin core or Dash core

bitcoin.conf / dash.conf / litecoin.conf...

server=1
txindex=1
rest=1
rpcuser=[your username]
rpcpassword=[your password]

Installation

  1. npm install -g coin-clustering
  2. Create a new directory, for example 'BitcoinClustering'
  3. Navigate to the directory and create a new file "config.js"
  4. Edit config.js according to the below example. Altcoin excamples can be found here.
let config = {
  protocol: 'http',
  user: '[rpcuser from bitcoin.conf]',
  pass: '[rpcpassword from bitcoin.conf]',
  host: '127.0.0.1',
  port: 8332,
  listen_port: 3006,
  pubkeyhash: 0x00,
  scripthash: 0x05,
  segwitprefix: "bc",
  dbcache: 3000
};

module.exports = config; 
  1. run coin-clustering in the same directory with config.js

Indexing the bitcoin blockchain can take more or less than a week depending on your hardware. Most altcoins should take much shorter.

HTTP API

Clusters

Query parameters

  • gt, gte, lt, lte (optional) = balanceSats / balanceSats-clusterId
  • reverse (optional) = true/false, defalt: false
  • limit (optional) = integer (0...1000), defalt: 100

Example

Request

/clusters?limit=3&reverse=true&lte=10000000000000

Response

[
  {
    "clusterId": 17034506,
    "balance": 9816291286270
  },
  {
    "clusterId": 388710763,
    "balance": 8594734769541
  },
  {
    "clusterId": 421208391,
    "balance": 8366430196393
  }
]

Example

Request

/clusters/17034506/summary

Response

{
  "balance": 9816291286270,
  "firstTransaction": {
    "txid": "2cdce8e3758f9a94975c0b3e1c55729312980cffa0471acfce4d2d308a16b381",
    "height": 256893,
    "n": 4
  },
  "lastTransaction": {
    "txid": "76d4119daa59769f4d694cca9feb1123ebf026e3640ed4ba438c044c809285d8",
    "height": 565263,
    "n": 232
  },
  "addressCount": 114458
}

Query parameters

  • gt, gte, lt, lte (optional)
  • reverse (optional) = true/false, defalt: false
  • limit (optional) = integer (0...1000), defalt: 100
  • include-delta (optional) = true/false, defalt: false

Example

Request

/clusters/17034506/transactions?limit=3&reverse=true&include-delta=true

Response

[
  {
    "txid": "76d4119daa59769f4d694cca9feb1123ebf026e3640ed4ba438c044c809285d8",
    "height": 565263,
    "n": 232,
    "delta": 95712
  },
  {
    "txid": "55ceaaf9ed5ebf96abed887223a8044afa93119043038321a3d17b982c4337ce",
    "height": 565262,
    "n": 967,
    "delta": 97234
  },
  {
    "txid": "a3f9982bb76d42cc8f68afd12a9a11c6122a30e71ee57cdbd52af767069755e9",
    "height": 563671,
    "n": 571,
    "delta": 615000
  }
]

Query parameters

  • gt, gte, lt, lte (optional)
  • reverse (optional) = true/false, defalt: false
  • limit (optional) = integer (0...1000), defalt: 100

Example

Request

/clusters/17034506/addresses?limit=3&reverse=true

Response

[
  {
    "balance": 2322761515776,
    "address": "1AnwDVbwsLBVwRfqN2x9Eo4YEJSPXo2cwG"
  },
  {
    "balance": 2221116525338,
    "address": "14eQD1QQb8QFVG8YFwGz7skyzsvBLWLwJS"
  },
  {
    "balance": 970712966598,
    "address": "1Kd6zLb9iAjcrgq8HzWnoWNVLYYWjp3swA"
  }
]

Addresses

/addresses/1AnwDVbwsLBVwRfqN2x9Eo4YEJSPXo2cwG/cluster_id

17034506

Query parameters

  • gt, gte, lt, lte (optional)
  • reverse (optional) = true/false, defalt: false
  • limit (optional) = integer (0...1000), defalt: 100

Transactions

Miscellaneous

Limitations

Stays 10 blocks behind the latest block to avoid having to deal with blockchain reorganizations.

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago