The official SDK for the Lens Protocol 🌿.
Warning
The Lens SDK is still in its initial development phase. Anything MAY change at any time. This is a Developer Preview aimed primarily at existing integrators so to gather early feedback.
All Lens Protocol documentation, including this SDK documentation can be found at: https://docs.lens.xyz/docs
- Release 1.0: initial stable release.
- Release 1.1: Low-level API abstraction client (name to be decided).
- Release 1.2: support for Data Availability posts.
- Release 1.3: integration with Lens Gated SDK.
Note: This road map is subject to change and is provided for informational purposes only.
Note
At this time we are going to ask the community to hold on any pull requests until we reach an initial stable release (1.x).
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change (issues template will be provided)
Install monorepo dependencies by running this command in the root of the project:
pnpm install
Still in the root of the project, run the following command to build the packages:
pnpm build
To run the tests for all packages, run the following command in the repo root:
pnpm test
To check if there are unneeded duplicates run:
pnpm deduplicate:check
To fix all duplicates run:
pnpm deduplicate:fix
Release flow is managed by changesets.
All publishable monorepo packages follow fixed
versioning scheme to keep things simple.
To release a new version follow the steps below:
- Document new public facing changes during development.
pnpm changeset add
The command will ask a series of questions related to the introduced changes and the version bump that's required to follow semver range.
- Once ready to do a release make sure that all libs are properly built (
dist
folders have the most up-to-date code) and the tests/lints are passing.
## run all from monorepo root
pnpm build
pnpm test
pnpm lint
- Update relevant
package.json
's versions and updateCHANGELOG.md
for each package.
pnpm changeset version
-
Review and commit new release. Create a PR to
main
. -
Once all the steps above are done we are ready to publish a new release to the registry
Note: Before publishing make sure that you are logged in to the correct npm account (run pnpm whoami
). If not, follow prompts from pnpm login
.
pnpm changeset publish
Note: Because this command assumes that the last commit is the release commit, you should not commit any changes between calling version and publish.
- Don't forget to push git tags after publishing to registry.
git push --follow-tags
- It's important that the last commit, from which the release was made and the git tags are associated with, is correctly merged to the
main
branch. Use"Create a merge commit"
option when merging the release branch to themain
.
Lens SDK is MIT licensed
See the Lens API and SDK channel on our Discord