Skip to content

Releases: thirdweb-dev/js

thirdweb@5.27.0

01 Jun 04:28
4cddbe7
Compare
Choose a tag to compare

Minor Changes

  • #3181 a346111 Thanks @gregfromstl! - Adds headless functions for creating and managing a WalletConnect session with a connected wallet

    createWalletConnectClient

    import { createWalletConnectClient } from "thirdweb/wallets/wallet-connect";
    
    createWalletConnectClient({
      client: client,
      wallet: wallet,
      onConnect: (session: any) => {
        alert("Connected");
      },
      onDisconnect: (session: any) => {
        alert("Disconnected");
      },
    });

    createWalletConnectSession

    import { createWalletConnectSession } from "thirdweb/wallets/wallet-connect";
    
    createWalletConnectSession({
      walletConnectClient: wcClient,
      uri: "wc:...",
    });

    getWalletConnectSessions

    import {
      getWalletConnectSession,
      type WalletConnectSession,
    } from "thirdweb/wallets/wallet-connect";
    
    const sessions: WalletConnectSession[] = await getWalletConnectSessions();

    disconnectWalletConnectClient

    import { disconnectWalletConnectClient } from "thirdweb/wallets/wallet-connect";
    
    disconnectWalletConnectClient({ session, walletConnectClient: wcClient });
  • #3105 51e7ada Thanks @joaquim-verges! - First party support for zkSync native account abstraction

    You can now use smart accounts on zkSync and zkSync sepolia without any extra setup.

    const wallet = smartWallet({
      chain: zkSync,
      sponsorGas: true,
    });
    
    const smartAccount = await wallet.connect({
      client,
      personalAccount,
    });
    
    // now your can perform transactions normally, gas will be sponsored
    sendTransaction({ transaction, account: smartAccount });
  • #3105 51e7ada Thanks @joaquim-verges! - ZkSync transaction support

Patch Changes

@thirdweb-dev/wallets@2.5.31

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.91

@thirdweb-dev/unity-js-bridge@0.6.40

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.91
    • @thirdweb-dev/wallets@2.5.31
    • @thirdweb-dev/auth@4.1.89

@thirdweb-dev/sdk@4.0.91

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/react@4.6.30

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.91
    • @thirdweb-dev/react-core@4.6.30
    • @thirdweb-dev/wallets@2.5.31

@thirdweb-dev/react-core@4.6.30

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.91
    • @thirdweb-dev/wallets@2.5.31
    • @thirdweb-dev/auth@4.1.89

@thirdweb-dev/cli@0.14.4

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.91
    • @thirdweb-dev/wallets@2.5.31
    • @thirdweb-dev/auth@4.1.89

@thirdweb-dev/auth@4.1.89

01 Jun 04:27
4cddbe7
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/wallets@2.5.31

thirdweb@5.26.0

31 May 19:23
c1e155d
Compare
Choose a tag to compare

Minor Changes

  • #3161 b569eb4 Thanks @gregfromstl! - Adds waitForBundle function to await a sendCalls bundle's complete confirmation.

    Usage

    import { waitForBundle } from "thirdweb/wallets/eip5792";
    const result = await waitForBundle({
      client,
      chain,
      wallet,
      bundleId: "0x123...",
    });
  • #3161 b569eb4 Thanks @gregfromstl! - Adds EIP-5792 react hooks

    useSendCalls

    useSendCalls will automatically revalidate all reads from contracts that are interacted with.

    import { useSendCalls } from "thirdweb/react";
    
    const sendTx1 = approve({
      contract: USDT_CONTRACT,
      amount: 100,
      spender: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6",
    });
    const sendTx2 = approve({
      contract: USDT_CONTRACT,
      amount: 100,
      spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",
    });
    const { mutate: sendCalls, data: bundleId } = useSendCalls({ client });
    await sendCalls({
      wallet,
      client,
      calls: [sendTx1, sendTx2],
    });

    Await the bundle's full confirmation:

    const { mutate: sendCalls, data: bundleId } = useSendCalls({
      client,
      waitForResult: true,
    });
    await sendCalls({
      wallet,
      client,
      calls: [sendTx1, sendTx2],
    });

    Sponsor transactions with a paymaster:

    const { mutate: sendCalls, data: bundleId } = useSendCalls();
    await sendCalls({
      client,
      calls: [sendTx1, sendTx2],
      capabilities: {
        paymasterService: {
          url: `https://${CHAIN.id}.bundler.thirdweb.com/${client.clientId}`,
        },
      },
    });

    useCapabilities

    import { useCapabilities } from "thirdweb/react";
    const { data: capabilities, isLoading } = useCapabilities();

    useCallsStatus

    import { useCallsStatus } from "thirdweb/react";
    const { data: status, isLoading } = useCallsStatus({ bundleId, client });

Patch Changes

@thirdweb-dev/wallets@2.5.30

31 May 19:23
c1e155d
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @thirdweb-dev/sdk@4.0.90