Is there any documentation that explains in detail about the following URL defined in the MetaMaskWallet class?
/// <summary>The URL of the MetaMask app.</summary>
public const string MetaMaskAppLinkUrl = "https://metamask.app.link";
/// <summary>The URL of the socket.io server.</summary>
public const string SocketUrl = "https://socket.codefi.network";
Also, for SocketUrl, I confirmed that the following URL is overwritten in config. https://metamask-sdk-socket.metafi.codefi.network/
We are not sure if these two URLs are MetaMask services or not, and we do not know how they are processed internally,
I am at a loss to determine if I should continue to use them.
As for MetaMaskAppLinkUrl, I understand that it is a service for creating Deeplink as described in the following document https://c0f4f41c-2f55-4863-921b-sdk-docs.github.io/guide/mobile-best-practices.html#deeplinking
Because when I read the program, it generates a QR code to access the following,
I would like to know what is being done on the mobile MetaMask app. https://metamask.app.link/connect
So MetaMaskAppLinkUrl is the universal link domain used by QRCodes and universal links in general. So this is fundamental for establishing the connection between the Unity application (on desktop and mobile) and the MetaMask mobile app, making sure that the MetaMask mobile app is installed. Universal links like that have the advantage that check if the MM mobile app is installed, if it’s not, the user is taken to the app store to download it.
The SocketUrl instead is the URL of the Socket[dot]io server that used as a communication layer between the Unity application and the MetaMask mobile app. Please use https://metamask-sdk-socket.metafi.codefi.network/ as https://socket.codefi.network is an old URL that only redirect to the new one.
So this URL is the URL of the Socket server that we’ve built to support all the SDK communication. It is secured as there’s an ECIES encryption layer on top of it.
You can develop your own, but then you can also develop your own version of the MM Mobile app as this URL is “hard” coded in the SDK Communication Layer code that is used by both the SDK and the MM Mobile app.
Here’s the code of the SDK Communication Layer: https://github.com/MetaMask/metamask-sdk/tree/main/packages/sdk-communication-layer
Here’s the code of the Socket Io server used: https://github.com/MetaMask/metamask-sdk/tree/main/packages/sdk-socket-server
And here are all the info about how the communication work: https://docs.metamask.io/wallet/concepts/sdk-connections/#communication-layer
For any questions about the MetaMask SDK, I’d suggest you use the JS SDK repo here for a timely reply: https://github.com/MetaMask/metamask-sdk/issues