Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/you21979/node-electrum-host-parse
electrum peer string parser
https://github.com/you21979/node-electrum-host-parse
bitcoin electrum
Last synced: about 2 months ago
JSON representation
electrum peer string parser
- Host: GitHub
- URL: https://github.com/you21979/node-electrum-host-parse
- Owner: you21979
- License: mit
- Created: 2017-10-30T09:10:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-13T13:46:27.000Z (over 6 years ago)
- Last Synced: 2024-11-07T16:17:42.927Z (about 2 months ago)
- Topics: bitcoin, electrum
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-electrum-host-parse
[![NPM](https://nodei.co/npm/electrum-host-parse.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/electrum-host-parse)
[![Build Status](https://secure.travis-ci.org/you21979/node-electrum-host-parse.png?branch=master)](https://travis-ci.org/you21979/node-electrum-host-parse)
[![Coverage Status](https://coveralls.io/repos/github/you21979/node-electrum-host-parse/badge.svg?branch=master)](https://coveralls.io/github/you21979/node-electrum-host-parse?branch=master)electrum peer string parser
## spec
* http://docs.electrum.org/en/latest/protocol.html#server-peers-subscribe
## 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 }
```