moneyro
Node.js library for interacting with Monero API.
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.
monero-wallet-rpc
Running - Start your daemon:
./monerod --testnet
- 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
; const wallet = ; async { try await wallet; const response = await wallet; console; // { address: '...', addresses: [ ... ] } catch err console; };
Daemon
; const daemon = hostname: 'testnet.xmrchain.net'; async { try const response = await daemon; console; // { count: 1098883, status: 'OK' } catch err console; };
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