monero-ecosystem / csharp-monero-rpc-client Goto Github PK
View Code? Open in Web Editor NEWA wallet and daemon client to interface with Monero's JSON-RPC API, built on .netstandard2.1.
License: MIT License
A wallet and daemon client to interface with Monero's JSON-RPC API, built on .netstandard2.1.
License: MIT License
Add "csharp" after the three backticks so that the C# code is highlighted properly instead of that ugly red.
Hi,
I want to create a wallet but it always return this error:
"Error experienced when making RPC call in OpenWalletAsync. JsonRpcError: Method not found".
I'm using this public node:
xmr.moneromerch.com:18089
and my code is
var walletClient = await MoneroWalletClient.CreateAsync("xmr.moneromerch.com", 18089, "mytestwallet", "mytestpassword");
is there any way to create wallet and address offline?
If the RPC daemon reports an error it makes a small JSON object with 1 property error
containing an object with error code and error string. The library currently does not detect this, always tries to deserialize the normal answer of the respective call, resulting in a null
result object, which then ends in an "unexpected wallet error" exception thrown without any further info.
IMO this should get improved, in the interest of better debugging, the possibility to generate meaningful error messages in applications, etc.
By the way, sorry for being off-topic here, but I don't have a good idea where else to ask: Do you still receive e-mails from me, e.g. the one I sent last Friday December 11? I could work on this issue and a handful of other ones I found, but that would probably need some sort of coordination between the two of us, if you are also working on the library right now.
Hi @Agorist-Action . Please see monero-ecosystem/meta#78 (comment) and let me know how you plan to proceed forward.
Maybe use the [CallerMemberName]
reserved attribute to get at the name of the calling method, so there is no need to call with a second argument evaluated with the help of nameof
? I could not find any obvious drawback in Microsoft's doc of the feature.
Maybe it's worth to put a constant / prepared object somewhere for a JsonSerializerOptions
object configured as needed, to make this code a little less verbose.
I think I solved the riddle of the missing destinations in the wallet's record of transfers: If you close a wallet with your library it does not get saved. Why not? Because the close_wallet
RPC method has a parameter autosave_current
(that is not yet mentioned in the RPC documentation on GetMonero.org), and if that's not true the call does not save, as I saw directly in the RPC daemon's source code.
Small typo, probably should be "null or whitespace".
I just wondered whether using properties is good for anything in such an internal and highly technical class, or if using variables would save some memory and execution time. Might be largely a matter of taste however.
How about about introducing a constructor of GenericRequest
already setting jsonrpc
and id
and having method and params as parameters? I think the code would get shorter and more readable with such a constructor.
I am a little nitpicking here, but I find unneeded using
statements a little confusing and misleading. But maybe it's best to clean this up later after the code stabilized some more, in one go over the whole codebase.
Just depositing my opinion here, feel free to ignore: Personally I would prefer Multisig
over MultiSig
, with the argument that multisig took on some life on its own as single word / term. And it's simpler :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.