npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lukso/lsp-smart-contracts

v0.16.7

Published

The reference smart contract implementation for the LUKSO LSP standards

Readme

@lukso/lsp-smart-contracts

This is the "umbrella" package for the LSP smart contracts. It contains all the individual @lukso/lspN-contracts packages (where N is an LSP number) as dependencies.

Installation

npm install @lukso/lsp-smart-contracts

Usage

in Javascript

The JSON ABIs of the smart contracts can be imported as follow:

import LSP0ERC725Account from "@lukso/lsp-smart-contracts/artifacts/LSP0ERC725Account.json";

const myContract = new web3.eth.Contract(
  LSP0ERC725Account.abi,
  "",
  defaultOptions
);

in Solidity

import "@lukso/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol";

contract MyAccount is LSP0ERC725Account {
  constructor(address _newOwner) LSP0ERC725Account(_newOwner) {}
}

Available Constants & Types

The @lukso/lsp-smart-contracts npm package contains useful constants such as interface IDs, and ERC725Y data keys related to the LSP Standards. You can import and access them as follows.

import {
  INTERFACE_IDS,
  ERC1271,
  LSP8_TOKEN_ID_FORMAT,
  LSP1_TYPE_IDS,
  OPERATION_TYPES,
  PERMISSIONS,
  ALL_PERMISSIONS,
  SupportedStandards,
  ERC725YDataKeys,
  INTERFACE_ID_LSP1DELEGATE,
  LSP6DataKeys,
  LSP25_VERSION,
  LSPSupportedStandard,
  ErrorSelectors,
  EventSigHashes,
  FunctionSelectors,
  ContractsDocs,
  StateVariables,
} from "@lukso/lsp-smart-contracts";

Note: we also export it as @lukso/lsp-smart-contracts/constants or @lukso/lsp-smart-contracts/constants.js to keep it backward compatible.

It also includes constant values Array data keys to retrieve both the array length and for index access.

'LSP5ReceivedAssets[]': {
    length: '0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b',
    index: '0x6460ee3c0aac563ccbf76d6e1d07bada',
},

Note for Hardhat Typescript projects

If you are trying to import the constants in a Hardhat project that uses Typescript, you will need to import the constants from the dist folder directly, as shown in the code snippet:

import { INTERFACE_IDS } from "@lukso/lsp-smart-contracts/dist/constants.cjs.js";

// This will raise an error if you have ES Lint enabled,
// but will allow you to import the constants in a Hardhat + Typescript based project.
const LSP0InterfaceId = INTERFACE_IDS.LSP0ERC725Account;

See the issue related to Hardhat Typescript + ES Modules in the Hardhat docs for more infos.

Typescript types

The following additional typescript types are also available, including types for the JSON format of the LSP3 Profile and LSP4 Digital Asset metadata.

import {
  LSP2ArrayKey,
  LSPSupportedStandard,
  LSP6PermissionName,
  LSP3ProfileMetadataJSON,
  LSP3ProfileMetadata,
  LSP4DigitalAssetMetadataJSON,
  LSP4DigitalAssetMetadata,
  ImageMetadata,
  LinkMetadata,
  AssetMetadata,
} from "@lukso/lsp-smart-contracts";

You can also import the type-safe ABI of each LSP smart contracts from the /abi path.

import {
  lsp0Erc725AccountAbi,
  lsp6KeyManagerAbi,
  lsp7DigitalAssetAbi,
  lsp8IdentifiableDigitalAssetAbi,
} from "@lukso/lsp-smart-contracts/abi";