Changelog

Browse the latest releases of the Lens API and packages.


27 June 2024

This release is focused on few bug fixes and improvements.

Packages

JavaScript SDK

  • Added missing hasBlockedMe field to Profile#operations.

React SDK

  • Added missing hasBlockedMe field to ProfileOperations.

  • Added missing hasQuoted flag to PublicationOperations.

13 June 2024

This release expands the experimental React Suspense support to several React hooks, in addition to other improvements and bug fixes.

Packages

JavaScript SDK

  • Added client.authentication.getRefreshToken() method to retrieve the Refresh Token from an authenticated LensClient instance.

React SDK

  • Added experimental support for React Suspense in the following hooks:
    • usePublications

    • useSearchProfiles

    • useProfileFollowers

    • useProfileFollowing

    • useProfiles

    • useSearchPublications

    • useExplorePublications

    • useExploreProfiles

    • useRecommendedProfiles

    • usePublication

    • useFeed

  • Fixed an issue that prevented useProfileFollowing from updating when a profile was followed or unfollowed.

8 May 2024

Signed Metadata Support

This release introduces signed metadata for Lens Publications.

Packages

Lens Metadata

  • Added signMetadata and lensMessage helpers.

  • Fixed issue affecting VSCode auto-complete leading to @lens-protocol/metadata/* as import paths.

3 May 2024

This release is focused on bug fixes and improvements.

Packages

JavaScript SDK

  • Added client.wallet.hideManagedProfile and client.wallet.unhideManagedProfile methods.

React SDK

  • Added hooks for managing off-chain profile interests: useAddProfileInterests and useRemoveProfileInterests.

  • Added a globalStats alias to publication and profile statistics to distinguish them from App ID-specific statistics.

  • Added experimental support for React Suspense in the useProfile hook.

    Example
    function Profile({ localName }: { localName: string }) {  const { data, error } = useProfile({    forHandle: `lens/${localName}`,    suspense: true,  });
      if (error) {    return <p>Profile not found.</p>;  }
      return <ProfileCard profile={data} />;}

18 April 2024

This release is focused on bug fixes and improvements.

Packages

JavaScript SDK

  • Changed @lens-protocol/metadata to be a direct dependency.

  • Added asFiat to AmountFragment fragments.

React SDK

  • Changed @lens-protocol/metadata to be a direct dependency.

  • Added useRefreshToken hook. See Get Auth Tokens for more details.

12 April 2024

Amoy Testnet Support

This release is primarily focused on support for Amoy testnet across all SDKs.

Packages

JavaScript SDK

  • Updated development environment to Amoy testnet

  • Exported GraphQLClientError from graphql-request - thanks to @UncleBill for the contribution.

  • Fixed feed.latestPaidActions to accept optional request arguments.

React SDK

  • Updated development environment to Amoy testnet.

  • Added useLatestPaidActions hook. See Latest Paid Actions for more details.

  • Added experimental React Suspense support in useSession hook.

    Example
    const { data } = useSession({  suspense: true,});
    switch (data.type) {  case SessionType.Anonymous:    return <Login />;
      case SessionType.JustWallet:    return <MyWallet address={data.address} />;
      case SessionType.WithProfile:    return <MyProfile profile={data.profile} />;
      default:    return <p>Something went wrong.</p>;}
  • Aligned testnet Handle namespace to mainnet (i.e., lens/)

  • Enabled signless initialization of sponsored Open Action and Reference modules

4 April 2024

Lens SDK 2.0 - STABLE

This release concludes the 2.x alpha phase.

Packages

There are no functional changes in this release compared to the previous 2.x alpha release.

4 March 2024

This release is primarily focused on bug fixes and few improvements.

Packages

JavaScript SDK

  • Added missing lensPublicActProxyOnchainSigNonce field to UserSigNoncesFragment

React SDK

  • Added useRecommendProfileToggle hook

  • Fixed useUpdateProfileManagers preconditions logic when approving signless

  • Fix nonce management for link/unlink handles and unfollow profile

26 February 2024

This release is in preparation for the stable 2.x release.

Please note that several deprecated features have been removed.

Packages

JavaScript SDK

  • Breaking change: Remove all what was marked as deprecated.

  • Added client.profile.recommend and client.profile.unrecommend methods

React SDKs

These changes applies to both React Web and React Native SDKs.

  • Breaking change: Remove all what was marked as deprecated.

  • Allow to overwrite all onchain transactions to be self-funded on the config level

  • Added useHideCommentToggle hook

  • Added fiatAmount helper

  • Added new fields:
    • lensClassifierScore on ProfileStats

    • collectNft on all relevant OpenActionSettings

    • isEncrypted, profilesMentioned and hashtagsMentioned on Post, Comment and Quote

  • Fixed pagination issue affecting many hooks

  • Fixed optimistic update of Comment|Post|Quote.operations.hasCollected field

  • Fixed stuck useCurrencies pagination

  • Updated Apollo Client dependency to ^3.9.5

React Native SDK

  • Allow to define Origin header from React Native integrations