Skip to content

Joohansson/nano-wallet

master
Switch branches/tags
Code
This branch is 94 commits ahead, 12 commits behind linuxserver:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LSIO Nano Wallet

LinuxServer Nano Wallet

Demo

To try this wallet please access Discord and use the #faucet channel to get funds. Those can be used on our public network:

https://wallet.linuxserver.io/#/nano.linuxserver.io

Intro

This project has some core goals that are very different from a conventional CryptoCurrency wallet:

  • Ability to hook into a user defined network
  • Interact with a raw Nano RPC endpoint without middleware
  • No live info feeds for transactions (websockets), data is loaded from remote statically and the user needs to manually refresh
  • Completely clientside and run in any web browser with no server requirements (even object storage)
  • No browser/disk local storage used
  • provide block explorer functionality with the clientside wallet and publically clickable links

With these goals there are some tradeoffs from a functionality standpoint. One of the biggest being the "near instant" concept of using the Nano protocol are not as instant here. A user needs to manually refresh and manually recieve transactions on their end. Generating your Proof of work using browser javascript will generally be slower than using natively compiled crypto libs. The user will need to enter their private key every time they access their wallet and conduct transactions.

With that said, these design concepts greatly reduce the barrier of entry to a user of your network. The end user can simply access a web page, generate a wallet, and be off and running after they are sent funds.

Hosted wallet endpoints

The source code for this project is built transparently and published to Github pages at the following endpoints:

The URL paths for public block exploration are in the following format:

We also provide Point of Sale like functionality using the following format:

The Point of sale view is designed around the concept that you will be actively receiving funds during a transaction, and pocketing them later from a secure backend/terminal. It can be accessed by anyone and does not require credentials. You set the amount and a QR tag is generated from that amount. Once the amount is paid by a user from their phone/device the delivered transaction to that specific wallet you will trigger a success notification and the total owed will be cleared for the next transaction. Using this model it is important to not use duplicate wallets across different terminals or endpoints or your transactions during the receive window will conflict. It is important to note that the same functionality is available from the Receive menu with an opened unlocked wallet.

If this wallet is forked from this source and published elsewhere or to your own Github pages endpoint as laid out in the Customisation section of this document you should use the following URL formats:

In general this URL format is self documenting from the wallet interface as all of the links will use these endpoints in new windows to provide shareable public links.

Live Nano network addresses

We will list here Live Nano RPC provies that we add and how to use them.

api.nanos.cc

Does not requires an API key to use

mynano.ninja

Requires an API key to use: https://mynano.ninja/auth/login#apikey

For users

We recommend end users looking to locally host this wallet themselves use the Docker container located here it is a simple nginx wrapper for the built code from this repository.

Run example:

docker run -d \
  --name=nano-wallet \
  -p 80:80 \
  --restart unless-stopped \
  linuxserver/nano-wallet

Then access http://localhost/#/YOUR_RPC_ENDPOINT .

This wallet was designed around the software stack described here, and specifically our Nano Node image with a firewall to allow default wallet RPC calls here.

Customisation

If you want to lock the wallet to a specific RPC server then go to src/stores/app/state.js and change changeaddress to false, the node will then be locked to the node details directly beneath (only change the settings node details not the main node details).

From there basic branding would be to modify the site title found in .env and swap out our QR code icon at /public/qr_logo.png and public/wallet_logo.png for the paper wallet, we have specifically made efforts to not brand this wallet to our codebase or organization to allow anyone with a public RPC endpoint to also host this wallet themselves and have their users use it as a wallet and block explorer.

Currently statically set RPC endpoints allowing users to simply access https://wallet.yourdomain.com and be off and transacting require that the block_count RPC action is whitelisted by your RPC servers, it is used on connect to ensure the RPC server is healthy. You can also optionally setup multiple RPC servers to fall back on in case of downtime by defining multiple in the src/stores/app/state.js array for node.

If you want to support scanning of NFC tags from your web wallet please note that because the Chrome support for Web NFC is currently in an experimental stage you will need to register an origin token here:

https://developers.chrome.com/origintrials/#/view_trial/236438980436951041

And set the token in .env to the one for your own Domain. Keep in mind this will only function on Andoid with Chrome on a device that supports NFC.

Hosting your forked repo from Github Pages

If you are planning on hosting this wallet on your domain pointed to your RPC servers, for transparency it is likely best to fork this repo and publish it using Github Pages . Here are the basic steps to follow to achieve that:

  1. Fork this repo into your namespace in Github
  2. In your repo under Actions click to enable actions on your fork
  3. In your repo main settings enable Github pages and set your custom domain
  4. Generate an API key following the instructions here, you will need to select the repo permissions
  5. Set this API key in your repo settings under Secrets as ACCESS_TOKEN this key is needed to publish changes to the gh-pages branch of your repo
  6. Push your customizations to your repo on the master branch, this should trigger a build of the site and push to the gh-pages branch using the logic located here
  7. When built the wallet will be available at the endpoint you defined pointed to your RPC servers given you have the DNS properly setup as described here

From here you can ingest upstream changes from this repo when needed and customize it to your needs while Github deploys your site on updates to their hosted CDN.

Building from source and development

The frontend framework for this project is vuejs below are the commands used to build this project from source and run a local development environment. We highly reccomending using vuejs-devtools locally to inspect and debug.

This project's core logic for performing Nano transactions uses nanocurrency-js please take time to review their calls along with general RPC interaction with a Nano node here.

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

About

Forked Linux Nano web wallet to work on the Main network. Branded as the TIX Wallet

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 79.4%
  • JavaScript 18.8%
  • HTML 1.4%
  • Other 0.4%