Platform

Typed Clients Generated From Your App

TypeScript, Python, Swift and Kotlin from one ABI, with breaking-change checks

Every Calimero Network app carries a description of its own methods, errors and events. One command turns it into a typed client in four languages.

Typed Clients Generated From Your App

Key takeaways

  • Every app embeds its ABI: methods, parameters, results, errors and events.
  • meroctl app codegen generates TypeScript, Python, Swift and Kotlin clients, or an OpenAPI document.
  • meroctl app abi diff flags breaking changes before you publish a new version.

What is the app ABI?

When you build a Calimero Network app, the SDK embeds its ABI: every method with its parameters and result, every error and every event, including record and enum shapes. Doc comments on your methods carry into it too. You can read it from the component, the signed package, or an installed app.

How do I generate a client?

Point meroctl app codegen at the component, the .mpk package or an ABI file, and choose a language:
  • --lang ts for TypeScript, used with mero-js in the browser or Node.
  • --lang python for Python, used with calimero-client-py.
  • --lang swift and --lang kotlin for iOS and Android.
  • --lang openapi for the OpenAPI document alone.

Generated methods take your app's types. Calls accept an idempotency key and a passkey confirmation, and views can choose their consistency. Errors and events are typed, so your compiler catches a renamed field before your users do.

How do I avoid breaking existing clients?

meroctl app abi diff OLD NEW compares two versions of your app's ABI, including record and enum shapes, and reports changes that would break clients already in use. Run it in CI before you publish.

Can I test without a node?

Yes. The generated TypeScript class implements an interface of your app's methods, so you can substitute a test double in your frontend tests. For the app itself, the SDK's test harness runs the real component.

Frequently asked questions

Which languages can call a Calimero Network app?

Generated typed clients cover TypeScript, Python, Swift and Kotlin. There is also a Rust client, and an OpenAPI document for anything else.

Do I have to write API schemas by hand?

No. The ABI is generated from your Rust code when you build the app.

How do I know if a new version breaks my mobile app?

Run meroctl app abi diff between the old and new versions before publishing. It reports breaking changes to methods, records and enums.

← All postsAll use cases →

Read it, then run it.

Start free on Calimero Network Cloud, or book a demo with the team.