A tiny Nano wallet, focused on ease of use through simplicity

Overview

atto is a tiny Nano wallet, which focuses on ease of use through simplicity.

Disclaimer: I am no cryptographer and atto has not been audited. I cannot guarantee that atto is free of security compromising bugs.

Installation

I recommend building atto yourself, but you can also download precompiled binaries from the releases page. Building atto yourself works like this; go 1.15 or higher is required:

git clone 'https://github.com/codesoap/atto.git'
cd atto
go build
# The atto binary is now available at ./atto.
# You could also install to ~/go/bin/ by executing "go install".

Usage

$ # The new command generates a new seed.
$ atto new
D420296F5FEF486175FAA8F649DED00A5B0A096DB8D03972937542C51A7F296C
$ # Store it in your password manager:
$ pass insert nano
Enter password for nano: D420296F5FEF486175FAA8F649DED00A5B0A096DB8D03972937542C51A7F296C
Retype password for nano: D420296F5FEF486175FAA8F649DED00A5B0A096DB8D03972937542C51A7F296C

$ # The address command shows the address for a seed and account index.
$ pass nano | atto address
nano_3cyb3rwp5ba47t5jdzm5o7apeduppsgzw8ockn1dqt4xcqgapta6gh5htnnh

$ # The balance command will receive pending funds automatically.
$ pass nano | atto balance
Creating receive block for 1.025 from nano_34ymtnmhwseiex4eqf7nnf5wcyg44kknuuen5wwurm18ma91msf6e1pqo8hx... done
Creating receive block for 0.100 from nano_39nd8eksw1ia6aokn96z4uthocke47hfsx9gr31othm1nrfwnzmmaeehiccq... done
1.337 NANO

$ # Choosing a representative is important for keeping the network
$ # decentralized.
$ pass nano | atto representative nano_1jr699mk1fi6mxy1y76fmuyf3dgms8s5pzcsge5cyt1az93x4n18uxjenx93
Creating change block... done

$ # To avoid accidental loss of funds, the send command requires
$ # confirmation, unless the -y flag is given:
$ pass nano | atto send 0.1 nano_11zdqnjpisos53uighoaw95satm4ptdruck7xujbjcs44pbkkbw1h3zomns5
Send 0.1 NANO to nano_11zdqnjpisos53uighoaw95satm4ptdruck7xujbjcs44pbkkbw1h3zomns5? [y/N]: y
Creating send block... done

$ atto -h
Usage:
	atto n[ew]
	atto [-a ACCOUNT_INDEX] a[ddress]
	atto [-a ACCOUNT_INDEX] b[alance]
	atto [-a ACCOUNT_INDEX] r[epresentative] REPRESENTATIVE
	atto [-a ACCOUNT_INDEX] [-y] s[end] AMOUNT RECEIVER

The new subcommand generates a new seed, which can later be used with
the other subcommands.

The address, balance, representative and send subcommands expect a seed
as as the first line of their standard input. Showing the first address
of a newly generated key could work like this:
atto new | tee seed.txt | atto address

The send subcommand also expects manual confirmation of the transaction,
unless the -y flag is given.

The address subcommand displays addresses for a seed, the balance
subcommand receives pending sends and shows the balance of an account,
the representative subcommand changes the account's representative and
the send subcommand sends funds to an address.

ACCOUNT_INDEX is an optional parameter, which must be a number between 0
and 4,294,967,295. It allows you to use multiple accounts derived from
the same seed. By default the account with index 0 is chosen.

Technical details

atto is written with less than 1000 lines of code and uses minimal external dependencies. This makes it easy to audit the code yourself and ensure, that it does nothing you wouldn't want it to do.

To change some defaults, take a look at config.go.

Signatures are created without the help of a node, to avoid your seed or private keys being stolen by a node operator. The received account info is always validated using block signatures to ensure the node operator cannot manipulate atto by, for example, reporting wrong balances.

