# nanoconnect

> ## What is it

Latest version **0.0.18** (published 2020-05-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install nanoconnect
pnpm add nanoconnect
yarn add nanoconnect
bun add nanoconnect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.18 |
| Published | 2020-05-25 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | napama |

## Links

- npm: https://www.npmjs.com/package/nanoconnect
- Repository: https://github.com/brendena/NanoConnect
- Homepage: https://github.com/brendena/NanoConnect#readme
- Issues: https://github.com/brendena/NanoConnect/issues
- npm.io page: https://npm.io/package/nanoconnect

## Dependencies (9)

- [wrtc](https://npm.io/package/wrtc.md) ^0.4.4
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [install](https://npm.io/package/install.md) ^0.13.0
- [save-dev](https://npm.io/package/save-dev.md) 0.0.1-security
- [magnet-uri](https://npm.io/package/magnet-uri.md) ^5.2.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.9.6
- [buffer-json](https://npm.io/package/buffer-json.md) ^2.0.0
- [bittorrent-tracker](https://npm.io/package/bittorrent-tracker.md) ^9.14.5
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.8.3

## Recent versions

- 0.0.18 (latest) — 2020-05-25
- 0.0.17 — 2020-05-25
- 0.0.16 — 2020-05-24
- 0.0.15 — 2020-05-19
- 0.0.14 — 2020-05-17
- 0.0.13 — 2020-05-16
- 0.0.12 — 2020-05-15
- 0.0.11 — 2020-05-15
- 0.0.10 — 2020-05-15
- 0.0.9 — 2020-05-15
- 0.0.8 — 2020-05-15
- 0.0.7 — 2020-05-14
- 0.0.4 — 2020-05-14
- 0.0.3 — 2020-05-13
- 0.0.2 — 2020-05-13
- … 1 more at https://npm.io/package/nanoconnect/versions

## README

# Nano Connect

## What is it

Nano Connect is a relay server that allows you to use the RPC server from a browser or from a terminal without any costs.  



## How it works
It works by having people run a Nano Node and a Nano Connect server.  The Nano Connect server is listening on many WebRTC ports and is discovered by seeding itself on the Bittorrent network.  People find your Nano Server by connecting to the Bittorent tracker and asking for a peer.  Once you've connected to a peer(A Nano Connect Server) you disconnect from the bittorent tracker and you then send your RPC commands to the Nano Connect Server and it will relay them to the Nano Node. 

![How Nano Connect works](./images/HowItWorks.svg)


## Goal 

To make accessing a Nano Node completely free by allowing people to run a Nano client that can have a intermediate connection. Think folding@home but for Nano.

## Getting started
### 1. Getting a node started
```bash
# main totorial
# https://docs.nano.org/running-a-node/node-setup/

# First you have to get nano docker container
docker pull nanocurrency/nano

# Then run the network
docker run --restart=unless-stopped -d \
  -p 7075:7075/udp \
  -p 7075:7075 \
  -p [::1]:7076:7076 \
  -p [::1]:7078:7078 \
  -v ${NANO_HOST_FOLDER}:/root \ #This folder will hold a VM's data
  --name nano_server \
  nanocurrency/nano:latest 

# Then your going to have to wait for the server to fully bootstrap itself.
```

### 2. Running 

```bash
# install dependencies
npm install

# start the server
node ./examples/serverExample.js

```


## Debug

### Logs
Turn on with node logging with DEBUG=NSindexInfo,NSindexError node ./examples/serverExample.js
* NSIndexInfo #stands for NanoClientIndexInfo
* NSIndexError
* NSindexInfo  
* NSindexError

### start own bittorent-tracker 
~~~bash
bittorrent-tracker
# ws://localhost:8000
~~~

### Librarys Fundimental to make this work.
* [nano-node-rpc](https://github.com/BitDesert/nano-node-rpc)
* [bittorrent-tracker](https://github.com/webtorrent/bittorrent-tracker)
* [yargs](https://github.com/yargs/yargs)

---
_Source: https://npm.io/package/nanoconnect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
