Skip to content

Releases: thirdweb-dev/js

thirdweb@5.99.0

12 May 08:47
e8ec54e
Compare
Choose a tag to compare

Minor Changes

  • #7003 58e343c Thanks @joaquim-verges! - Breaking change: EIP-5792 support

    We've significantly improved our EIP-5792 apis, which come with some breaking changes:

    New Functions Added

    1. useSendAndConfirmCalls

      • Description: Hook to send and wait for confirmation of EIP-5792 calls
      • Returns: React Query mutation object with transaction receipts
      • Example:
      const { mutate: sendAndConfirmCalls, data: result } =
        useSendAndConfirmCalls();
      await sendAndConfirmCalls({
        client,
        calls: [tx1, tx2],
      });
      console.log("Transaction hash:", result.receipts?.[0]?.transactionHash);
    2. useWaitForCallsReceipt

      • Description: Hook to wait for the receipt of EIP-5792 calls, perfect for splitting submitting the call and waiting for receipt
      • Returns: React Query object with call receipts
      • Example:
      const { mutate: sendCalls, data: result } = useSendCalls();
      const { data: receipt, isLoading } = useWaitForCallsReceipt(result);

    Breaking Changes

    useSendCalls Changes

    Before

    // mutation returns id a string
    const sendCalls = useSendCalls({ client });

    After

    // no longer needs client
    // mutation returns an object with id
    const sendCalls = useSendCalls();

    Waiting for call receipts is now done separately, via the useWaitForCallsReceipt.

    Before

    const { mutate: sendCalls, data: receipt } = useSendCalls({
      client,
      waitForBundle: true,
    });

    After

    const { mutate: sendCalls, data: result } = useSendCalls();
    const { data: receipt, isLoading } = useWaitForCallsReceipt(result);

    You can also use the helper useSendAndConfirmCalls to combine both submitting and waiting for confirmation.

    const { mutate: sendAndConfirmCalls, data: receipt } =
      useSendAndConfirmCalls();

    sendCalls Changes

    Before:

    // Old output type
    type SendCallsResult = string;

    After:

    // New output type
    type SendCallsResult = {
      id: string;
      client: ThirdwebClient;
      chain: Chain;
      wallet: Wallet;
    };

@thirdweb-dev/wagmi-adapter@0.2.76

12 May 08:48
e8ec54e
Compare
Choose a tag to compare
@thirdweb-dev/wagmi-adapter@0.2.76

thirdweb@5.98.2

11 May 23:21
6a1e54e
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/wagmi-adapter@0.2.75

11 May 23:21
6a1e54e
Compare
Choose a tag to compare
@thirdweb-dev/wagmi-adapter@0.2.75

thirdweb@5.98.1

10 May 13:22
95cc441
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/wagmi-adapter@0.2.74

10 May 13:22
95cc441
Compare
Choose a tag to compare
@thirdweb-dev/wagmi-adapter@0.2.74

@thirdweb-dev/service-utils@0.9.8

09 May 00:37
ef1550c
Compare
Choose a tag to compare

Patch Changes

thirdweb@5.98.0

08 May 01:49
62c179d
Compare
Choose a tag to compare

Minor Changes

  • #6874 e96ebba Thanks @joaquim-verges! - EIP7702 support for in-app wallets

    You can now turn your in-app wallets into smart accounts with 7702!

    This lets you:

    • sponsor transactions
    • batch transactions
    • add session keys
    • and more!

    simply pass the executionMode "EIP7702" to get started:

    const wallet = inAppWallet({
      executionMode: {
        mode: "EIP7702",
        sponsorGas: true,
      },
    });

    Keep in mind that this will only work on chains that support 7702.

@thirdweb-dev/wagmi-adapter@0.2.73

08 May 01:49
62c179d
Compare
Choose a tag to compare
@thirdweb-dev/wagmi-adapter@0.2.73

thirdweb@5.97.3

07 May 23:08
4e6daac
Compare
Choose a tag to compare

Patch Changes