{"id":13767161,"url":"https://github.com/lens-protocol/lens-sdk","last_synced_at":"2025-05-15T01:07:58.875Z","repository":{"id":65066704,"uuid":"572127668","full_name":"lens-protocol/lens-sdk","owner":"lens-protocol","description":"The official SDK to interact with the Lens Protocol","archived":false,"fork":false,"pushed_at":"2025-05-14T09:30:03.000Z","size":50885,"stargazers_count":249,"open_issues_count":8,"forks_count":90,"subscribers_count":8,"default_branch":"next","last_synced_at":"2025-05-14T09:46:46.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lens.xyz/docs/protocol","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lens-protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-29T15:59:13.000Z","updated_at":"2025-05-09T09:33:42.000Z","dependencies_parsed_at":"2023-10-03T12:39:40.649Z","dependency_job_id":"d7b54a0f-88bb-4522-aa28-519fc067efc3","html_url":"https://github.com/lens-protocol/lens-sdk","commit_stats":{"total_commits":203,"total_committers":3,"mean_commits":67.66666666666667,"dds":"0.41871921182266014","last_synced_commit":"40c59099218a198f0eefceacb61f61f8ab5f1ebb"},"previous_names":[],"tags_count":697,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Flens-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Flens-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Flens-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Flens-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lens-protocol","download_url":"https://codeload.github.com/lens-protocol/lens-sdk/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254138955,"owners_count":22021087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:01:05.617Z","updated_at":"2025-05-15T01:07:53.865Z","avatar_url":"https://github.com/lens-protocol.png","language":"TypeScript","funding_links":[],"categories":["Resources (10)","Development"],"sub_categories":["Libraries \u0026 Tools"],"readme":"# Lens SDK\n\nThe official SDK for the Lens 🌿.\n\n## Table of Contents \u003c!-- omit in toc --\u003e\n\n- [Installation](#installation)\n- [Development Workflow](#development-workflow)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n## Development Workflow\n\nThis section is for developers who want to contribute to the SDK.\n\n### Initial Setup \u003c!-- omit in toc --\u003e\n\nClone the repository:\n\n```bash\ngit clone https://github.com/lens-network/sdk.git\n```\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n### Pre-requisites: \u003c!-- omit in toc --\u003e\n\n- Node.js: \u003e= v20. See [installation guide](https://nodejs.org/en/download/package-manager).\n- pnpm: v9.1.2. See [installation guide](https://pnpm.io/installation).\n\nUse [nvm](https://github.com/nvm-sh/nvm) to manage your Node.js versions. Run the following command in the project root folder:\n\n```bash\nnvm use\n```\n\nto switch to the correct Node.js version.\n\nEnable [corepack](https://www.totaltypescript.com/how-to-use-corepack) to use the the correct version of `pnpm`.\n\nRun the following command in the project root folder:\n\n```bash\ncorepack install\n```\n\nto install the correct version once. After that corepack will automatically use the correct version of `pnpm` when entering the project folder.\n\n### Usage \u003c!-- omit in toc --\u003e\n\nRun the tests:\n\n- `pnpm test:client`: Run the tests for the `@lens-protocol/client` package.\n\nLint the code:\n\n```bash\npnpm lint\n```\n\nCompile the code:\n\n```bash\npnpm build\n```\n\nClean the build:\n\n```bash\npnpm clean\n```\n\nCreate a new package:\n\n```bash\npnpm new:package\n```\n\n### IDE Setup \u003c!-- omit in toc --\u003e\n\nThe project uses [Biome](https://biomejs.dev/) to format and lint the code. You can install the Biome extension for your IDE: https://biomejs.dev/guides/editors/first-party-extensions/\n\n### Publishing \u003c!-- omit in toc --\u003e\n\n1. Create a new release branch using the `release/X.Y.Z` naming convention.\n2. Bumps up version number and updates the changelog.\n\n   ```bash\n   pnpm changeset version\n   ```\n\n3. Commit the changes using `chore: bumps up version number` as the commit message.\n4. Push the changes to the remote repository.\n5. Open a pull request to the `main` branch.\n6. Wait for all checks to pass and for the pull request to be approved.\n7. Publish the package.\n\n   ```bash\n   pnpm changeset publish\n   ```\n\n8. Push tags to the remote repository.\n\n   ```bash\n   git push --follow-tags\n   ```\n\n9. Merge the pull request to the `main` branch.\n\n## Troubleshooting\n\n### Incompatible Types Across Packages \u003c!-- omit in toc --\u003e\n\nWorking within a monorepo can sometimes lead to type incompatibilities across packages. If you encounter an error like:\n\n```bash\nType 'import(\"[...]/packages/client/dist/index\").PublicClient\u003cimport(\"[...]/packages/client/dist/index\").Context\u003e' is not assignable to type 'import(\"[...]/packages/client/src/clients\").PublicClient\u003cimport(\"[...]/packages/client/src/context\").Context\u003e'.\n```\n\nThis usually indicates that TypeScript is picking up types from different versions of the same package. To resolve this, make sure you have configured the entry points correctly as aliases in the top level `tsconfig.json` file.\n\n```json\n{\n  \"$schema\": \"https://json.schemastore.org/tsconfig\",\n  \"compilerOptions\": {\n    \"skipLibCheck\": true,\n    \"types\": [\"node\"],\n    \"paths\": {\n      \"@lens-protocol/client\": [\"./packages/client/src\"],\n      \"@lens-protocol/client/actions\": [\"./packages/client/src/actions\"],\n      \"@lens-protocol/client/test-utils\": [\"./packages/client/src/test-utils\"],\n      \"@lens-protocol/env\": [\"./packages/env/src\"],\n      \"@lens-protocol/graphql\": [\"./packages/graphql/src\"],\n      \"@lens-protocol/react\": [\"./packages/react/src\"],\n      \"@lens-protocol/storage\": [\"./packages/storage/src\"],\n      \"@lens-protocol/types\": [\"./packages/types/src\"]\n    }\n  },\n  \"include\": [\"**/*.ts\"],\n  \"exclude\": [\"dist\", \"node_modules\"]\n}\n```\n\n## Contributing\n\nWe are currently focused on launching Lens Network mainnet and Lens Protocol v3. We are not able to accept contributions at this time. We will update this section in due course.\n\nIf you have a pressing issue or feature request, please open an issue on GitHub.\n\n## License\n\nLens SDK is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Flens-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flens-protocol%2Flens-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Flens-sdk/lists"}