Skip to main content

Mithril client WASM breaking change

· One min read
Mithril Team

Breaking change introduced in the unstable features of the Mithril client WASM

With the release of distribution 2437, we introduced a breaking change to the Mithril client WASM version 0.4.1. Unstable features are now activated using a configuration option instead of the .unstable property.

This change ensures a seamless transition when new unstable features become stable, eliminating breaking changes in developer code and enhancing the developer experience.

To activate unstable features, use the following code:

let client = new MithrilClient(aggregator_endpoint, genesis_verification_key, {
// The following option activates the unstable features of the client.
// Unstable features will trigger an error if this option is not set.
unstable: true,
});

The previous client.unstable implementation is not supported anymore and must be replaced with client:

// Before
let mithril_stake_distributions_message =
await client.unstable.compute_mithril_stake_distribution_message(
last_stake_distribution,
);
// After
let mithril_stake_distributions_message =
await client.compute_mithril_stake_distribution_message(
last_stake_distribution,
);

The Mithril client WASM documentation is available here.

For questions or assistance, contact the team on the Discord channel.