thirdweb TypeScript SDK: Basename Resolution

thirdweb SDK v5.50.0

thirdweb TypeScript SDK: Basename Resolution

Basename Resolution

The thirdweb SDK now supports Basenames or any other L2 ENS subdomains. To convert any Basename to an address, you can use the existing resolveAddress function.

import { resolveAddress, BASENAME_RESOLVER_ADDRESS } from "thirdweb/extensions/ens";
import { base } from "thirdweb/chains";

const address = await resolveAddress({
  client,
  name: "myk.base.eth",
  resolverAddress: BASENAME_RESOLVER_ADDRESS,
  resolverChain: base,
});

You can determine any address's Basename using the new resolveL2Name function.

import { resolveL2Name, BASENAME_RESOLVER_ADDRESS } from "thirdweb/extensions/ens";
import { base } from "thirdweb/chains";

const name = await resolveL2Name({
  client,
  address: "0x1234...",
  resolverAddress: BASENAME_RESOLVER_ADDRESS,
  resolverChain: base,
});

Bug Fixes and Other Improvements

  • Signature mint UIDs now accept a string
  • In-app wallet connection is now hidden in the PayEmbed
  • Merkletree proof fix for Drop contracts
  • Improved error messages for smart wallet connection failures
  • Fixed NFT approval on CreateDirectListingButton