open-index/open-npm huggingface dataset:
npm package: @metahkg/api
Description: Access the metahkg api.
Author: wcyat
Latest version: 6.15.1

# Metahkg Api

Client for the [metahkg server](https://gitlab.com/metahkg/metahkg-server).
Generated with the [openapi spec](https://gitlab.com/metahkg/metahkg-server#openapi-specification) using [nswag](https://github.com/RicoSuter/NSwag).

## Regenerate

```bash
yarn generate
```

## Install

```bash
yarn add @metahkg/api
```

## Usage

Function names are based on operationIds. \
For example, if the operationId is `commentCreate`, you can use `api.commentCreate`.

For operationIds of requests see [api docs](https://docs.metahkg.org/docs/category/api).

```typescript
import { Client } from "@metahkg/api";

const axios = Axios.create();

axios.interceptors.request.use((config) => {
    const token = localStorage.getItem("token");
    if (token && config.headers) config.headers.Authorization = `Bearer ${token}`;
    return config;
});

axios.interceptors.response.use((response) => {
    if (response.headers.token) localStorage.setItem("token", response.headers.token);
    return response;
});

const api = new Client("https://dev.metahkg.org/api", axios);

api
  .thread(1)
  .then(console.log)
  .catch(console.error);
```
npm package: @metahkg/rlp-proxy-rewrite-api
Description: Api client for [rlp-proxy-rewrite](https://gitlab.com/metahkg/rlp-proxy-rewrite).
Author: wcyat
Latest version: 6.15.0-dev

# RLP proxy (rewrite) api

Api client for [rlp-proxy-rewrite](https://gitlab.com/metahkg/rlp-proxy-rewrite).
npm package: @metahub/stylelint-config
Description: A set of shareable stylelint configs
Author: Pierre Vanduynslager
Latest version: 1.2.1
Deprecated: Use stylelint-config-pretty instead

# stylelint-config

Set of Stylelint [shareable config](https://stylelint.io/user-guide/configuration/).

[![npm](https://img.shields.io/npm/v/@metahub/stylelint-config.svg)](https://www.npmjs.com/package/@metahub/stylelint-config)
[![npm](https://img.shields.io/npm/dt/@metahub/stylelint-config.svg)](https://www.npmjs.com/package/@metahub/stylelint-config)
[![Greenkeeper badge](https://badges.greenkeeper.io/vanduynslagerp/stylelint-config.svg)](https://greenkeeper.io/)
[![license](https://img.shields.io/github/license/vanduynslagerp/stylelint-config.svg)](https://github.com/vanduynslagerp/stylelint-config/blob/master/LICENSE)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

[![Travis](https://img.shields.io/travis/vanduynslagerp/stylelint-config.svg)](https://travis-ci.org/vanduynslagerp/stylelint-config)
[![Code Climate](https://img.shields.io/codeclimate/github/vanduynslagerp/stylelint-config.svg)](https://codeclimate.com/github/vanduynslagerp/stylelint-config)
[![Codecov](https://img.shields.io/codecov/c/github/vanduynslagerp/stylelint-config.svg)](https://codecov.io/gh/vanduynslagerp/stylelint-config)

## Installation

```
$ npm install --save-dev stylelint @metahub/stylelint-config
```

## Usage

Once the `@metahub/stylelint-config` package is installed, you can use it by specifying the different configs in the [`extends`](https://stylelint.io/user-guide/configuration/#extends) section of your [Stylelint configuration](https://stylelint.io/user-guide/configuration).

```js
{
  'extends': ['@metahub/stylelint-config/scss-config', '@metahub/stylelint-config/order-config'],
  'rules': {
    // Additional, per-project rules...
  }
}
```

## Config files

|Name|Description|Extends|
|:---|:-----|:----------|
|`@metahub`|Base/generic configuration||
|`@metahub/eslint-config/scss-config`|Rules specific to [Scss files](http://sass-lang.com/)|`@metahub`|
|`@metahub/eslint-config/order-config`|Rules to order properties|`@metahub`|
npm package: @metaio/auth-sdk
Description: This SDK is written in TypeScript, so typing is good.
Author: Casimir Crystal
Latest version: 0.2.3

# Meta Network Auth SDK

This SDK is written in TypeScript, so typing is good.

## ENV

There's two available environment variables you can set:

- `PUBLIC_KEY_FILE_PATH`: A file path to public key file. If this is provided, API will only load the key from this file.
- `NODE_ENV`: This indicates to load which public key from default constants, if no `PUBLIC_KEY_FILE_PATH` is provided.

If no `NODE_ENV` is provided, use `DEVELOPMENT` public key as the default.

## API

Currently, There is only one API exist. `verify()`.

Example: 
```typescript
import { verify } from "@meta-network/auth-sdk"

function handleMetaNetworkAccessToken(token: string) {
  const audienceId = "ACME";

  // `SERVER_PUBLIC_KEY` is optional, only needed if you run a custom server
  const SERVER_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkxk8cbPVsDZpJmsUpXyQPhThf
M7K9juBR6sD7i6WQJzZjVftG+2RMIU2B7b4THz79Iu7ofX4sD9Si6y3hz0XbM7yI
cZ/z90PFzAyDVYR3LWhVoTtMZwOsa42J4/DRvf3D90yPLoMtRW4PVd1FsKVEj2UO
B1WcMmlUmlVTPaPbQQIDAQAB
-----END PUBLIC KEY-----`;
  let decodedJwtPayload;
  try {
      decodedJwtPayload = verify(token, audienceId, SERVER_PUBLIC_KEY);
  } catch (error) {
    throw new Error("Failed to verify the token");
  }
  // ... handle the rest
}
```
npm package: @metaio/meta-signature-util
Description: meta-signature-util
Author: Casimir Crystal
Latest version: 0.9.2

# meta-signature-util

This project is to provide Meta Network with the Authorization Utilities.

## Installation

Using [NPM.js](https://www.npmjs.com/package/@metaio/meta-signature-util):

```bash
npm install @metaio/meta-signature-util
```

Using [Yarn](https://yarnpkg.com/en/package/@metaio/meta-signature-util):

```bash
yarn add @metaio/meta-signature-util
```



## Usage

Import the modules from the `@metaio/meta-signature-util` library, and use the `generate()` method to generate metadata with a signature and the `verify()` method to validate. TypeScript is supported.

```typescript
// import functions and modules
import { generateSeed, generateKeys, authorPostDigestSign } from '@metaio/meta-signature-util';

// generate keys and signature metadata
const seed = generateSeed();
const testKeys = generateKeys(seed)
const metadata = authorPostDigestSign.generate(
  testKeys,
  'server_domain',
  'the_digest',
);

// verify the signature
console.log(authorPostDigestSign.verify(metadata));
```

Please [check our documentation](https://meta-signature-util.vercel.app/) to learn more about the modules.

## Contributing

We welcome any PR or issue. Thank you for contributing to this project!

### Add a new module

To add a new module, please clone [this repository from GitHub](https://github.com/Meta-Network/meta-signature-util), and copy a module from the `src/modules` directory.

Implement your `generate` and `verify` functions, and add the module to the `modules` dictionary. Remember the directory name should be the same as the type name in your metadata.

Then write a test for your module. And update the version in the `package.json` file.

### Add a test case

We're using [Jest](https://jestjs.io/) for testing. Please add your test file to the `test` directory. Name your test file the same as the module, like `meta-network-grids-server-sign.test.ts`.

Make sure all the tests pass before you commit.

## Motivation

![web2_step1](https://user-images.githubusercontent.com/68253563/140607346-f720a48b-9611-43b0-8d11-1073b7cab531.png)
![web2_step2](https://user-images.githubusercontent.com/68253563/140607347-e8c62bd2-105f-41a0-bba4-c7a9a8dd8804.png)
![we are doing](https://user-images.githubusercontent.com/68253563/140607345-c73bce68-9d2c-412d-ae1b-f2d0a2c19dcd.png)

We provide the signature tools needed for the steps in the figure.
npm package: @metaio/meta-signature-util-v2
Description: meta-signature-util-v2
Author: Casimir Crystal
Latest version: 2.3.2

# meta-signature-util-v2

This project is to provide Meta Network with the Authorization Utilities.

This is the version 2, which supports asynchronized receipt to deal with the latency of IPFS. Remeber the central logic is the same, only the `claim` was changed.

## Installation

Using [NPM.js](https://www.npmjs.com/package/@metaio/meta-signature-util-v2):

```bash
npm install @metaio/meta-signature-util-v2
```

Using [Yarn](https://yarnpkg.com/en/package/@metaio/meta-signature-util-v2):

```bash
yarn add @metaio/meta-signature-util-v2
```



## Usage

Import the modules from the `@metaio/meta-signature-util-v2` library, and use the `generate()` method to generate metadata with a signature and the `verify()` method to validate. TypeScript is supported.

```typescript
// import functions and modules
import { generateSeed, generateKeys, authorPostDigestSign } from '@metaio/meta-signature-util-v2';

// generate keys and signature metadata
const seed = generateSeed();
const testKeys = generateKeys(seed)
const metadata = authorPostDigestSign.generate(
  testKeys,
  'server_domain',
  'the_digest',
);

// verify the signature
console.log(authorPostDigestSign.verify(metadata));
```

Please [check our documentation](https://meta-signature-util.vercel.app/) to learn more about the modules.

## Contributing

We welcome any PR or issue. Thank you for contributing to this project!

### Add a new module

To add a new module, please clone [this repository from GitHub](https://github.com/Meta-Network/meta-signature-util-v2), and copy a module from the `src/modules` directory.

Implement your `generate` and `verify` functions, and add the module to the `modules` dictionary. Remember the directory name should be the same as the type name in your metadata.

Then write a test for your module. And update the version in the `package.json` file.

### Add a test case

We're using [Jest](https://jestjs.io/) for testing. Please add your test file to the `test` directory. Name your test file the same as the module, like `meta-network-grids-server-sign.test.ts`.

Make sure all the tests pass before you commit.

## Motivation

![web2_step1](https://user-images.githubusercontent.com/68253563/140607346-f720a48b-9611-43b0-8d11-1073b7cab531.png)
![web2_step2](https://user-images.githubusercontent.com/68253563/140607347-e8c62bd2-105f-41a0-bba4-c7a9a8dd8804.png)
![we are doing](https://user-images.githubusercontent.com/68253563/150483955-f76dfb25-84a3-4a9e-b217-38c4867b4a5b.png)


We provide the signature tools needed for the steps in the figure.