atto does not have any persistance and writes nothing to your file system. This makes atto very portable, but also means, that no history is stored locally. I recommend using a service like https://nanocrawler.cc/ to investigate transaction history.

Donations

If you want to show your appreciation for atto, you can donate to me at nano_1i7wsbehgwhxct91wpojr1j588ydikd64uc7p3kj54nofqioc6ydjopezf13.

Comments
  • [Feature Request] doRPC Basic Auth

    [Feature Request] doRPC Basic Auth

    I am still new to Golang, although I was able to verify that atto is compatiable with using BasicAuth. BasicAuth is useful when your specified node is using NanoRPCProxy along with basic authentication.

    I will open this issue request in the unlikely event I am unable to modify the source code in a way that is Pull Request worthy.

    Example modified code (var is specified in function, but needs to be moved to config.go):

    func doRPC(requestBody, node string) (responseBytes []byte, err error) {
    	//resp, err := http.Post(node, "application/json", strings.NewReader(requestBody))
    	client := &http.Client{}
    	req, err := http.NewRequest("POST", node, strings.NewReader(requestBody))
    	req.Header.Set("Content-Type", "application/json")
    	
    	var nodeBasicAuth = "exampleUsername1:examplePassword1"
    	if nodeBasicAuth != "" {
    		nodeBasicAuthSplit := strings.Split(nodeBasicAuth, ":")
    		if len(nodeBasicAuthSplit) >= 2 {
    			if nodeBasicAuthSplit[0] != "" && nodeBasicAuthSplit[1] != "" {
    				req.SetBasicAuth(nodeBasicAuthSplit[0], nodeBasicAuthSplit[1])
    			}
    		}
    	}
    	
    	resp, err := client.Do(req)
    	if err != nil {
    		return
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != 200 {
    		err = fmt.Errorf("received unexpected HTTP return code %d", resp.StatusCode)
    		return
    	}
    	return ioutil.ReadAll(resp.Body)
    }
    

    The eventual goal is to be able to specify "nodeBasicAuth" in the config,go:

    var (
           --SNIP--
    
    	//If RPC uses Basic Auth (leave blank if none). Use format: "Username:Password"
    	//nodeBasicAuth = ""
    	nodeBasicAuth = "exampleUsername1:examplePassword1"
    
    opened by Gigaion 9
  • Private Key Confusion

    Private Key Confusion

    Atto only works with seeds. To test something I threw a private key for a specific address at it, and instead of errors, it generates a random address (which is not the one to the private key). I'm concerned this behavior will cause people to lose funds eventually.

    Any way to fix this, or to get it working with private keys properly?

    opened by zQueal 7
  • Separate work_generate from var node. work_generate now uses node specified in var nodeWork.

    Separate work_generate from var node. work_generate now uses node specified in var nodeWork.

    Separate work_generate from var node. work_generate now uses node specified in var nodeWork.

    This allows you to specify a different node that has work_generate ability.

    This is useful if you have a faster RPC node that is more powerful, but lacks the ability to do work_generate.

    Optionally you can just use the same node URL on both vars if you prefer using the same node.

    opened by Gigaion 6
  • Can't see enough decimals

    Can't see enough decimals

    I typically work with small amounts of nano, so there are a lot of 0's e.g. 0.0000283 NANO.

    Your script is great but only provides up to 3 decimal points of resolution. This means sometimes my account has some nano but I don't know if it actually does AND I don't know how much there is. I just guess which is annoying.

    Can you allow for an optional flag that specifies the number of decimal places to display the account balances to? 3 is a good default but it's nice to have more.

    Example usage: atto -a 4 b 10 atto - 4th account - balance - display balance to 10 dp

    opened by xerobia-test 6
  • error cheking the balance of the account

    error cheking the balance of the account

    when i write pass nano | atto balance on the console it returns Error: received unexpected HTTP return code 500. I've used nault.cc to test if the problen was with my account but it works perfectly, so the problem is with atto. Please fix this issue.

    opened by el-cartas 3
  • Error: account has not yet been opened

    Error: account has not yet been opened

    In the previous version, when I deposited some nano in a new account and then did atto -a 2 b, this would create a receive block for me to get those funds.

    Now, when I do that, it spits out "Error: account has not yet been opened"

    opened by xerobia-test 2
  • nothing seems to happen, no console output...

    nothing seems to happen, no console output...

    I've used the wallet a year or so ago. Just git pulled master branch and go build ./cmd/atto, but still:

    #> ./atto -b
    

    nothing happens for many minutes

    isn't there a debug flag I can set to see what's going on or where it might hang?

    Feels like network trouble, but I can reach https://proxy.nanos.cc/proxy

    opened by molecular 1
  • Atto Mixer

    Atto Mixer

    Was thinking about NANO privacy and I think atto could really help. I'm sure you're not really interested, but I figured I'd pitch the idea regardless.

    echo $seed$ | atto mix -a 1 $amount -m $count $new_seed

    Using $seed and using $amount of NANO from -a 1 split the $amount into random quantities and mix them between -m $count addresses from the seed.

    So basically;

    echo $seed | atto mix -a 1 10 -m 20 $new_seed

    Would split the 10 NANO from account index 1 of $seed into random amounts (or just $amount / $addresses), and then shoot that balance around a bit between these 20 new addresses, and finally sweeping the total balance (10 NANO) into account index 0 of $new_seed. This way it makes it far far far more difficult to discern from where the funds initially came from. $new_seed could even be the same seed, mixing the balance from -m 1 into -m 0.

    Or something to that effect. Doesn't really have to be that complicated. I know this really goes outside of what you want atto to do, but I feel like it could really help the community and something which is requested with more and more frequency. Let me know what you think.

    opened by zQueal 1
  • BIP39 Mnemonic Creation

    BIP39 Mnemonic Creation

    Looks like its possible to generate a BIP39 Mnemonic from a 64 character NANO seed: https://github.com/Joohansson/keytools/blob/master/src/tools/SeedTool.js

    Would love to see this added to atto.

    opened by zQueal 1
  • Flag to Use Non-Default Node

    Flag to Use Non-Default Node

    Changing the node for atto can be a little weird to do. Recompiling just to change the node kind of limits atto in a few ways. Adding a --node flag would override the default node in config.go without recompiling it, or changing it forever.

    Especially useful for periods of downtime;

    echo $SEED | atto --node "https://rainstorm.city/api" -a 0 balance
    

    Check the balance of apex index from $SEED using the rainstorm.city node, overwriting the default https://proxy.powernode.cc/proxy.

    I think it could be very useful. Any thoughts?

    opened by zQueal 5
  • [Feature Request] Add ability to specify a separate work server node

    [Feature Request] Add ability to specify a separate work server node

    In some scenarios two nodes will exist, one dedicated to work generation and another for the ledger.

    Example scenario:

    • Home node with power GPU (work generation node)
    • Small stable node in an expensive datacenter with no GPU (Ledger node)

    This is useful if you have a faster RPC node that is more powerful, but lacks the ability to do work_generate.

    To back this idea, Nano's white paper specifically mentions this as best practice:

    https://docs.nano.org/integration-guides/work-generation/#choosing-a-machine Using a separate machine to manage work generation is recommended where possible.

    You may refer to this previous pull request (Which instead can be improved upon by allowing specifying EXPORT example_url or flags): https://github.com/codesoap/atto/pull/11 This feature will also need to tie into the existing feature request for doRPC Basic Auth ( https://github.com/codesoap/atto/issues/10 )

    Figured since you've acknowledged recently that Joohansson's NanoRPCProxy is used a lot by the community, that this previous idea may be reconsidered.

    opened by Gigaion 1
Releases(v1.5.0)
Owner
Richard Ulmer
Richard Ulmer
fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

null 502 Nov 27, 2022
Modern YouTube converter, that combines simplicity and effectiveness

Modern YouTube converter, that combines simplicity and effectiveness. How to use it? Go to TubeConv.com Paste a link to a video, or use the search bar

Qiu 3 Jul 25, 2022
A Nano ID command line (CLI) tool implemented in Go.

Nano ID CLI The Nano ID CLI is a command line tool for generating Nano IDs. With Nano ID CLI you can quickly generate one or more Nano ID strings of a

Handle 2 Nov 15, 2022
GDScript Syntax Highlighting in GNU Nano

nano-gdscript GDScript Syntax Highlighting in GNU Nano. Updated regularly every minor updates. Contributions are welcomed Installation This is 100% fr

null 0 Jun 25, 2021
Nano API Implementation in Golang

nanoapi Nano API Implementation in GO TL;DR The idea is to create a very simple

Digital Circle 2 Jan 9, 2022
An implementation of the Nano cryptocurrency protocol in golang

Go Nano An implementation of the Nano protocol written from scratch in Go (golang). About the Project A crypto currency has to be resilient to survive

Frank Hamand 68 Mar 21, 2022
Vanity address generator for Nano

Nano Vanity Generator A basic vanity address generator for the Nano cryptocurrency. What is a vanity address? A vanity address is an address that cont

Frank Hamand 37 Feb 6, 2022
A twitch focused command line tool for producing, archiving and managing live stream content. Built for Linux.

twinx is a live-streaming command line tool for Linux. It connects streaming services (like Twitch, OBS and YouTube) together via a common title and description.

Kris Nóva 26 Oct 17, 2022
K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative.

K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative. N

Ahmed Abdalla Abdelrehim 0 Feb 14, 2022
A simple tool which you can use to move through your directories from the command line

Fe What is Fe ? Fe is a simple tool which you can use to move through your direc

Pranav Baburaj 8 Jan 1, 2022
CLI client for docat, Manage your docat documentation with ease.

docatl, the docat cli Manage your docat documentation with ease. Getting Started Download the latest Release binary for your platform and start pushin

null 12 Nov 10, 2022
Start Go command line apps with ease

Start Start Go command line apps with ease Executive Summary The start package for Go provides two basic features for command line applications: Read

Christoph Berger 15 Oct 29, 2021
ls Xtended : A command line utility which lets you navigate through terminal like a pro 😎.

Navigate through terminal like a pro ?? ?? Demo • ⚗️ Installation • ?? Contribution • ❗ Known Issues ❓ Why? It's a pain to cd and ls multiple times to

Souvik 166 Nov 25, 2022
CLI for publishing/receiving CloudEvent messages through NATS

cenats CLI for publishing/receiving CloudEvent messages through NATS Use Case cenats is designed to make testing services that generate or consume eve

null 0 Nov 5, 2021
Simple CLI util for running OCR on images through PERO OCR API

pero_ocr Simple CLI util for running OCR on images through PERO OCR API Usage: Usage of batch_pero_ocr: -c string cancel request with given

Moravian Library in Brno 2 Dec 1, 2021
vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI

vkectl Introduction vkectl is a tool to manage VKE(VolcanoEngine Kubernetes Engine) resources through a CLI(Command Line Interface). It is written in

Volcengine 30 Aug 26, 2022
A command-line interface for the Riak database through its HTTP API

Riakg Description Is a development oriented command line tool that enables navigation on buckets, keys and values of a Riak KV data store using it's H

cristian 4 May 10, 2022
Vfkit - Simple command line tool to start VMs through virtualization framework

vfkit - Simple command line tool to start VMs through virtualization framework v

Christophe Fergeau 1 Oct 21, 2022
A tiny "sandbox" to run untrusted code 🏖️

Sandy A tiny sandbox to run untrusted code. ??️ Sandy uses Ptrace to hook into READ syscalls, giving you the option to accept or deny syscalls before

Craig Mulligan 338 Nov 14, 2022