Skip to main content
Use the SDK-managed widget when a browser app needs to connect a key and ask the user to sign without building its own OpenKey UI.

Install

Connect an EIP-1193 provider

OpenKeyProvider implements the EIP-1193 methods needed for account discovery, chain identification, personal message signing, and EIP-712 typed-data signing. Unsupported provider methods reject with an error.

Available SDK flows

  • connect() selects or creates a key
  • signMessage() signs a personal message
  • signTypedData() signs EIP-712 typed data
  • linkWallet() links an external wallet
Managed-key signing is handled by OpenKey. External-key signing is routed to the wallet provider configured or discovered by the SDK.

Choose the UI mode

Modes are iframe, popup, and redirect. The default iframe mode falls back to a popup if it does not receive the widget-ready message, which commonly happens when the app’s content security policy blocks the frame.

Direct widget messaging

The widget routes and postMessage message shapes are SDK implementation details, not a supported public integration contract. Use @openkey/sdk so origin checks, timeouts, popup handling, and message changes remain inside the SDK. If the SDK cannot support your host environment, describe that constraint to TinyCloud support before depending on the internal protocol.