The official SDK for the Lens Chain 🌿.
pnpm add @lens-chain/sdk
# or
npm install @lens-chain/sdk
# or
yarn add @lens-chain/sdkThis section is for developers who want to contribute to the SDK.
- Node.js: >= v20. See installation guide.
- pnpm: v9.1.2. See installation guide.
If you use nvm to manage your Node.js versions, you can run:
nvm useto switch to the correct Node.js version.
We recommend to have corepack enabled to automatically have the correct version of pnpm.
Clone the repository:
git clone https://github.com/lens-network/sdk.gitInstall the dependencies:
pnpm installCreate .env file from the .env.example template:
cp .env.example .envand populate the PRIVATE_KEY environment variable:
PRIVATE_KEY=0x…with the private key of a test EOA.
Run the tests:
pnpm testRun tests tagged with write:
Warning
These tests requires funds in the account specified within the .env file. Use one of the faucets to get $GRASS tokens.
pnpm test:writeLint the code:
pnpm lintCompile the code:
pnpm buildClean the build:
pnpm clean-
Create a new release branch using the
release/X.Y.Znaming convention. -
Bumps up version number and updates the changelog.
pnpm changeset version
-
Commit the changes using
chore: bumps up version numberas the commit message. -
Push the changes to the remote repository.
-
Open a pull request to the
mainbranch. -
Wait for all checks to pass and for the pull request to be approved.
-
Publish the package.
pnpm changeset publish
-
Push tags to the remote repository.
git push --follow-tags
-
Merge the pull request to the
mainbranch.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Lens Chain SDK is MIT licensed.