Skip to content

Releases: thirdweb-dev/js

[email protected]

13 Nov 17:01
e0c641c
Compare
Choose a tag to compare

Minor Changes

  • #5354 a1fc436 Thanks @joaquim-verges! - Adds EIP1193 adapters that allow conversion between Thirdweb wallets and EIP-1193 providers:

    • EIP1193.fromProvider(): Creates a Thirdweb wallet from any EIP-1193 compatible provider (like MetaMask, WalletConnect)
    • EIP1193.toProvider(): Converts a Thirdweb wallet into an EIP-1193 provider that can be used with any web3 library

    Key features:

    • Full EIP-1193 compliance for seamless integration
    • Handles account management (connect, disconnect, chain switching)
    • Supports all standard Ethereum JSON-RPC methods
    • Comprehensive event system for state changes
    • Type-safe interfaces with full TypeScript support

    Examples:

    // Convert MetaMask's provider to a Thirdweb wallet
    const wallet = EIP1193.fromProvider({
      provider: window.ethereum,
      walletId: "io.metamask",
    });
    
    // Use like any other Thirdweb wallet
    const account = await wallet.connect({
      client: createThirdwebClient({ clientId: "..." }),
    });
    
    // Convert a Thirdweb wallet to an EIP-1193 provider
    const provider = EIP1193.toProvider({
      wallet,
      chain: ethereum,
      client: createThirdwebClient({ clientId: "..." }),
    });
    
    // Use with any EIP-1193 compatible library
    const accounts = await provider.request({
      method: "eth_requestAccounts",
    });
    
    // Listen for events
    provider.on("accountsChanged", (accounts) => {
      console.log("Active accounts:", accounts);
    });

Patch Changes

@thirdweb-dev/[email protected]

13 Nov 17:01
e0c641c
Compare
Choose a tag to compare

Patch Changes

[email protected]

07 Nov 18:36
2579525
Compare
Choose a tag to compare

Minor Changes

  • #5326 f5f5ae6 Thanks @gregfromstl! - Add SiteLink component for creating wallet-aware links between thirdweb-enabled sites. This component automatically adds wallet connection parameters to the target URL when a wallet is connected, enabling seamless wallet state sharing between sites.

    Example:

    import { SiteLink } from "thirdweb/react";
    
    function App() {
      return (
        <SiteLink
          href="https://thirdweb.com"
          client={thirdwebClient}
          ecosystem={{ id: "ecosystem.thirdweb" }}
        >
          Visit thirdweb.com with connected wallet
        </SiteLink>
      );
    }

Patch Changes

[email protected]

06 Nov 07:04
a045479
Compare
Choose a tag to compare

Minor Changes

  • #5298 5cc5c93 Thanks @gregfromstl! - Added new SiteEmbed React component for embedding thirdweb-supported sites with seamless wallet connection support.

    The component allows you to embed other thirdweb-enabled sites while maintaining wallet connection state, supporting both in-app and ecosystem wallets.

    Example usage:

    import { SiteEmbed } from "thirdweb/react";
    
    <SiteEmbed
      src="https://thirdweb.com"
      client={client}
      ecosystem={ecosystem}
    />;

    Note: Embedded sites must include <AutoConnect /> and support frame-ancestors in their Content Security Policy.

Patch Changes

[email protected]

05 Nov 03:25
fff3c38
Compare
Choose a tag to compare

Patch Changes

[email protected]

04 Nov 20:33
c0b8750
Compare
Choose a tag to compare

Patch Changes

[email protected]

04 Nov 00:43
322e449
Compare
Choose a tag to compare

Minor Changes

  • #5126 c621c13 Thanks @kien-ngo! - Allow to customize the display order of Asset tabs

    When you click on "View Assets", by default the "Tokens" tab is shown first.

    If you want to show the "NFTs" tab first, change the order of the asset tabs to: ["nft", "token"]

    Note: If an empty array is passed, the [View Funds] button will be hidden

    <ConnectButton
      client={client}
      detailsModal={{
        assetTabs: ["nft", "token"],
      }}
    />

Patch Changes

[email protected]

31 Oct 08:57
7791a99
Compare
Choose a tag to compare

Patch Changes

[email protected]

31 Oct 02:48
60629e3
Compare
Choose a tag to compare

Patch Changes

  • #5237 802d3bf Thanks @joaquim-verges! - Sanitize block explorer URLs

  • #5231 686d0c3 Thanks @joaquim-verges! - Respect custom bundler URL for getting gas fees + better DX for predictSmartAccountAddress()

  • #5187 68ce724 Thanks @ElasticBottle! - expose WalletUser type for in app / ecosystem wallets

  • #5214 ad4af68 Thanks @joaquim-verges! - Reduce async calls before requesting webauthn credentials for ios 15

  • #5229 9425e9e Thanks @ElasticBottle! - Consolidate custom jwt and custom auth endpoint through common endpoint

  • #5244 178d407 Thanks @joaquim-verges! - Add support for custom singlePhase drops

    If you are using a custom drop contract, you can now set claim conditions and claim by passing the singlePhaseDrop option to the setClaimConditions and claimTo functions.

    setClaimConditions({
      contract,
      phases: [
        {
          startTime: new Date(0),
          maxClaimableSupply: 10n,
        },
      ],
      tokenId: 0n,
      singlePhaseDrop: true, // <--- for custom drop contracts
    });

[email protected]

29 Oct 01:17
8861982
Compare
Choose a tag to compare

Patch Changes