Detect which cryptocurrency an address corresponds to.
~ ❯❯❯ npm install cryptocurrency-address-detector
const addressDetect = require('cryptocurrency-address-detector');
addressDetect('0x281055afc982d96fab65b3a49cac8b878184cb16').then(cryptocurrency => {
console.log(cryptocurrency);
//=> 'ETH'
});
addressDetect('1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp').then(cryptocurrency => {
console.log(cryptocurrency);
//=> 'BTC/BCH'
});
addressDetect('LQL9pVH1LsMfKwt82Y2wGhNGkrjF8vwUst').then(cryptocurrency => {
console.log(cryptocurrency);
//=> 'LTC'
});
addressDetect('0xsfdlffsjksldfj[IPv6:2001:db8::2]').then(cryptocurrency => {
console.log(cryptocurrency);
//=> 'Cryptocurrency could not be detected'
});
Returns the cryptocurrency that an address corresponds to.
Type: string
Address to check for popular cryptocurrencies.
Type: number
Timeout in milliseconds after which a request is considered failed. Default: 5000
.
Bitcoin/BTC
Bitcoin Cash/BCH
Ethereum/ETH
Litecoin/LTC
Monero/XMR
Dash/DASH
Ripple/XRP
NEO/NEO
Dogecoin/DOGE
MIT © Nikolaos Kamarinakis