Need help with address derivation

I’m able to use the cardano-address and cardano-cli tools to go step-by-step from a mnemonic seed to a payment address by following this script I found:

This works, but these CLI tools are a little inefficient to call from other code due to the use of file I/O for parts of the process (specifically, the “key verification-key”, “key non-extended-key”, and “address build” commands all require file input instead of stdin/stdout).

I want to implement the same process in code to optimize the address generation. I happen to be using C# but I could port this from pretty much any other language if I can find a working example.

I found other attempts at building addresses in code, however, they are from 2018 and don’t build Shelly-compatible addresses. For example: GitHub - ilap/cwag: Cardano Wallet Address Generator

The result doesn’t incorporate a stake key. As a result, if you generate an address and try to search for it on, you get an error about a missing stake key.

Outside of the official Haskell sources, are there any up-to-date equivalents showing how to derive Cardano addresses? Thanks.

The examples from 2018 will be pre-shelley era.

You can use serialisation-lib.


This rendition of the @_ilap procedure has been updated for Shelley:

Thanks, I was able to get cardano-serialization-lib working in nodejs and call it as a service, which is sufficient for now. Eventually I hope to access this lib natively from C# but this is already a big improvement.