1.2.2 • Published 7 years ago

moneyro v1.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

moneyro

Node.js library for interacting with Monero API.

npm version dependencies Status

Library not tested in production environment yet.

Table of contents

Installation

yarn add moneyro

Prerequisites

Wallet needs a running monero-wallet-rpc, while Daemon connects to monerod.

Head to https://getmonero.org/downloads/ and download Command-Line tools for your platform.

Running monero-wallet-rpc

  1. Start your daemon:
./monerod --testnet
  1. Start wallet RPC client
./monero-wallet-rpc \
  --testnet --rpc-bind-port 18082 \
  --wallet-dir <folder-for-your-wallets> \
  --disable-rpc-login \
  --log-level 4

And that's it, you're ready to use moneyro.

Usage

Wallet

import { Wallet } from 'moneyro';

const wallet = new Wallet();

(async () => {
  try {
    await wallet.create('test-wallet', 'strongpassword');
    const response = await wallet.getAddress();
    console.log(response); // { address: '...', addresses: [ ... ] }
  } catch (err) {
    console.error(err);
  }
})();

Daemon

import { Daemon } from 'moneyro';

const daemon = new Daemon({
  hostname: 'testnet.xmrchain.net',
});

(async () => {
  try {
    const response = await daemon.getBlockCount();
    console.log(response); // { count: 1098883, status: 'OK' }
  } catch (err) {
    console.error(err);
  }
})();

API

Wallet

constructor(options)

options

Type: Object

hostname

Type: string Default: '127.0.0.1'

port

Type: int Default: 18082

username

Type: string

password

Type: string

1.2.2

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago