Skip to content

Releases: thirdweb-dev/js

@thirdweb-dev/[email protected]

19 May 02:17
260c2fd
Compare
Choose a tag to compare

@thirdweb-dev/[email protected]

17 May 07:39
0c853e8
Compare
Choose a tag to compare

Patch Changes

[email protected]

16 May 12:10
d0c2ac6
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/[email protected]

16 May 12:10
d0c2ac6
Compare
Choose a tag to compare

@thirdweb-dev/[email protected]

16 May 12:11
d0c2ac6
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/[email protected]

16 May 12:10
d0c2ac6
Compare
Choose a tag to compare

Patch Changes

[email protected]

14 May 02:55
f0f8da8
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/[email protected]

14 May 02:55
f0f8da8
Compare
Choose a tag to compare

[email protected]

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/[email protected]

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