-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcoins.js
87 lines (87 loc) · 1.94 KB
/
coins.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
var SATOSHI_CONST = 100000000
var coins = {
BTC: {
name: 'Bitcoin',
code: 'BTC',
symbol: '฿',
api: {
url: 'https://blockchain.info/q/addressbalance/{address}',
getUnits: (data) => data / SATOSHI_CONST,
},
},
BCH: {
name: 'Bitcoin Cash',
code: 'BCH',
symbol: '฿',
api: {
url: 'https://rest.bitcoin.com/v2/address/details/{address}',
getUnits: (data) => data.balance,
},
},
DOGE: {
name: 'Dogecoin',
code: 'DOGE',
symbol: 'Ð',
api: {
url: 'https://dogechain.info/api/v1/address/balance/{address}',
getUnits: (data) => parseFloat(data.balance),
},
},
MONA: {
name: 'MonaCoin',
code: 'MONA',
symbol: 'M',
api: {
url: 'https://mona.chainsight.info/api/addr/{address}?noTxList=1',
getUnits: (data) => data.balance,
},
},
LTC: {
name: 'Litecoin',
code: 'LTC',
symbol: 'Ł',
api: {
url: 'https://api.blockcypher.com/v1/ltc/main/addrs/{address}',
getUnits: (data) => data.balance / SATOSHI_CONST,
},
},
DASH: {
name: 'Dash',
code: 'DASH',
symbol: 'D',
api: {
url: 'https://api.blockcypher.com/v1/dash/main/addrs/{address}',
getUnits: (data) => data.balance / SATOSHI_CONST,
},
},
/*NMC: {
name: 'Namecoin',
code: 'NMC',
symbol: 'ℕ',
api: {
proxy: true,
url: 'http://namecoin.webbtc.com/address/{address}.json',
callback: function (data) {
return data.balance / SATOSHI_CONST
},
},
},*/
PPC: {
name: 'Peercoin',
code: 'PPC',
symbol: 'Ᵽ',
api: {
url: 'https://chainz.cryptoid.info/ppc/api.dws?a={address}&q=getbalance',
getUnits: (data) => parseFloat(data),
},
},
BLK: {
name: 'BlackCoin',
code: 'BLK',
symbol: 'B',
api: {
url: 'https://chainz.cryptoid.info/blk/api.dws?a={address}&q=getbalance',
getUnits: (data) => parseFloat(data),
},
},
}