Some companies want to interact with prebuilt c# code. Is there a more high level interface than writing lots of p-invokes?


2 Answers 2


Yes, there is a .NET library that is dynamically generated from your node's metadata. The current name is a little bit misleading as it is a generic toolchain that works for all substrate-based nodes and is not specific to a project.

Substrate C# Toolchain that generates a NET API and more https://github.com/ajuna-network/Ajuna.SDK

And has a lot of tutorials and was showcased at the Sub0 in Lisabon. Ajuna sub0 Talk: Substrate .NET Toolchain & Unity

And can also be used for Unity or Maui https://substrate.stackexchange.com/a/5565/707


AFAIK there is currently no "production-grade" .NET library which will dynamically generate API code from the chain metadata.

Fortunately there seems to be work happening on it. There is now Ajuna.NetApi (which is a fork/rewrite of SubstrateNetApi), and it focuses on generating API code from chain metadata. It seems to still be in development and documentation is scarce. I don't have any experience with any of these libraries so can't personally vouch for them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.