Polkadot-API updates thread

Hi there :waving_hand:

Q3 is wrapping up, and it’s time to share what we’ve shipped to the community!

SDK Work

Over the past few months, our SDKs have continued to evolve, keeping pace with upstream pallet changes and incorporating quality-of-life improvements.

ink! / Revive

We’ve put extra effort into the ink! / Revive SDK. An important update is landing soon that will add out-of-the-box support for Solidity contracts. If you’re curious about how we’re approaching Solidity interactions, check out this forum post by @voliva.

Statement Store

This past week we began exploring the new Statement Store primitive, an off-chain statement storage component that nodes can run, unlocking a wide range of potential functionality. As always, our goal is to provide a clean, easy-to-use SDK that abstracts away the shenanigans so you can focus on building. Follow our development!

Legacy Provider

In this time, we released @polkadot-api/legacy-provider, a middleware that converts old JSON-RPC calls into valid JSON-RPC API spec compliant calls and responses. Check this post by @josep to dig into it.

polkadot-api@1.18

The latest releases pack some sizable upgrades. Heres what’s new.

hodlBlock

We added this API so you can override PAPI’s automatic block-unpinning strategy. It’s especially useful for advanced dApps and infrastructure like indexers that need fine-grained control over block retention.

hasNewRuntime / getMetadata

A highly requested capability: fetch chain metadata directly from the client—no more calling Metadata_metadata_at_version. There’s a new client API for that, and all blocks emitted by blocks$, finalizedBlock$, bestBlock$, etc. now include a boolean hasNewRuntime to flag runtime upgrades. That way, consumers can confidently switch to the correct metadata at the right time.

WS Provider revamp

We introduced a new export for the WebSocket provider that’s slated to become the sole option in the next PAPI major. It trims overloads, simplifies configuration, and adds a websocketClass option so you can pick the WebSocket implementation you prefer. By default, it uses the global WebSocket available in browsers, Node.js >=22, and Bun.

For most users the migration is a simple swap. We’ll update the docs to reflect the new defaults and examples.

Other changes

A grab bag of QoL improvements and fixes:

  • We now export descriptor types, not just descriptors, enabling TypedApi<typeof dot> => TypedApi<Dot>.
  • Fixed issues around stop-event recovery.
  • Improved validation logic: previously some valid transactions misclassified as invalid should now pass.
  • Infer the chain’s hasher from the first header we receive.

PBA @ Bali

During last month, we prepared and taught an exciting new cohort in PBA focused on offchain/dApps development! It was incredibly rewarding to guide a cohort of over 30 students through the course. We want to thank all the PBA team for the confidence and, as always, we are open to collaborations in the future!

Upstream contributions

As always, we kept opening issues and PRs to smoldot, Polkadot-SDK, and any other relevant repo in the ecosystem, to ensure the constant improve of every part of the Polkadot supply chain where we can help. Some examples:

As always, thanks for your attention, and see you next time!

3 Likes