core-js icon indicating copy to clipboard operation
core-js copied to clipboard

looking for example

Open ralyodio opened this issue 3 years ago • 1 comments

I want to generate a nimiq wallet inside my app (each user will be given their own nimiq wallet that they can use to tip other users on my platform).

How would I do this?

I'm using deno (server side) and web components on the client.

ralyodio avatar Nov 25 '21 21:11 ralyodio

Hi there!

Here's a couple considerations you have to make first:

  • Will users own the keys to their wallet? If you give custody to them, you can generate and handle the wallet in the client code in the browser (javascript, currently supported). However, you also need to establish and maintain a Nimiq network connection (consensus) in the browser and provide a backup/recovery to the users then.
  • If you are creating and managing the wallet for your users, you are managing their crypto, which comes with it's own challenges. First and foremost the Nimi library is not tested and probably won't work out-of-the-box in Deno. Second, you are responsible for your users' money, so depends on how much they are going to store.

Client-side

To create a Nimiq instance, wallet and transactions client-side in the browser's Javascript, you can check out the tutorials in our dev-center: https://www.nimiq.com/developers/#tutorials

Server-side

Either we figure out how to run Nimiq in Deno, or you run a Nimiq node (with NodeJS), which you can then interact with server-side via its RPC server: https://github.com/nimiq/core-js/wiki/JSON-RPC-API. This way you would generate and send transactions on your users' behalf.

sisou avatar Nov 26 '21 13:11 sisou

Closing this issue as it seems stale.

@ralyodio please feel free to reopen it if you need to add more information.

jeffesquivels avatar Sep 29 '22 17:09 jeffesquivels