Skip to content

v0.11.0

Choose a tag to compare

@valentinfernandez1 valentinfernandez1 released this 20 Jul 12:48
· 98 commits to main since this release
3aba914

@parity/truapi 0.4 products connect out of the box

Products that upgraded to @parity/truapi 0.4 (including everything built on recent @parity/product-sdk) change how the iframe channel is opened: instead of exchanging frames directly over window postMessage, the product posts { type: "truapi-ready" } and expects the host to answer with { type: "truapi-init" } carrying a transferred MessagePort. Against older test-sdk releases, that handshake went unanswered, the product waited 20 seconds for a port that never arrived and waitForConnection() timed out.

The test host now answers the handshake and serves all traffic over the transferred port. No test changes are needed:

const bobFixture = createTestHostFixture({
  productUrl: "http://localhost:5260",
  accounts: ["bob"],
  networks: [PASEO_ASSET_HUB],
});
// waitForConnection() now resolves for truapi-0.4 products too

Products on the 0.3 bootstrap (@novasamatech/host-api-wrapper) are unaffected, the direct window postMessage channel is still served, and both kinds of product talk to the same container with the same handlers, logs, and permission model.