Monero Java Library (lite)

A minimum Java library for using monero-wallet-rpc

License

License

Categories

Categories

Java Languages
GroupId

GroupId

io.github.woodser
ArtifactId

ArtifactId

monero-java-lite
Last Version

Last Version

0.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

Monero Java Library (lite)
A minimum Java library for using monero-wallet-rpc
Project URL

Project URL

https://github.com/woodser/monero-java-lite
Source Code Management

Source Code Management

http://github.com/woodser/monero-java-lite/tree/master

Download monero-java-lite

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.woodser/monero-java-lite/ -->
<dependency>
    <groupId>io.github.woodser</groupId>
    <artifactId>monero-java-lite</artifactId>
    <version>0.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.woodser/monero-java-lite/
implementation 'io.github.woodser:monero-java-lite:0.2.1'
// https://jarcasting.com/artifacts/io.github.woodser/monero-java-lite/
implementation ("io.github.woodser:monero-java-lite:0.2.1")
'io.github.woodser:monero-java-lite:jar:0.2.1'
<dependency org="io.github.woodser" name="monero-java-lite" rev="0.2.1">
  <artifact name="monero-java-lite" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.woodser', module='monero-java-lite', version='0.2.1')
)
libraryDependencies += "io.github.woodser" % "monero-java-lite" % "0.2.1"
[io.github.woodser/monero-java-lite "0.2.1"]

Dependencies

compile (2)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.7
org.apache.httpcomponents : httpclient jar 4.5.3

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Monero Java Library (lite)

This project is a version of monero-java which supports only basic wallet functionality using monero-wallet-rpc.

This project conforms to an API specification intended to be intuitive, robust, and suitable for long-term use in the Monero project.

Main Features

  • Manage a Monero wallet using RPC
  • Cohesive APIs with rigorous focus on ease-of-use
  • Query wallet transactions, transfers, and outputs by their many attributes
  • Over 145 passing JUnit test cases

How to Use This Library

For Maven, add to pom.xml:

<dependency>
  <groupId>io.github.woodser</groupId>
  <artifactId>monero-java-lite</artifactId>
  <version>0.2.1</version>
</dependency>

For Gradle, add to build.gradle:

compile 'io.github.woodser:monero-java-lite:0.2.1'

You are now ready to use this library with monero-wallet-rpc.

How to Run Monero RPC

  1. Download and extract the latest Monero CLI for your platform.

  2. Start Monero daemon locally: ./monerod --stagenet (or use a remote daemon).

  3. Create a wallet file if one does not exist.

    • Create new / open existing: ./monero-wallet-cli --daemon-address http://localhost:38081 --stagenet
    • Restore from mnemonic seed: ./monero-wallet-cli --daemon-address http://localhost:38081 --stagenet --restore-deterministic-wallet
  4. Start monero-wallet-rpc (requires --wallet-dir to run tests):

    e.g. For wallet name test_wallet_1, user rpc_user, password abc123, stagenet: ./monero-wallet-rpc --daemon-address http://localhost:38081 --stagenet --rpc-bind-port 38083 --rpc-login rpc_user:abc123 --wallet-dir ./

How to Run JUnit Tests

  1. Clone the Java repository: git clone --recurse-submodules https://github.com/woodser/monero-java-lite.git
  2. Install project dependencies: mvn install
  3. Run monero-wallet-rpc. See How to Run Monero RPC.
  4. Configure the appropriate RPC endpoints, authentication, and test wallet in TestUtils.java.
  5. Run all *.java files in src/main/test as JUnits.

See Also

These libraries conform to the same API specification.

Java reference implementation (full version)

JavaScript reference implementation

C++ reference implementation

License

This project is licensed under MIT.

Donate

Donations are gratefully accepted. Thank you for your support!

46FR1GKVqFNQnDiFkH7AuzbUBrGQwz2VdaXTDD4jcjRE8YkkoTYTmZ2Vohsz9gLSqkj5EM6ai9Q7sBoX4FPPYJdGKQQXPVz

Versions

Version
0.2.1
0.2.0