Skip to content

Releases: thirdweb-dev/js

thirdweb@5.55.0

13 Sep 19:15
d115307
Compare
Choose a tag to compare

Minor Changes

  • #4571 5058fdb Thanks @gregfromstl! - Adds X authentication

  • #4565 c0778cb Thanks @gregfromstl! - Adds parseAvatarRecord and parseNftUri utilities

    import { parseAvatarRecord } from "thirdweb/extensions/ens";
    import { parseNftUri } from "thirdweb/extensions/common";
    
    const avatarUrl = await parseAvatarRecord({
      client,
      uri: "...",
    });
    
    const nftUri = await parseNftUri({
      client,
      uri: "...",
    });

Patch Changes

  • #4582 5d3b395 Thanks @gregfromstl! - Adds the ability to hide certain wallets in the wallet switcher

    <ConnectButton
      client={client}
      detailsModal={{
        // We hide the in-app wallet so they can't switch to it
        hiddenWallets: ["inApp"],
      }}
      accountAbstraction={{
        chain: baseSepolia,
        sponsorGas: true,
      }}
    />
  • #4546 3901805 Thanks @edwardysun! - Add preferredProvider to buyWithFiat

thirdweb@5.54.0

12 Sep 18:23
22e066c
Compare
Choose a tag to compare

Minor Changes

  • #4527 b76a82c Thanks @joaquim-verges! - Update React Native dependencies and add support for React Native 0.75

  • #4499 fe1ff63 Thanks @joaquim-verges! - Breaking Change in deployPublishedContract

    Contract constructor/ initializer params are now passed as a single object instead of an array. The object should have the same shape as the params defined in the contract's ABI.

    Example of old way (using constructorParams or initializeParams):

    const address = await deployPublishedContract({
      account,
      chain,
      client,
      contractId: "Airdrop",
      contractParams: [TEST_ACCOUNT_A.address, ""],
    });

    New way (using contractParams):

    const address = await deployPublishedContract({
      account,
      chain,
      client,
      contractId: "Airdrop",
      contractParams: {
        defaultAdmin: TEST_ACCOUNT_A.address,
        contractURI: "",
      },
    });
  • #4528 c96e2d9 Thanks @joaquim-verges! - Handle salt parameter for deterministic deploys of published contracts

    You can now pass a salt parameter to the deployPublishedContract function to deploy a contract deterministically.

    const address = await deployPublishedContract({
      client,
      chain,
      account,
      contractId: "Airdrop",
      contractParams: {
        defaultAdmin: "0x...",
        contractURI: "ipfs://...",
      },
      salt: "test", // <--- deterministic deploy
    });

    This also works for unpublished contracts, via the deployContract function.

    const address = await deployContract({
      client,
      chain,
      account,
      bytecode: "0x...",
      abi: contractAbi,
      constructorParams: {
        param1: "value1",
        param2: 123,
      },
      salt: "test", // <--- deterministic deploy
    });
  • #4541 0596fa2 Thanks @gregfromstl! - Adds getUsers function to query users on the server

    import { getUser } from "thirdweb/wallets";
    
    const user = await getUser({
      client,
      walletAddress: "0x123...",
    });

Patch Changes

@thirdweb-dev/react-native-adapter@1.4.0

12 Sep 18:23
22e066c
Compare
Choose a tag to compare

Minor Changes

thirdweb@5.53.0

09 Sep 22:09
85c951a
Compare
Choose a tag to compare

Minor Changes

  • #4094 f1d087e Thanks @joaquim-verges! - Support for Coinbase Smart Wallet in React Native

    You can now use the Coinbase Smart Wallet in your React Native apps.

    const wallet = createWallet("com.coinbase.wallet", {
      appMetadata: {
        name: "My app name",
      },
      mobileConfig: {
        callbackURL: "https://example.com",
      },
      walletConfig: {
        options: "smartWalletOnly",
      },
    });
    
    await wallet.connect({
      client,
    });
  • #4454 c546b65 Thanks @joaquim-verges! - Expose createAndSignUserOp utility function

Patch Changes

@thirdweb-dev/react-native-adapter@1.3.0

09 Sep 22:09
85c951a
Compare
Choose a tag to compare

Minor Changes

  • #4094 f1d087e Thanks @joaquim-verges! - Support for Coinbase Smart Wallet in React Native

    You can now use the Coinbase Smart Wallet in your React Native apps.

    const wallet = createWallet("com.coinbase.wallet", {
      appMetadata: {
        name: "My app name",
      },
      mobileConfig: {
        callbackURL: "https://example.com",
      },
      walletConfig: {
        options: "smartWalletOnly",
      },
    });
    
    await wallet.connect({
      client,
    });

thirdweb@5.52.0

06 Sep 23:38
10f654d
Compare
Choose a tag to compare

