Custom Cardano wallet

I need to implement a simple Cardano wallet. It should be able to create basic transactions (send ADA from account A to account B) , sign it with locally stored key, publish it to blockchain and then verify it has been completed. This wallet would be then integrated into a bigger application, serving as integration point between its app logic and Cardano blockchain.

I have few questions around that:

  1. Is it necessary to set up a local Cardano node to interact with Cardano blockchain?

According to my research, in order to send a transaction to Cardano blockchain I need to set up a node locally and then interact with it using REST API, as per https://cardanodocs.com/technical/wallet/api/v1/?v=1.6.0 . I find it odd. In other public blockchains there is usually some lib that acts as an integration point between DApp and a blockchain. An example would be https://github.com/ethereum/web3.js/ for Ethereum or https://github.com/ripple/ripple-lib for Ripple. Is there no such lib for Cardano? I found this https://github.com/input-output-hk/js-chain-libs but it seems that it does need a local Cardano node and is just proxy for REST.

  1. How to set up a local Cadano node that connects to a test net?

I need it to work on Linux, optimally (but not necessary) within a Docker container. The closest thing I could find is this: https://github.com/cipherzzz/cardano-node . This node is however configured to connect to main net - and I also need a test net one in order to test my DApp without having to spend real ADA for transactions. It is not obvious to me how to configure it to connect test net, though I’m trying to do that since yesterday, with no success so far. Is there any working and tested method of setting up a Cardano node that connects to test net that you can recommend?

  1. Which test net should I use to test a wallet described above?

I’m just after simplicity - sending ADA from account A to B. Which testnet is best suited for something like that?I’d say Byron since AFAIK in order to have ADA on Shelley I need to hold some real ADA (which I don’t) .

  1. Are there any tutorials/resources that you know of and that could be helpful to me?

If so, please do go ahead and share them. Obviously I did my research but as a Cardano beginner it’s possible that there are some important resources I missed.

Thanks,
Kris

2 Likes
  1. Yes you need access to a node. js-chain-libs is for Shelley and cardano-wasm is for Byron.

  2. Consider looking into Tangata-Manu or running Jormungandr directly (if you want Shelley). Tangata-Manu works for Byron and we’re working on Shelley support at the moment (not done).

  3. Byron testnet is nice because Daedalus both Deadalus and Yoroi fully support it (for Yoroi we don’t distribute this version but you can build it from the code. For Daedalus you can download it from the IOHK testnet website)

  4. You can ask more questions in the Cardano Developers telegram group or in the forums and people tend to answer.

4 Likes

Sounds good, @SebastienGllmt ! I will dig into that and possibly ask some more questions, if any :slight_smile:

@2 @SebastienGllmt:

Do you mean that https://github.com/Emurgo/tangata-manu ? It seems that this is just some migration tool for Cardano->Postrgres. Anyway, I managed to set it up but it does not seem it started a Cardano node - it just started a Docker container with postrgres db inside.

What I also tried is successfully installing a Daedalus wallet. It claims to have started a Cardano node and I can indeed see its REST API. However, in order to interact with it I need a cert that was created when starting up a node. Any idea where I can find it (in Ubuntu) ? I imagine it’s not possible to generate it on my own.

Tangata Manu should easily be able to connect with the Cardano HTTP bridge projects which will connect with the blockchain. It will pull blocks from the network and put them into the Tangata Manu database format so that you can easily parse the information

I get it, but to me it seems like unnecessary component that just adds complexity to an application. I get that in some more complex projects that might make sense, but I’m after a simple DApp.

Anyway, I installed Byron version of Daedalus and managed to find cert&secret - in $HOME/.local/share/Daedalus/testnet/tls . That’s not a perfect solution since I’d prefer to have more control over the node (just be able to build it from source) , but it should be enough for now.