Skip to content

The quickest way to connect your dApp to Lens Chain.

License

Notifications You must be signed in to change notification settings

lens-protocol/lens-chain-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lens Chain SDK

The official SDK for the Lens Chain 🌿.

Table of Contents

Installation

pnpm add @lens-chain/sdk

# or

npm install @lens-chain/sdk

# or

yarn add @lens-chain/sdk

Development Workflow

This section is for developers who want to contribute to the SDK.

Pre-requisites:

If you use nvm to manage your Node.js versions, you can run:

nvm use

to switch to the correct Node.js version.

We recommend to have corepack enabled to automatically have the correct version of pnpm.

Initial Setup

Clone the repository:

git clone https://github.com/lens-network/sdk.git

Install the dependencies:

pnpm install

Create .env file from the .env.example template:

cp .env.example .env

and populate the PRIVATE_KEY environment variable:

PRIVATE_KEY=0x…

with the private key of a test EOA.

Usage

Run the tests:

pnpm test

Run 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:write

Lint the code:

pnpm lint

Compile the code:

pnpm build

Clean the build:

pnpm clean

Publishing

  1. Create a new release branch using the release/X.Y.Z naming convention.

  2. Bumps up version number and updates the changelog.

    pnpm changeset version
  3. Commit the changes using chore: bumps up version number as the commit message.

  4. Push the changes to the remote repository.

  5. Open a pull request to the main branch.

  6. Wait for all checks to pass and for the pull request to be approved.

  7. Publish the package.

    pnpm changeset publish
  8. Push tags to the remote repository.

    git push --follow-tags
  9. Merge the pull request to the main branch.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Lens Chain SDK is MIT licensed.

About

The quickest way to connect your dApp to Lens Chain.

Resources

License

Stars

Watchers

Forks