Skip to content

Conversation

@oliverrigonan
Copy link
Collaborator

This PR resolves the issue related to PAPI (Polkadot API) runtime API discovery.

PAPI Runtime API Discovery

During integration testing with PAPI, runtime APIs were not being detected in the PAPI console, and downloading descriptors consistently failed. For example, when running the following command:

npx papi add xodePolkadot --wsUrl wss://polkadot-rpcnode.xode.net

The generated runtime API types were empty:

type IViewFns = {};
type IRuntimeCalls = {};

This issue was traced to changes in the Polkadot SDK (paritytech/polkadot-sdk#6665) where runtime API implementations were split into a dedicated api.rs file. While this worked within the SDK, it caused PAPI to fail in discovering and generating the runtime API types.

Fix: All runtime API implementations were moved back from api.rs into lib.rs. This change restored proper runtime API detection, and PAPI now successfully generates the expected IViewFns and IRuntimeCalls types.


Issues Resolved

  • Closes #90 — Track Xode Polkadot-API Runtime API Issues

Summary of Changes

  • Moved runtime API implementations from api.rs back to lib.rs to fix PAPI runtime discovery.
  • Fixed issue where PAPI runtime API types (IViewFns, IRuntimeCalls) were empty.
  • Verified runtime API discovery functionality in the PAPI console.
  • Ensured compatibility with existing runtime logic.

Impact

  • Restores runtime API detection in PAPI, ensuring runtime API types are generated correctly.
  • Aligns our runtime with the latest Polkadot SDK standards, while maintaining compatibility with PAPI.

@hgminerva
Copy link
Collaborator

Further explaination to the changes: polkadot-api/polkadot-api#1164

@oliverrigonan oliverrigonan changed the base branch from main to v0.1.2 September 29, 2025 03:22
@hgminerva hgminerva merged commit f63a97f into Xode-DAO:v0.1.2 Sep 29, 2025
0 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track Xode Polkadot-API Runtime API Issues

2 participants