Coder Social home page Coder Social logo

aklaud-code / natrium-wallet-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appditto/natrium-wallet-server

0.0 0.0 0.0 501 KB

Backend for the Natrium NANO Mobile Wallets

License: MIT License

Shell 0.04% Go 99.83% Dockerfile 0.13%

natrium-wallet-server's Introduction

Release GitHub go.mod Go version License CI

Natrium + Kalium Server

The server that powers the Natrium and Kalium applications.

What is Natrium, Kalium, NANO, BANANO?

Natrium and Kalium are mobile wallets written with Flutter. NANO and BANANO are cryptocurrencies.

Link Description
natrium.io Natrium Homepage
kalium.banano.cc Kalium Homepage
appditto.com Appditto Homepage

Requirements

GOLang

Install the latest version of GO

NANO/BANANO Node with RPC enabled.

Configured by the environment variable RPC_URL and NODE_WS_URL

e.g.

export RPC_URL=http://localhost:7076
export NODE_WS_URL=ws://localhost:7078

Redis server

Configured with env variables:

REDIS_HOST  # default localhost
REDIST_PORT # default 6379
REDIS_DB    # default 0

PostgreSQL

Configured with:

DB_HOST # The host of the database
DB_PORT # The port to connect to on the database
DB_NAME # The name of the database
DB_USER # The user
DB_PASS # The password

Other Configuration

FCM_API_KEY # For push notifications
BPOW_KEY    # To use BoomPoW for work generation

Running

Compile with go build -o natrium-server

Then run ./natrium-server or ./natrium-server -banano for banano mode.

Work Generation

Configuring a service for work is required. You have two options.

  • WORK_URL can be set in the environment to a work server (either the same as RPC_URL) or something like nano-work-server
  • BPOW_KEY can be set in the environment to use BoomPoW, BANANO's distributed proof of work system.

If both are set, BPOW will be preferred, followed by WORK_URL in the event of failure.

You can also override BPOW_URL, you would never want to do this, unless you are using a forked or self-hosted version of the service.

Callback

The HTTP callback is required for push notifications. This can be configured in the node's config.json as follows:

"callback_address": "::ffff:127.0.0.1",
"callback_port": "3000",
"callback_target": "\/callback",

The websocket on the node is used for other types of notifications, like for connected clients.

This is only so the app can easily be deployed with multiple replicas in production, we want only 1 instance to send push notifications at a time.

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.