PhantomConnect constructor
We need to provide appUrl and deepLink as parameters to create new PhantomConnect object.
appUrlis used to fetch app metadata (i.e. title, icon) using the same properties found in Displaying Your App.deepLinkuri is used to open the app from Phantom Wallet i.e our app's deeplink.- Also here we generate a new dAppPublicKey and
_dAppSecretKeyKeypair for encryption and decryption - These are unique for each session and destroyed after the session is over.
- dAppPublicKey and
_dAppSecretKeyKeypair for encryption and decryption
Implementation
PhantomConnect({required this.appUrl, required this.deepLink}) {
_dAppSecretKey = PrivateKey.generate();
dAppPublicKey = _dAppSecretKey.publicKey;
}