Seeking a list of grin sdk’s/libraries for development. Otherwise I will interact with the json-rpc directly.
I also want to know where the SDKs are
Any info or pointing in some direction would be great!
@mcm-mike can you comment on Grin SDKs?
hi, here is the python sdk for grin wallet/node GitHub - grinfans/grinmw.py: python for grin
As a good start you can checkout:
@stakerV do we have another central starting point for any one want to program on GRIN ?
We have only hub with links to grin++, python implementations/wrappers and official github repo.
The one appearent way to start is to examine docs at grin.mw and source code at github like any other project. If a detailed roadmap can be derived by developers, I can add it to docs.
Thank you for the links everyone.
To be sure, I’m primarily thinking about embedding a grin wallet inside a messaging app. I want to, for example, fork a Matrix client and add Grin functionality to it (the idea of course is treating Grin slatepacks basically as a network overlay on top of the messaging network). The types of Grin SDKs available will probably dictate which client I can fork. For example, I doubt there is any way to get Grin code into a Flutter application. But maybe there is a way to get Grin functionality into a React Native app?
Now I really am not sure what I can do with a Python library. But Rust seems fairly portable given that it can also compile to wasm and theoretically can be included in any web or nodejs client…
I updated the GrinCC hub readme file to have clear section for developers with all relevant links.
I also added there the link to how to build and debug the grin rust node and wallet, as well as link to the very nice documented Technical design and API of Grin++. Together with the wrappers this should be all a developer needs .
@Yeastplume Is there to you knowledge somewhere a technical overview of the flow of Grin Rust wallet and node? If so, I I should add it to this Developer section on Grin Hub. If there is no such graph, maybe we can generate something like a UML graph.
Such a graph might help those who want to help debugging or want to add functions to the node or wallet. For example, I would like to help resolve an issue with the imdb file of an archive node on Windows being an explosive 1 TB. To resolve it I should have some understanding of the flow of code, and the objects and functions in there. Such an UML diagram might lift me and others from someone who posts issues, to someone who might suggests fixes via pull request.
So, if a developer wants to make a new wallet, what exactly is needed for that?
It needs to be either a rust application (if you want to gut the rust wallet and replace the GUI with your own code) or it needs to be a python application (are there any good ways to make a GUI client with Python)?
What if a developer already had an application and they want to add a Grin wallet to that so their users can transact / earn?
No, you can talk to the wallet and node using any programming language The rust wallet use an API with private public key pair to securely request and send data. The wallet can run either as CLI (GUI for the command line). or just as command line interface. Via the API you talk with the Rust wallet and build a GUI on top using any programming language or framework. Take for example IronBelly and Niffler, they both run on top of the normal grin-wallet+grin rust node. The difference between the two wallets is that IronBelly as default uses a remote node, so you do not need to run a node on your phone, while Niffler does run a grin rust node locally.
The API from Grin++ also is rather extensive, so also here you can basically link anything to the wallet and node via the API. So probably you can also build any software to work with Grin++.
Ideally, we work towards having a unified API for both software, so anything developed can either be linked to grin rust node and grin-wallet or to grin++. I am not sure how similar the API’s are at the moment, maybe @davidtavarez knows.
The Python wrapper is just for convenience. It makes it super duper easy, so it is great for experimentation and debugging but it is not restrictive in any way, just some simple wrapping code around the API.
This is possible, but basically would require to at least run the grin-wallet or Grin++ node itself. Yes you can reprogram the whole wallet and node in for example Python, which is being worked on by @renzokuken on the long term. But basically you do not need to re-implement anything yourself, you just have to link your software using the API. Any existing wallet software can use the secure API to generate a new wallet in grin-wallet or grin++ and incorporate it in their own wallet GUI. So in that case you could make Grin a part of a multicoin wallet.
The main challenge is that Grin works differently from non-interactive cryptocurrencies, so it would require some additions to such as multi-wallet tool to properly support interactive transactions like Grin. To be honest, I think interactive cryptocurrencies will become more common in the coming years. Therefore more wallets will probably build in functionalities for coins like Grin that require interactivity.
No.
Grin++ is written in C++. Grin++ Desktop UI is written in TypeScript + React + Electron. Grin++ is also ported to Android. Grin++ Mobile UI is written in C# using Xamarin. I also published a nuget package to connect to Grin++ using C# and npm package for NodeJs.
grin-wallet and grin node are written in Rust.
IronBelly is written in Javascript + React Native.
This is nice information! We should document it somewhere. Maybe a list of all projects, which languages and frameworks and links to their github page for refencec.
Maybe we should make a separate Developer Readme file on the Grin Hub page loaded with such useful information.
where is the npm package?
also, couldn’t someone compile this to wasm and use it in a web app? GitHub - mimblewimble/grin-wallet: Grin Wallet
I have reserved the name for us.
If someone compiles ツ core library from Rust to wasm I will let them use this package name.
wouldn’t it be more accurate to have “grin” in the name?
Beam and Tari both use mimblewimble, but neither are compatible with Grin
Their implementations are different.
They really shouldn’t say that they use mimblewimble then. Yet both do. Very confusing!