@lens-protocol/client
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

Lens JavaScript SDK

The official framework-agnostic JavaScript SDK for Lens Protocol.


This package enables you to interact with the Lens API via a type safe interface that abstracts away some of the GraphQL intricacies.

Documentation

Quick start

Install the Lens React Native SDK package using your package manager of choice:

Package Manager Command
npm npm install @lens-protocol/client@latest
yarn yarn add @lens-protocol/client@latest
pnpm pnpm add @lens-protocol/client@latest

Development configuration example:

import { LensClient, development } from '@lens-protocol/client';

const client = new LensClient({
  environment: development,
});

Production configuration example:

import { LensClient, production } from '@lens-protocol/client';

const client = new LensClient({
  environment: production,
});

In a browser-based implementation you can use the Web Storage API to persist authentication state.

const client = new LensClient({
  environment: production,

  storage: window.localStorage,
});

Dependents (8)

Package Sidebar

Install

npm i @lens-protocol/client

Weekly Downloads

2,704

Version

2.2.0

License

MIT

Unpacked Size

10.8 MB

Total Files

110

Last publish

Collaborators

  • joshstevens19
  • cnaldi
  • pawel-aave
  • zioid
  • donosonaumczuk
  • npm_avaralabs