First, you need to install the
npm install --save @airgap/beacon-sdk
After that you need to import the Beacon SDK in your code and initialize the WalletClient.
beacon-sdk will automatically try to establish a connection and listen to all Beacon messages.
The RPC URL that is provided by the DApp can be an insecure http:// connection. The reason for this is because it allows for easy development with a local node, without setting up a local SSL certificate.
Especially the wallet should care about this and potentially show a warning to the user if the RPC URL is not a secure https:// URL.