@eternl/cardano-dapp-connector-bridge
Version:
A postMessage bridge to connect dApps to the Eternl DApp Browser loading apps into an iframe.
16 lines (15 loc) • 633 B
TypeScript
/**
* Initializes the postMessage bridge for the Eternl DApp Browser.
* Call this function as early as possible in your page.
*
* Once the bridge is established, you can use
* window.cardano.eternl.enable() as your normally do.
*
* The optional callback will notify your code when the bridge is established.
*
* The window.cardano.eternl object will have isBridge set to true, and it will include
* the feeAddress.
*
* @param onBridgeCreated (optional) callback function to be called when the bridge is established.
*/
export declare const initCardanoDAppConnectorBridge: (onBridgeCreated?: (api: any) => void) => void;