@lukso/lsp-utils
v0.2.0
Published
A set of TypeScript/JavaScript utils for LUKSO Standard Proposals (LSPs)
Downloads
28
Readme
LSP Smart Contracts Utils ·
This package was created with the intent to help developers to use @lukso/lsp-smart-contracts
. Its purpose is to provide a series of helper functions for each LSP.
- For more information on LSPs see Documentation on docs.lukso.tech.
- For more information on LIPs see Specification
| :warning: | This package is currently in early stages of development, use for testing or experimentation purposes only. | | :-------: | :----------------------------------------------------------------------------------------------------------------- |
Installation
npm
@lukso/lsp-utils
is available as a npm package.
npm install @lukso/lsp-utils
cloning the repository
Alternatively you can also clone the repository and install its dependencies to start using the smart contracts.
$ git clone https://github.com/lukso-network/lsp-utils.git
$ cd ./lsp-utils
$ npm install
Usage
in Javascript
You can use the utils by importing them as follow:
ES6 Modules:
import { encodeAllowedCalls } from '@lukso/lsp-utils/dist/lib/es6';
const allowedCalls = encodeAllowedCalls(
allowedInteractions,
allowedAddresses,
allowedStandards,
allowedFunctions,
);
CommonJS
cosnt { encodeAllowedCalls } = require('@lukso/lsp-utils/dist/lib/es5');
const allowedCalls = encodeAllowedCalls(
allowedInteractions,
allowedAddresses,
allowedStandards,
allowedFunctions
);
Documentation
For more informations check the docs
folder