Giter Site home page Giter Site logo

byteball / obyte-hub Goto Github PK

View Code? Open in Web Editor NEW
19.0 11.0 24.0 171 KB

Hub for Obyte network

Home Page: https://obyte.org

License: MIT License

JavaScript 100.00%
dag directed-acyclic-graph dlt distributed-ledger-technology chat p2p p2p-network p2p-chat

obyte-hub's Introduction

Hub for Obyte network

This is a node for Obyte network that serves as relay, plus facilitates exchange of end-to-end encrypted messages among devices connected to Obyte network. The hub does not hold any private keys and cannot send payments itself.

The messages are used for the following purposes:

  • Convey private payment information from payer to payee.
  • Exchange partially signed transactions when sending from a multisig address. One of the devices initiates a transaction and signs it with its private key, then it sends the partially signed transaction to the other devices that participate on the multisig address, the user(s) confirm the transaction on the other devices, they sign and return the signatures to the initiator.
  • Multilateral signing, when several addresses sign the same unit, e.g. when exchanging one asset for another, or when signing a contract. The exchange of messages is similar to the multisig scenario above.
  • Plain text chat between users, in particular, users can send each other the newly generated addresses to receive payments to.
  • Plain text chat with bots that offer a service and can receive or send payments. Faucet is an example of such bot.

The hub helps deliver such messages when the recipient is temporarily offline or is behind NAT. If the recipient is connected, the message is delivered immediately, otherwise it is stored and delivered as soon as the recipient connects to the hub. As soon as delivered, the message is deleted from the hub.

Since all messages are encrypted with the recipient's key, the hub cannot read them.

Users set their hub address in their wallet settings. The default hub is wss://obyte.org/bb but users can change it to your hub address.

Install

Install node.js, clone the repository, then say

npm install

Set up a proxy, such as nginx, to forward all websocket connections on a specific path to your daemon running the hub code. See example configuration for nginx in ocore documentation.

Run

node start.js > log &

Customize

If you want to change any defaults, refer to the documentation of ocore, the core Obyte library require()'d from here.

Push notifications

Android

To enable push notifications for Android users of your hub you need to create a new project in Google Console https://console.developers.google.com and add Google Cloud Messaging API. In your hub's conf (conf.js or conf.json) add these two settings copied from the Google Console:

  • pushApiProjectNumber: get it from settings (under dots menu in the upper right)
  • pushApiKey: your API key

iOS

You need a private key generated by Obyte Team for you, key_id and team_id to communicate with APNS servers on behalf of Obyte app bundle, email us for ones: byteball at obyte.org, then configure your hub (conf.js or conf.json) to enable notifications.

  • APNsAuthKey : full path to .p8 private key file or set it directly to content of this private key file
  • keyId : key id, it is encoded in .p8 file name (AuthKey_6M3W3J9D8Y.p8 => key id will be 6M3W3J9D8Y)
  • teamId : team id, we will provide it in email along with private key file

obyte-hub's People

Contributors

1hyena avatar bytefan avatar kakysha avatar pollopollo-org avatar tarmo888 avatar taump avatar tonyofbyteball avatar xjenekx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obyte-hub's Issues

node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node not found

I run npm install got this error. How fix it?

> [email protected] install /Users/linyang/code/works/byteball-hub/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/Cellar/node/10.8.0/bin/node',
node-pre-gyp verb cli   '/Users/linyang/code/works/byteball-hub/node_modules/sqlite3/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/Users/linyang/code/works/byteball-hub/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v64-darwin-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v64-darwin-x64.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]
node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)

Error: no last ball in unit

when i restart my hub, the error came:
Error: no last ball in unit {"unit":"oj8yEksX9Ubq7lLc+p6F2uyHUuynugeVq4+ikT67X6E=","version":"1.0","alt":"1","headers_commission":2520,"payload_commission":5143,"main_chain_index":0,"timestamp":1518054278}

how to solve this problem?

how to create a hub from the very beginning

where is the initial data from?is it from the "exports.initial_peers "? i know the initial_peer is byteball.org for byteball, but if i want to create my own "byteball", how to build my own first hub? how to generate the genesis unit?

symbols.includes is not a function

symbols.includes is not a function

what wrong?
nodejs :5.12.0
OS :ubuntu 16.04 LTS

I installed dependencies, then run npm run hub , then prompted symbols.includes is not a function

Cannot start start.js??

I get the following error and cannot seem to get past it....

> [email protected] start /home/mitchell/Documents/byteball/byteball-hub
> node start.js

finished hub conf
merged app root conf from /home/mitchell/Documents/byteball/byteball-hub/conf.js
app dir /home/mitchell/Documents/byteball/byteball-hub
not using user conf: Error: Cannot find module '/home/mitchell/.config/byteball-hub/conf.json'
app dir /home/mitchell/Documents/byteball/byteball-hub
path=/home/mitchell/.config/byteball-hub/
createDatabaseIfNecessary byteball.sqlite
takeConnectionFromPool will wait for ready
Sat Apr 15 2017 02:16:09 GMT-0500 (CDT): takeConnectionFromPool will wait for ready
module.js:327
    throw err;
    ^

Error: Cannot find module 'byteballcore/network'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/mitchell/Documents/byteball/byteball-hub/start.js:5:15)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

Running Debian Sid. Any help would be great!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.