I was trying to make a flutter app where I could have authentication done using Magic and then use it with Solana as my blockchain however the issue that I have been facing is the public address that I get from the magic-sdk flutter package is always ethereum one and not Solana one.
final _magic = Magic.instance;
final metadata = await _magic.user.getMetadata();
final publicAddress = metadata.publicAddress;
I even made a custom Magic class and gave the solana rpc url during instantiation.
Magic.instance = Magic.custom(
MY_API_KEY,
rpcUrl: "https://api.testnet.solana.com",
chainId: 1,
);
Still no success. So any help will over this will be highly appreciated!.
You need to specify the extension. This is in JS, but I believe similar logic applies to flutter:
NOTE: The didToken will always adhere to the Ethereum method, but now the public key will be a Solana public key.