open-index/open-npm huggingface dataset:
npm package: @plasm/types
Description: Plasm Network node type definitions generated with @polkadot/typegen
Author: Stake Technologies
Latest version: 1.5.4-3

# @plasm/types

[![NPM](https://nodei.co/npm/@plasm/types.png?downloads=true)](https://www.npmjs.com/package/@plasm/types)

This is a substrate type definitions made with [@polkadot-js/typegen](https://www.npmjs.com/package/@polkadot/typegen).
It is meant for developers working with TypeScript to interact with the Plasm node.
This package is meant to be used with the [@polakdot-js/api](https://github.com/polkadot-js/api) library.

## Usage

### Importing Types

You can use the `ApiOptions` interface to set the node configuration before initializing the Polkadot API instance.

```ts
import { WsProvider, ApiPromise } from '@polkadot/api';
import { ApiOptions } from '@polkadot/api/types';
import { plasmDefinitions} from '@plasm/types';

// using ApiOptions interface
const options: ApiOptions = {
    provider: new WsProvider('ws://localhost:9944'),
    types: {
        ...plasmDefinitions,
    },
};

const api = new ApiRx(options);
```

Or, you can pass the node types directly when initializing the API instance.

```ts
import { WsProvider, ApiPromise } from '@polkadot/api';
import { plasmDefinitions} from '@plasm/types';

// using the ApiPromise class
const api = await ApiPromise.create({
    provider: new WsProvider('ws://localhost:9944'),
    types: {
        ...plasmDefinitions,
    }
});

await api.isReady;
```

Finally, you can register the types after the API instance has already been created.

```ts
import { plasmDefinitions} from '@plasm/types';

// already initialized api instance
await api.registerTypes(dustyDefinitions);
```

### Generating Types

First, you'll have to manually define chain specific types for each pallets from the `src/interfaces/<module-name>/definitions.ts` file.

The script should export an object that looks something like this:

```ts
export default {
    types: {
        StructA: {
            id: 'u8',
            value_hash: 'H256',
        },
        TypeA: 'H256',
        ...
    },
};
```
npm package: @plasma-fi/default-token-list
Description: 📜 The PlasmaSwap default token list
Latest version: 0.0.4

# @plasma-fi/default-token-list

[![test](https://github.com/itsib/plasmaswap-default-token-list/workflows/test/badge.svg)](https://github.com/itsib/plasmaswap-default-token-list/actions?query=workflow%3Atest)
[![npm](https://img.shields.io/npm/v/@plasma-fi/default-token-list)](https://unpkg.com/@plasma-fi/default-token-list@latest/)

This NPM module and GitHub repo contains the default token list used in the 
[PlasmaSwap](https://apy.plasma.finance/) 
interface.
npm package: @plasma-fi/sdk
Description: 🛠 An SDK for building dapp on PlasmaSwap.
Author: itsib.su@gmail.com
Latest version: 2.6.5

# PlasmaFi SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

## Running tests

To run the tests, follow these steps. You must have at least node v10 installed.

First clone the repository:

```sh
git clone https://github.com/plasmadlt/plasmafi-sdk.git
```

Move into the plasmafi-sdk working directory

```sh
cd plasmafi-sdk/
```

Install dependencies

```sh
npm i
```

Run tests

```sh
npm test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @plasma-fi/token-lists
Description: 📚 The Token Lists specification
Latest version: 0.2.0

# @plasma-fi/token-lists

[![test](https://github.com/itsib/plasmaswap-token-list/workflows/test/badge.svg)](https://github.com/itsib/plasmaswap-token-list/actions?query=workflow%3Atest)
[![npm](https://img.shields.io/npm/v/@plasma-fi/token-lists)](https://unpkg.com/@plasma-fi/token-lists@latest/)


This package includes a JSON schema for token lists, and TypeScript utilities for working with token lists.

The JSON schema represents the technical specification for a token list which can be used in a dApp interface. Like as [PlasmaSwap](https://apy.plasma.finance/).

Specifically an instance of a token list is a [JSON](https://www.json.org/json-en.html) blob that contains a list of 
[ERC20](https://github.com/ethereum/eips/issues/20) token metadata for use in dApp user interfaces.
Token list JSON must validate against the [JSON schema](https://json-schema.org/) in order to be used in the [PlasmaSwap](https://apy.plasma.finance/) Interface.
Tokens on token lists, and token lists themselves, are tagged so that users can easily find tokens.
npm package: @plasma-js/hades
Description: A standalone event handler and data manager.
Author: PlasmaJS
Latest version: 0.5.1

# Hades

A library for data/event handling

## Quickstart

Install:
```bash
npm install --save @plasma-js/hades
```

Then:
```javascript
// const Hades = require('hades').default;
import Hades from 'hades';

const hades = new Hades();
```

## Usage:

### Event manager:

```javascript
const eventName = 'eventExemple';
const eventHandler = function(message) {
  alert(message);
}

// Subscribe
hades.on(eventName, eventHandler);

// Trigger
hades.publish(eventName, 'Trigger message exemple');
```

### Data manager:

```javascript
const collectionName = 'events';
const collectionFields = {
  name: 'string|required',
  location: 'string|required',
  tickets: [
    {
      lote: 'integer|required',
      price: 'float|required',
      avaiable: 'integer|required'
    }
  ]
};

const dataExemple = {
  name: 'Lollapalooza',
  location: 'Indie Land',
  tickets: [
    {
      lote: 1,
      price: 600.00,
      avaiable: 600
    },
    {
      lote: 2,
      price: 700.00,
      avaiable: 1000
    }
  ]
};

// Collection register
hades.collections.new(collectionName, collectionFields);

// Validate a entry before register a new line collection
let validEntry = await hades.collections.events.validate(dataExemple);
```

## Tips:

You can import the data managing only (Collections), like in the exemple bellow:

```javascript
// const Collections = require('hades').Collections;
import { Collections } from 'hades'; // Collections data class
```

Or only the pubsub class:

```javascript
// const Events = require('hades').Events;
import { Events } from 'hades'; // Events data class
```