Skip to content

Releases: thirdweb-dev/js

thirdweb@5.28.0

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Minor Changes

  • #3198 ca31a6c Thanks @gregfromstl! - Exports toSerializableTransaction to convert preparedTransaction into a fully serializable transaction.
    Exports estimateGasCost to estimate the gas cost of a transaction in ether and wei.
    Exports getGasPrice to get the currect gas price for a chain.

    toSerializableTransaction

    import { prepareTransaction, toSerializableTransaction } from "thirdweb";
    
    const transaction = await prepareTransaction({
      transaction: {
        to: "0x...",
        value: 100,
      },
    });
    const serializableTransaction = await toSerializableTransaction({
      transaction,
    });
    
    account.sendTransaction(serializableTransaction);

    estimateGasCost

    import { estimateGasCost } from "thirdweb";
    
    const gasCost = await estimateGasCost({ transaction });

    getGasPrice

    import { getGasPrice } from "thirdweb";
    
    const gasPrice = await getGasPrice({ client, chain });

Patch Changes

@thirdweb-dev/wallets@2.5.32

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [ae9496e, 043f0da, f13a40b]:
    • @thirdweb-dev/sdk@4.0.92
    • @thirdweb-dev/chains@0.1.116

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

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [ae9496e, 043f0da, f13a40b]:
    • @thirdweb-dev/sdk@4.0.92
    • @thirdweb-dev/chains@0.1.116
    • @thirdweb-dev/wallets@2.5.32
    • @thirdweb-dev/auth@4.1.90

@thirdweb-dev/sdk@4.0.92

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/react@4.6.31

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [ae9496e, 043f0da, f13a40b]:
    • @thirdweb-dev/sdk@4.0.92
    • @thirdweb-dev/chains@0.1.116
    • @thirdweb-dev/react-core@4.6.31
    • @thirdweb-dev/wallets@2.5.32

@thirdweb-dev/react-core@4.6.31

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [ae9496e, 043f0da, f13a40b]:
    • @thirdweb-dev/sdk@4.0.92
    • @thirdweb-dev/chains@0.1.116
    • @thirdweb-dev/wallets@2.5.32
    • @thirdweb-dev/auth@4.1.90

@thirdweb-dev/cli@0.14.5

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [ae9496e, 043f0da, f13a40b]:
    • @thirdweb-dev/sdk@4.0.92
    • @thirdweb-dev/chains@0.1.116
    • @thirdweb-dev/wallets@2.5.32
    • @thirdweb-dev/auth@4.1.90

@thirdweb-dev/chains@0.1.116

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/auth@4.1.90

04 Jun 09:04
5d47e50
Compare
Choose a tag to compare

Patch Changes

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

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