Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

electrum-host-parse

you2197912MIT0.1.1TypeScript support: included

electrum peer string parser

electrum, bitcoin

readme

node-electrum-host-parse

NPM
Build Status Coverage Status

electrum peer string parser

spec

install

npm i electrum-host-parse

usage

  • jscode
const parse = require('electrum-host-parse')
const hostobject = parse.parsePeerString("electrum-mona.bitbank.cc s50002 t50001")
console.log(hostobject)
  • typescript
import * as parse from 'electrum-host-parse'
const hostobject = parse.parsePeerString("electrum-mona.bitbank.cc s50002 t50001")
console.log(hostobject)
  • result
{ host: 'electrum-mona.bitbank.cc',
  ssl: 50002,
  tcp: 50001,
  pruning: null,
  http: null,
  https: null }