Minor Changes

  • #4349 a2d2291 Thanks @gregfromstl! - Adds social profile retrieval for Farcaster, Lens, and ENS.

    import { getSocialProfiles } from "thirdweb/social";
    const profiles = await getSocialProfiles({
      address: "0x...",
      client,
    });
    [
      {
        "type": "ens",
        "name": "joenrv.eth",
        "avatar": "ipfs://bafybeic2wvtpv5hpdyeuy6o77yd5fp2ndfygppd6drdxvtfd2jouijn72m",
        "metadata": {
          "name": "joenrv.eth"
        }
      },
      {
        "type": "farcaster",
        "name": "joaquim",
        "bio": "Eng Lead @ thirdweb",
        "avatar": "https://lh3.googleusercontent.com/EUELPFJzdDNcc3qSaEMekh0_W16acnS8MSvWizt-7HPaQhfJsNFC5HA0W4NKcy6CN9zmV7d4Crqg2B8qM9BpiveqVTl2GPBQ16Ax2IQ",
        "metadata": {
          "fid": 2735,
          "bio": "Eng Lead @ thirdweb",
          "pfp": "https://lh3.googleusercontent.com/EUELPFJzdDNcc3qSaEMekh0_W16acnS8MSvWizt-7HPaQhfJsNFC5HA0W4NKcy6CN9zmV7d4Crqg2B8qM9BpiveqVTl2GPBQ16Ax2IQ",
          "username": "joaquim",
          "addresses": [
            "0x2247d5d238d0f9d37184d8332ae0289d1ad9991b",
            "0xf7970369310b541b8a84086c8c1c81d3beb85e0e"
          ]
        }
      },
      {
        "type": "lens",
        "name": "joaquim",
        "bio": "Lead engineer @thirdweb",
        "avatar": "https://ik.imagekit.io/lens/media-snapshot/557708cc7581172234133c10d473058ace362c5f547fa86cee5be2abe1478e5b.png",
        "metadata": {
          "name": "joaquim",
          "bio": "Lead engineer @thirdweb",
          "picture": "https://ik.imagekit.io/lens/media-snapshot/557708cc7581172234133c10d473058ace362c5f547fa86cee5be2abe1478e5b.png"
        }
      }
    ]
    import { useSocialProfiles } from "thirdweb/react";
    const { data: profiles } = useSocialProfiles({
      client,
      address: "0x...",
    });
  • #3413 87d6b6a Thanks @joaquim-verges! - Support for modular contracts

    Deploy and Interact with modular contracts programmatically

    Deploy a modular contract

    import {
      ClaimableERC721,
      BatchMetadataERC721,
      deployModularContract,
    } from "thirdweb/modules";
    
    const deployed = deployModularContract({
       client,
       chain,
       account,
       core: "ERC721",
       params: {
         name: "My Modular NFT Contract",
       },
       modules: [
         ClaimableERC721.module({
            primarySaleRecipient: ...,
         }),
         BatchMetadataERC721.module(),
       ],
    });

    Interact with a modular contract

    import { ClaimableERC721 } from "thirdweb/modules";
    
    const contract = getContract({
      client,
      chain,
      address,
    });
    
    const transaction = ClaimableERC721.mint({
      contract,
      to: account.address,
      quantity: 1,
    });
    
    await sendTransaction({
      transaction,
      account,
    });

Patch Changes

thirdweb@5.51.0

05 Sep 10:07
e6f8b3e
Compare
Choose a tag to compare

Minor Changes

Patch Changes

thirdweb@5.50.1

04 Sep 22:34
257e428
Compare
Choose a tag to compare

Patch Changes

  • #4388 82a30af Thanks @edwardysun! - Update setting default source chain and token

  • #4375 edb95d0 Thanks @jnsdls! - [Extensions] expose permission detection logic

  • #4390 d74e61b Thanks @MananTank! - Fix Swap Fees layout in fees drawer in pay UI

  • #4319 73e5dc7 Thanks @joaquim-verges! - Fix direct payments to the same wallet

  • #4382 9e8d3e6 Thanks @MananTank! - Add props for hiding "Send", "Receive" and "Send" buttons in Connect Details Modal UI for ConnectButton component. By default, all buttons are visible in the modal.

    <ConnectButton
      detailsModal={{
        hideSendFunds: false,
        hideReceiveFunds: true,
        hideBuyFunds: false,
      }}
    />
  • #4363 066aede Thanks @kien-ngo! - Allow to specify "from" and "to" props for the ClaimButton

thirdweb@5.50.0

03 Sep 03:05
cb6d7a3
Compare
Choose a tag to compare

Minor Changes

Patch Changes

thirdweb@5.49.0

30 Aug 10:01
e46b3d3
Compare
Choose a tag to compare

Minor Changes

  • #4179 42d5c65 Thanks @kien-ngo! - Add NFT prebuilt components

    import { getContract } from "thirdweb";
    import { NFT } from "thirdweb/react";
    
    const contract = getContract({
      address: "0x...",
      chain: ethereum,
      client: yourThirdwebClient,
    });
    
    <NFT contract={contract} tokenId={0n}>
      <Suspense fallback={"Loading media..."}>
        <NFT.Media />
      </Suspense>
    </NFT>;

Patch Changes