### Install SDK Dapp via yarn Source: https://github.com/multiversx/mx-sdk-dapp/blob/main/README.md Install the sdk-dapp library using yarn. Ensure you are running your app on https. ```bash yarn add @multiversx/sdk-dapp ``` -------------------------------- ### Install SDK Dapp via npm Source: https://github.com/multiversx/mx-sdk-dapp/blob/main/README.md Install the sdk-dapp library using npm. Ensure you are running your app on https. ```bash npm install @multiversx/sdk-dapp ``` -------------------------------- ### Initialize and Start WebviewClient Source: https://github.com/multiversx/mx-sdk-dapp/blob/main/src/providers/strategies/WebviewProviderStrategy/WebviewClient/README.md Initialize the WebviewClient with a callback for login cancellations and start listening for messages. This is used in the parent dApp to manage authentication requests from child iframes. ```typescript import { WebviewClient } from '@multiversx/sdk-dapp/out/providers/strategies/WebviewProviderStrategy/WebviewClient'; const webviewClient = new WebviewClient({ // Perform action when login is cancelled onLoginCancelled: async () => { setApp(null) } }); webviewClient.startListening(); // Optional: Register a custom event handler webviewClient.registerEvent('dAppcustomEvent', (event) => { console.log('Received data:', event.data.payload); });