Unified Identity, Split and Vote Contract Extensions, and more

Greg

Unified Identity (Profile Linking)

We've added multi-authentication to the thirdweb SDK. Anyone can now link their in-app wallets to additional profiles like Google, Discord, Telegram, and more. Like all our features, we offer both a prebuilt UI and headless interface for linking profiles. When a user links their profile to an existing in-app wallet, that profile can then be used to authenticate to that wallet.

Unified identities come builtin to the React Connect modal. You can link a profile while signed into an in-app wallet by clicking "Manage Wallet" then "Linked Profiles".

0:00
/0:28

If you're not using React or you'd like to build your own UI, we've added two functions and a hook to make it as easy as possible.

To link a new profile to a currently connected wallet, use linkProfile.

import { inAppWallet, linkProfile } from "thirdweb/wallets";
const wallet = inAppWallet();
await wallet.connect({ strategy: "google" });
const profiles = await linkProfile(wallet, { strategy: "discord" });

This will return all currently linked profiles. To get the linked profiles at any time, use getProfiles.

import { inAppWallet, getProfiles } from "thirdweb/wallets";
const wallet = inAppWallet();
wallet.connect({ strategy: "google" });
const profiles = getProfiles(wallet);

This will return a profiles array similar to below.

[
{
type: "google",
details: {
email: "user@gmail.com",
},
},
{
type: "discord",
details: {
email: "user@gmail.com",
},
},
];

If you're using React, the useProfiles hook fetches profiles for the currently connected wallet and handles caching / revalidation for you.

import { useProfiles } from "thirdweb/react";
const { data: profiles } = useProfiles();

Split Contract Extension

We've added an extension for the Split contract. See all the available functions in our documentation.

Vote Contract Extension

We've added an extension for the Vote contract. See more in our documentation.


Bug Fixes and Other Improvements

  • Fixed wallet auto-connect in the React Native SDK
  • Updated the serializeTransaction interface to include a separate input for signature
  • Added fallback option to get address in ethers5 contract adapter
  • Added Abstract L2, Fractal, and Mode Testnet pre-defined chains
  • Fixed issue with "All Wallets" appearing in Pay
  • Added enabled prop to useWalletBalance