Giter Site home page Giter Site logo

noderowallet's Introduction

noderowallet

A node.js library for interacting with the Monero Wallet RPC interface, written in TypeScript, documented with JSDoc, with BigInt support. Zero (0) dependencies.

Currently, authentication is not supported. You have to start monero-wallet-rpc with --disable-rpc-login.

Be careful when using monero-wallet-rpc without authenticaton. Block the RPC port with a firewall, or even better, run the wallet in Docker. If the port is open to the Internet anyone can use your wallet, including stealing all your funds.

Usage

import {NoderoWallet} from 'noderowallet'

const monero = new NoderoWallet({ host: '127.0.0.1', port: 6000 })
monero.getBalance().then((x) => console.log(x))

// Outputs:
{
  balance: 1125125151521,
// atomic units, in this case the balance is 1.125125151521
// from https://www.getmonero.org/resources/moneropedia/atomic-units.html:
// Atomic Units refer to the smallest fraction of 1 XMR. One atomic unit is currently 1e-12 XMR (0.000000000001 XMR, or one piconero). It may be changed in the future.
  blocks_to_unlock: 0,
  multisig_import_needed: false,
  per_subaddress: [
    {
      account_index: 0,
      address: '52R4RNjVjPn6Aj3SVA1yzZQStC8a4StYTUiuAtLjBPk92A76vrCD2pcPmV51Td8X56Gb1smNTaiEadc4gurjQ5nJBUuVCFB',
      address_index: 0,
      balance: 1125125151521,
      blocks_to_unlock: 0,
      label: 'Primary account',
      num_unspent_outputs: 1,
      time_to_unlock: 0,
      unlocked_balance: 1125125151521
    }
  ],
  time_to_unlock: 0,
  unlocked_balance: 1125125151521
}
(◣_◢)

noderowallet's People

Contributors

chefnaphtha avatar

Stargazers

 avatar

Watchers

 avatar  avatar

noderowallet's Issues

Ping

Create IMAP folder.

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.