New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@litentry/chain-types

Package Overview
Dependencies
Maintainers
7
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@litentry/chain-types

This library contains the Litentry Network API types and types definitions.

latest
npmnpm
Version
2.1.0
Version published
Maintainers
7
Created
Source

chain-types

This library contains the Litentry Network API types and types definitions.

These types were auto generated using Polkadot.js Type Generation

How to use it

  • Install the package from NPM

    npm install @litentry/chain-types
    
  • Extend and decorate the API's types with:

    import { identityManagement } from '@litentry/chain-types';
    
    const api = await ApiPromise.create({
      provider: wsProvider,
      types: {
        ...identityManagement.types,
      },
    });
    
  • Import type definitions as needed:

    import type { LitentryIdentity } from '@litentry/chain-types';
    
    function myFunction(identity: LitentryIdentity) {
      // ...
    }
    

Versions

This package is distributed under two main tags: next and latest.

Versions in the pattern of x.x.x-next.x feature the most recent code version to work with tee-dev. E.g., 1.0.0-next.0. Once stable and once the Litentry Protocol is upgraded, the version will be tagged as latest and should be used against tee-prod. E.g., 1.0.0. You can find all versions on https://www.npmjs.com/package/@litentry/chain-types?activeTab=versions

Development

Quick start

  • Install dependencies

    pnpm install
    
  • Spin up an local NPM registry

    pnpm nx local-registry
    
  • Publish locally

    Follow the steps of Publish new versions. The step 1 can be skipped.

    As long as the local registry is up, any publishing will happen locally.

  • Run test and lint checks

    pnpm nx run chain-types:lint
    
    pnpm nx run chain-types:test
    

Publish new versions

  • Bump the version on package.json to for instance 1.0.0.

  • Update the latest documentation

    pnpm nx run chain-types:generate-doc
    
  • Build the project

    pnpm nx run chain-types:build
    
  • Publish the distribution files

    pnpm nx run chain-types:publish --ver 1.0.0 --tag latest
    

How to regenerate types

By default, the following commands will ran against the tee-dev Parachain Endpoint

pnpm nx run chain-types:download-meta
pnpm nx run chain-types:generate-defs
pnpm nx run chain-types:generate-meta

When to regenerate types

Regenerating types can be done at any time. It will pull metadata from the Parachain and create the corresponding interfaces, types and API metadata.

We may want to regenerate when any of these happen:

FAQs

Package last updated on 04 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts