Example Host
Wallet handoff demo

See how a web3 app can embed the review widget and pass the current user wallet into the iframe.

This example intentionally keeps the host wallet logic simple. In production, replace the mock wallet state with your preferred wallet library or your existing site session.

Mock app shell

The host site decides whether it passes a wallet to the iframe. The widget then uses that wallet for proof checking.

Acme Quest

The host page already knows who the user is.

In a real web3 app, this wallet would likely come from the app’s own auth or wallet connection flow. The embed just receives the current user wallet as a query param.

Current host route

/play/acme-quest

Host-side wallet state

User wallet

0x1111111111111111111111111111111111111111

Widget route

/widgets/reviews/embed

Implementation note

This page uses mock wallet state to keep the demo lightweight. If you want a production-like example, the next step would be swapping this state for the same wallet library already used on the host product.

Embed markup

The host page just updates the iframe `src` with the current wallet.

Current iframe snippet

html

<iframe
  id="omatrust-widget"
  src="https://reputation.omatrust.org/widgets/reviews/embed?url=play.acmequest.com&contract=0x1111111111111111111111111111111111111111&chainId=8453&name=Acme+Quest&wallet=0x1111111111111111111111111111111111111111"
  width="400"
  height="640"
  style="border:0; width:100%; max-width:400px; background:transparent;"
  loading="lazy"
  title="OMATrust Review Widget"
></iframe>

Dynamic wallet injection

js

const iframe = document.getElementById("omatrust-widget");
const url = new URL(iframe.src);
url.searchParams.set("wallet", userWalletAddress);
iframe.src = url.toString();