ionic3 验证比特币,以太坊,莱特币和其他流行的加密货币地址

Posted wupeng88

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ionic3 验证比特币,以太坊,莱特币和其他流行的加密货币地址相关的知识,希望对你有一定的参考价值。

Install

??? npm install cryptaddress-validator
ionic3 中的引入
import * as cryptaddress from ‘cryptaddress-validator‘;
node 引入
const cryptaddress = require(cryptaddress-validator‘);
cryptaddress().test(1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55‘)
//=> true

cryptaddress(eth‘).test(0x281055afc982d96fab65b3a49cac8b878184cb16‘)
//=> true

cryptaddress(btc‘).test(1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp‘)
//=> true

cryptaddress(bch‘).test(LQL9pVH1LsMfKwt82Y2wGhNGkrjF8vwUst‘)
//=> false

cryptaddress(md5‘).test(0x281055afc982d96fab65b3a49cac8b878184cb16‘)

 





以上是关于ionic3 验证比特币,以太坊,莱特币和其他流行的加密货币地址的主要内容,如果未能解决你的问题,请参考以下文章