0.1.5 • Public • Published

Simple Nano Wallet JS

Simple nano wallet with in memory key managment.
Made by Nanswap Nodes - Hosted nodes provider


  • Easily send and receive nano with local signature
  • Use your own node or any node provider
  • Auto receive blocks of wallet accounts with websocket
  • Receive all receivable blocks for an account
  • Create wallet from seed or from random entropy
  • Create derived accounts
  • Suppport custom prefix & decimal for custom network such as Banano or DogeNano

Using npm

npm install simple-nano-wallet-js

Using yarn

yarn add simple-nano-wallet-js

Create new wallet

const { Wallet } = require('simple-nano-wallet-js');
const { wallet: walletLib} = require('multi-nano-web')

let seed = walletLib.generateLegacy().seed // save & backup it somewhere!
// initialize wallet
const wallet = new Wallet({
            RPC_URL: '',
            WORK_URL: '',
            WS_URL: `ws://`,
            seed: seed,
            defaultRep: "nano_1banexkcfuieufzxksfrxqf6xy8e57ry1zdtq9yn7jntzhpwu4pg4hajojmq",

// Generate 10 derived accounts
let accounts = wallet.createAccounts(10)
// ["nano_3g5hpb4kwqgakt4cx11ftq6xztx1matfhgkmhunj3sx4f4s3nwb6hfi3nts1", ... ]

Auto Receive
By default, when a websocket is provided, receivable blocks for all wallet accounts will be processed automatically.
To disable this feature, set autoReceive to false when initializing the wallet.

Manually Receive

// receive all receivable blocks for an account
let hashesReceive = await wallet.receiveAll("nano_3g5hpb4kwqgakt4cx11ftq6xztx1matfhgkmhunj3sx4f4s3nwb6hfi3nts1")


// send 0.001 nano from nano_3g5hp... to nano_3g5hp...
let hash = await wallet.send({
        source: "nano_3g5hpb4kwqgakt4cx11ftq6xztx1matfhgkmhunj3sx4f4s3nwb6hfi3nts1", // must be in wallet. 
        destination: "nano_3g5hpb4kwqgakt4cx11ftq6xztx1matfhgkmhunj3sx4f4s3nwb6hfi3nts1",
        amount: wallet.megaToRaw(0.001),

Custom networks

let headerAuth = { // custom header for authentification
     "nodes-api-key": process.env.NODES_API_KEY

// DogeNano Wallet
const walletXDG = new Wallet({
            RPC_URL: '',
            WORK_URL: '',
            WS_URL: `wss://${process.env.NODES_API_KEY}`,
            seed: seedXDG,
            defaultRep: "xdg_1e4ecrhmcws6kwiegw8dsbq5jstq7gqj7fspjmgiu11q55s6xnsnp3t9jqxf",
            prefix: 'xdg_',
            decimal: 26,
            customHeaders: headerAuth,
            wsSubAll: false, 
// Banano Wallet
const walletBAN = new Wallet({
            RPC_URL: '',
            WORK_URL: '',
            WS_URL: `wss://${process.env.NODES_API_KEY}`,
            seed: seedBAN,
            defaultRep: "ban_1banexkcfuieufzxksfrxqf6xy8e57ry1zdtq9yn7jntzhpwu4pg4hajojmq",
            prefix: 'ban_',
            decimal: 29,
            customHeaders: headerAuth,
            wsSubAll: false

This lib is intended for small project (<5000 accounts), for a more scablable system, it is recommended to use a database to store the accounts keys.

Package Sidebar


npm i simple-nano-wallet-js

Weekly Downloads






Unpacked Size

18.4 kB

Total Files


Last publish


  • benskalz