Cardano address generation Java library

Hi,
I am trying to find a way to generate Cardano address in Java without using “cardano-cli”. I want to do that in the client program, so cannot rely on cardano wallet api.

I understand that Emurgo’s cardano-serialization-lib is a good option and it can be used out of box if the client’s programming language is JavaScript.

But I am not sure how to call the cardano-serialization-lib’s wasm library from Java in a platform independent way.

The other option is to re-write a pure native Java library for address generation.

Is there an official spec for Shelley address generation that I can refer to do that ?

Thanks

The Wallet backend API package (Coming Soon) will probably solve your problem.

Anyway, I would be interested if you find something.

All the best!

1 Like

Thanks. I will check that.

Any news about it?

No. I have not found any pure Java implementation yet.

One feasible option for now - Create a Java wrapper to use cardano-serialization-lib through JNI/JNA.

I did try to use cardano-serialization-lib wasm in java using wasmer-java. But it failed due to some compatibility issue.

@mendesbarreto @moustique

I have created a Java library which uses Emurgo’s cardano-serialization-lib through JNI interface. Currently, it only provides API for address generation both new and from an existing mnemonic. (Base Address and Enterprise Address)

The plan is to extend the library to support offline transaction signing. So that it can be used in Cardano IntelliJ IDE Plugin project.

It is currently supported on the following platforms

Apple MacOS (Intel and Apple Silicon)
Linux (x86_64) (Ubuntu 18.04 and above or compatible ...)
Windows 64bits (x86_64)

More info can be found at project’s GitHub page