monero-ecosystem / csharp-monero-rpc-client

A wallet and daemon client to interface with Monero's JSON-RPC API, built on .netstandard2.1.
MIT License
32 stars 17 forks source link

                                              License Contributions welcome NuGet Badge

This is the source code of a Monero JSON-RPC client (for both daemon and wallet) built on .netstandard2.1.

Basic Overview

Both a daemon client and wallet client are available. The daemon client interacts with monerod.exe, and the wallet client interacts with monero-wallet-rpc.exe

MoneroDaemonClient

Initialize Client

using Monero.Client.Daemon;
var daemonClient = await MoneroDaemonClient.CreateAsync("127.0.0.1",18081);

Get Connections

List<Connection> connections = await daemonClient.GetConnectionsAsync();

For the entire MoneroDaemonClient interface, please click here.

MoneroWalletClient

Initialize Client

using Monero.Client.Network;
using Monero.Client.Wallet;
using Monero.Client.Wallet.POD;

// Asynchronously Initialize Client (and Open Wallet)
var walletClient = await MoneroWalletClient.CreateAsync(MoneroNetwork.Mainnet, "TestMainnet", "123");

Transfer Funds

var dA = new List<(string address, ulong amount)>() 
{ 
    ("BfukYd1Dv5YDgkZDhffjmHb1SfzT7Wr1HNTYkyxEmfnXiGepCHgPiaWicRCLHpM2moVNWAxNEVKogU2w58fT", 1000ul),
    ("SomeOtherMoneroAddress", 3233100ul),
};
var response = await moneroWalletClient.TransferAsync(dA, TransferPriority.Normal);

For the entire MoneroWalletClient interface, please click here. Note: Unlike the Daemon Client, to perform any action with the Wallet Client, one must first either create a new wallet, or open an existing one (as shown above).

Latest Stable Release

Available on Nuget here.

Install-Package Monero.Client -Version 1.0.1.7

Latest Development Changes

git clone https://github.com/monero-ecosystem/csharp-monero-rpc-client.git

Contributing

All contributions are welcome. Please make sure your pull request include: