Skip to content

v1.0.1

Compare
Choose a tag to compare
@joaquim-verges joaquim-verges released this 13 Dec 00:45

NEW Magic.link connection support! (alpha)

  • Connect the user's magic.link wallet with email or social logins
  • Interact with that wallet like a regular wallet using the SDK functions

First, you'll need to pass your Magic.link developer API key in the SDK options like so:

var sdk = new ThirdwebSDK("goerli", new ThirdwebSDK.Options
        {
            wallet = new ThirdwebSDK.WalletOptions
            {
                appName = "Thirdweb SDK Demo",
                extras = new Dictionary<string, object>
                {
                    {"apiKey", "your_api_key"},
                    // ... any other magic.link options here
                }
            }
        });

Then you can initiate the magic.link login flow like the other wallets:

string address = await sdk.wallet.Connect(new WalletConnection
    {
        provider = WalletProvider.MagicAuth,
        chainId = 1 // ChainId to connect to
    });

API changes

  • SDK options now have separate options.wallet and options.storage
  • FundWallet() has been moved from sdk to sdk.wallet