open-index/open-npm huggingface dataset:
npm package: @rshiner/learnstorybook-design-system
Description: Storybook design systems tutorial
Author: Raymond Shiner
Latest version: 0.1.0

# Storybook design system tutorial

The Storybook design system tutorial is a subset of the full [Storybook design system](https://github.com/storybookjs/design-system/), created as a learning resource for those interested in learning how to write and publish a design system using best in practice techniques.

Learn more in [Storybook tutorials](https://storybook.js.org/tutorials/).
npm package: @rshtg/react-native-pasteboard
Description: Implementation of the React Native Bridge for UIPasteboard to set primitive data
Author: Rishat Gabaydullov
Latest version: 0.1.0


# react-native-react-native-pasteboard

## Getting started

`$ npm install react-native-react-native-pasteboard --save`

### Mostly automatic installation

`$ react-native link react-native-react-native-pasteboard`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-react-native-pasteboard` and add `RNReactNativePasteboard.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNReactNativePasteboard.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import org.gabaydullov.instagram-pasteboard.RNReactNativePasteboardPackage;` to the imports at the top of the file
  - Add `new RNReactNativePasteboardPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-react-native-pasteboard'
  	project(':react-native-react-native-pasteboard').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-react-native-pasteboard/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-react-native-pasteboard')
  	```


## Usage
```javascript
import RNReactNativePasteboard from 'react-native-react-native-pasteboard';

// TODO: What to do with the module?
RNReactNativePasteboard;
```
npm package: @rsidi/scope
Description: Un analyseur complet de projets Angular générant des rapports HTML visuels avec une visualisation de l'arbre des composants
Author: Ramzi SIDI IBRAHIM
Latest version: 1.1.5

# Sidi-Scope

Un analyseur de projets Angular qui génère des rapports visuels avec une visualisation de l'arbre des composants.

## Fonctionnalités

- 📊 Analyse des dépendances
  - Identification des dépendances utilisées
  - Détection des dépendances inutilisées
  - Analyse des dépendances circulaires

- 🗺️ Cartographie du projet
  - Arborescence visuelle des fichiers Angular
  - Graphe des relations entre composants
  - Identification des composants orphelins

- 📈 Métriques de code
  - Statistiques détaillées du projet
  - Analyse de complexité
  - Métriques d'utilisation des composants

## Installation

```bash
npm install -g @rsidi/scope
```

## Utilisation

1. Naviguez vers votre projet Angular :
```bash
cd mon-projet-angular
```

2. Lancez l'analyse :
```bash
sidi-scope analyse .
```

3. Ouvrez le rapport généré dans votre navigateur :
```bash
open sidi-scope-report/index.html  # Sur macOS
start sidi-scope-report/index.html  # Sur Windows
xdg-open sidi-scope-report/index.html  # Sur Linux
```

## Métriques disponibles

- **Composants**
  - Nombre total
  - Complexité cyclomatique
  - Dépendances
  - Composants orphelins

- **Services**
  - Nombre total
  - Utilisation
  - Dépendances

- **Modules**
  - Structure
  - Imports/Exports

- **Arbre des composants**
  - Profondeur maximale
  - Profondeur moyenne
  - Distribution par niveau

## Contribution

Les contributions sont les bienvenues ! N'hésitez pas à :

1. Fork le projet
2. Créer une branche (`git checkout -b feature/amelioration`)
3. Commit vos changements (`git commit -am 'Ajout d'une nouvelle fonctionnalité'`)
4. Push vers la branche (`git push origin feature/amelioration`)
5. Créer une Pull Request

## License

MIT

## Auteur

Ramzi SIDI IBRAHIM
npm package: @rsiqueira/use-viacep
Description: React hook to fetch Brazilian CEP's using ViaCEP api.
Author: Raí Siqueira
Latest version: 1.5.3

# useViaCep

<p align="center">
 <img width="60%" height="60%" src="https://res.cloudinary.com/dwc5hkby0/image/upload/v1586797570/project-logo.svg">
</p>

![use-viacep](https://badgen.net/bundlephobia/minzip/@rsiqueira/use-viacep)

React hook to fetch Brazilian CEP's using ViaCEP api.

## Install

Use your prefer package manager

```bash
npm i --save @rsiqueira/use-viacep
# or
yarn add @rsiqueira/use-viacep
# or
pnpm add @rsiqueira/use-viacep
```

## Usage

```tsx
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import useViaCep from '@rsiqueira/use-viacep';

const App = () => {
  const [data, setData] = React.useState('');
  const { cep, loading, error } = useViaCep(data);

  if (loading) {
    return <p>loading...</p>;
  }

  return (
    <div>
      <input placeholder="cep" onChange={(e) => setData(e.target.value)} />
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));
```

## Contributing

Clone this repository and run `pnpm install`. If you don't have pnpm, install it with `npm install -g pnpm`.

### Folder structure

- `example` - A folder with an example project. Think as playground.
- `lib` - The source of `@rsiqueira/use-viacep`.

### What is in this repository?

- [PNPM](https://pnpm.io/workspaces) as workspace manager and package manager.
- [TSUP](https://tsup.egoist.dev/) as a TypeScript universal package.
- [Vitest](https://vitest.dev/) as a test runner.
- [Size Limit](https://github.com/ai/size-limit) as a size limit plugin.
- [Prettier](https://prettier.io/) as a code formatter.
- [ESLint](https://eslint.org/) as a code linter.

### Using the Playground

In the root of the repository, run the following command:

```bash
pnpm run dev # to build the library (with --watch flag)
pnpm -F example dev
```

The command will run the example project with [Vite](https://vitejs.dev/).

## Sponsors

[![Sponsors](https://cdn.jsdelivr.net/gh/raisiqueira/static@master/sponsors.svg)](https://github.com/sponsors/raisiqueira)

## License

MIT @ Rai Siqueira
npm package: @rsjs/cosine-win32-x64-msvc
Description: This is the **x86_64-pc-windows-msvc** binary for `@rsjs/cosine`
Latest version: 0.2.2

# `@rsjs/cosine-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@rsjs/cosine`
npm package: @rsksmart/btc-eth-unit-converter
Description: Tool to provide safe conversion between units in BTC and ETH
Latest version: 1.0.1

<img src="./rootstock_logo.png" alt="Rootstock" />

# btc-eth-unit-converter

Tool to provide safe conversion between units in BTC and ETH

## Installation

> npm install @rsksmart/btc-eth-unit-converter

## Usage

The following conversion functions are available

- weisToGwei
- weisToEth
- gweisToWeis
- gweisToEth
- ethToWeis
- ethToGweis
- satoshisToBtc
- btcToSatoshis
- weisToSatoshis 
- weisToBtc
- ethToSatoshis
- satoshisToWeis
- satoshisToEth
- btcToWeis

For any invalid value (below minimum, negative or base unit decimals) an error will be thrown. Below minimum refers to values that represent an amount lower than the smallest base unit, for example `weisToSatoshis(1)` will throw an error because the result is less than 1 satoshi which is the smallest base unit.

## Sample

A sample file showing how to use the library is included under `sample/` directory. To run the sample file:

> node run sample/sample.js

## Test

To run test with coverage, run:

> npm run test

## Contributing

Any comments or suggestions feel free to contribute or reach out at our [discord server](https://discord.gg/rootstock).
npm package: @rsksmart/btc-rsk-derivation
Description: Tool can be used to derive a BTC private key from an RSK private key and address, and vice versa.
Author: IOV Studio LLP
Latest version: 0.0.2

# btc-rsk-derivation
This tool can be used to derive a BTC private key from an RSK private key and address, and vice versa.

**You can derive RSK addresses from any valid BTC private key using this tool, but you may only derive RSK private keys from P2PKH BTC private keys.
This is an RSK limitation.**

## Requirements

run `npm install`.

## Methods

### isValidBtcPrivateKey
Given a `string` representing a BTC private key (in WIF format) and the network(`mainnet` or `testnet`), this function will indicate with a `boolean` if the private key is valid or not.

### isValidRskPrivateKey
Given a `string` representing a RSK private key, this function will indicate with a `boolean` if the private key is valid or not.

### getDerivedRSKAddressInformation
Given a `string` representing a BTC private key (in WIF format) and the network(`mainnet` or `testnet`), this function will return derived information. It includes the RSK address and private key. e.g.:

```
{
 address: '36eb6a1d1720a6037d0680b8b357fc661a24bfdc',
 privateKey: '2cfc1062d5beff50764f3d1b7a8d2d67ac4736c14caceeeb956bcc815c8a0708'
}
```

### getDerivedBTCAddressInformation
Given a `string` representing a RSK private key and the network(`mainnet` or `testnet`) , this function will return derived information. It includes the BTC address (`p2pkh`) and private key. e.g.:

```
{
 address: '17G5dLTzxnZAWgbBpAVQfi8nGLXo6P4WFV',
 privateKey: 'Kxj9x4G2Uvw8CbngATxGZLY4K2EFkjty7mumLabJQEhHw9ZLyZTs'
}
```

### getNetworkTypes
Returns bitcoin networks. e.g.:
```
{
    MAINNET: 'mainnet',
    TESTNET: 'testnet'
}
```

## How to use it

### NodeJs

Require the package and use the available methods.

Sample usage:

**BTC --> RSK**

```javascript
const btcRskDerivation = require('@rsksmart/btc-rsk-derivation');
let btcPrivateKey = 'Kxj9x4G2Uvw8CbngATxGZLY4K2EFkjty7mumLabJQEhHw9ZLyZTs';
let addressInformation = btcRskDerivation.getDerivedRSKAddressInformation(btcPrivateKey);
console.log(`RSK Address ${addressInformation.address}`);
console.log(`RSK PrivateKey ${addressInformation.privateKey}`);
```

**RSK --> BTC**

```javascript
const btcRskDerivation = require('@rsksmart/btc-rsk-derivation');
let rskPrivateKey = '2cfc1062d5beff50764f3d1b7a8d2d67ac4736c14caceeeb956bcc815c8a0708';
let addressInformation = btcRskDerivation.getDerivedBTCAddressInformation(rskPrivateKey);
console.log(`BTC Address ${addressInformation.address}`);
console.log(`BTC PrivateKey ${addressInformation.privateKey}`);
```
npm package: @rsksmart/dcent-provider
Description: D'CENT Provider wrapping Dcent Web Connector
Author: IoTrust Co. Ltd.,
Latest version: 0.3.0-beta

# dcent-provider

This package is ethereum web3 provider of D'CENT Biometric Wallet.
It is the wrapping package communicating with [`dcent-web-connector`](https://github.com/DcentWallet/dcent-web-connector). Since `dcent-web-connector` can be used only on desktop environment via USB interface, this package only for desktop environment.

## Prerequisite

* [D'CENT Biometric Wallet](https://dcentwallet.com/products/BiometricWallet) device

## Installation

```sh
npm i dcent-provider
```

## Usage

### Create provider and use directly

```js
import DcentProvider from 'dcent-provider'

const provider = new DcentProvider({
    rpcUrl: "YOUR_RPC_URL",   // required
    chainId: 1, // (optional) default = 1
})

const account = await provider.enable()
const tx = {
    from: account[0],
    gasPrice: "2000000000",
    gas: "21000",
    to: account[0],
    value: "0",
    data: ""
}
const receipt = await provider.send('eth_sendTransaction', tx)
```

### Set provider on web3js

```js
import Web3 from 'web3'
import DcentProvider from 'dcent-provider'

const provider = new DcentProvider({
    rpcUrl: "YOUR_RPC_URL",   // required
    chainId: 1, // (optional) default = 1
})

const web3 = new Web3(provider)
const accounts = await web3.eth.getAccounts()
const tx = {
    from: accounts[0],
    gasPrice: "2000000000",
    gas: "21000",
    to: account[0],
    value: "0",
    data: ""
}
const receipt = await web3.eth.sendTransaction(tx)
```

## Demo

Check [example](example/README.md) package

## Build & Test

### build for production

```sh
npm run build
```

### build for development

```sh
npm run build-dev
```

### test

```sh
npm run test
```
npm package: @rsksmart/erc677
Description: ERC-677 Token Implementation
Author: ilanolkies
Latest version: 2.0.0

<p align="middle">
  <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" >
</p>
<h3 align="middle"><code>@rsksmart/erc677</code></h3>
<p align="middle">
  Simple implementation of ERC-677 token contract, compatible with RIF Token.
</p>
<p align="middle">
  <a href="https://github.com/rsksmart/erc677/actions/workflows/ci.yml">
    <img src="https://github.com/rsksmart/erc677/actions/workflows/ci.yml/badge.svg" />
  </a>
  <a href="https://github.com/rsksmart/erc677/actions/workflows/slither.yml">
    <img src="https://github.com/rsksmart/erc677/actions/workflows/slither.yml/badge.svg" />
  </a>
  <a href="https://lgtm.com/projects/g/rsksmart/express-did-auth/context:javascript">
    <img src="https://img.shields.io/lgtm/grade/javascript/github/rsksmart/express-did-auth" />
  </a>
  <a href='https://coveralls.io/github/rsksmart/erc677?branch=master'>
    <img src='https://coveralls.io/repos/github/rsksmart/erc677/badge.svg?branch=master' alt='Coverage Status' />
  </a>
  <a href="https://badge.fury.io/js/%40rsksmart%2Ferc677">
    <img src="https://badge.fury.io/js/%40rsksmart%2Ferc677.svg" alt="npm" />
  </a>
</p>

> This package is only to **use for testing purposes**

## Install

```
npm i @rsksmart/erc677
```

## Usage

```js
const ERC677 = artifacts.require('@rsksmart/erc677');

contract('My contract tests', async accounts => {
  let erc677;

  beforeEach(async () => {
    erc677 = await ERC677.new(
      accounts[0],
      web3.utils.toBN('1000000000000000000000'),
      'RIFOS',
      'RIF',
      web3.utils.toBN('18'),
    );
  });
});
```

## JS

```js
const Web3 = require('web3');
const ERC677Data = require('@rsksmart/erc677/ERC677Data.json');
const web3 = new Web3('https://public-node.rsk.co')
const ERC677 = new web3.eth.Contract(ERC677Data.abi, ERC677Data.address.rskMainnet);
```

## Types

There are TypeScript typing definitions of the contracts published together with the original contracts. 
Supported contract's libraries are: 

* `web3` version 1.* - `web3-v1-contracts`
* `web3` version 2.* - `web3-v2-contracts`
* `truffle` - `truffle-contracts`
* `ethers` - `ethers-contracts`

You can use them as follow:

```typescript
import Web3 from 'web3'
import ERC677 from '@rsksmart/erc677/types/web3-v1-contracts/ERC677Data.d.ts'
import ERC677Data from '@rsksmart/erc677/ERC677Data.json'

const web3 = new Web3('https://public-node.rsk.co')
const rif = new web3.eth.Contract(ERC677Data.abi, ERC677Data.address.rskMainnet) as ERC677
```

Replace `web3-v1-contracts` with the proper library version.

## Versions

- Installing v1 will use Solidity v5
- Installing v2 will use Solidity v8

---

RIF Token:
- [Docs](https://developers.rsk.co/rif/token/)
- RSK Mainnet: [0x2acc95758f8b5f583470ba265eb685a8f45fc9d5](https://explorer.rsk.co/address/0x2acc95758f8b5f583470ba265eb685a8f45fc9d5)
- RSK Testnet: [0x19F64674D8A5B4E652319F5e239eFd3bc969A1fE](https://explorer.testnet.rsk.co/address/0x19F64674D8A5B4E652319F5e239eFd3bc969A1fE)
npm package: @rsksmart/ipfs-cpinner-client-types
Description: RIF Identity - IPFS Centralized Pinner Provider Types
Latest version: 0.1.3

<p align="middle">
    <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" >
</p>
<h3 align="middle"><code>@rsksmart/ipfs-cpinner-client-types</code></h3>
<p align="middle">
    RIF Identity - IPFS Centralized Pinner Client Types
</p>
<p align="middle">
  <a href="https://rsksmart.github.io/rif-identity-docs/data-vault/cpinner/cpinner-client">
    <img src="https://img.shields.io/badge/-docs-brightgreen" alt="docs" />
  </a>
</p>
npm package: @rsksmart/pmt-builder
Description: PartialMerkleTree builder library
Latest version: 3.0.1

![Github CI/CD](https://github.com/rsksmart/pmt-builder/actions/workflows/workflow.yml/badge.svg)

# pmt-builder

PartialMerkleTree builder library.

This library can be used to build a partial merkle tree for a block of transactions. A partial merkle tree is a pruned version of a full merkle tree, containing only the parts needed to prove a given transaction is part of the tree. 

## Installation

> npm install @rsksmart/pmt-builder

### Install dependencies

> npm install

## Usage

To build the tree, simply call the `buildPMT` function and pass the `leaves` as a list of strings and a `filteredHash` in string format, i.e buildPMT(leaves: string[], filteredHash: string)

First parameter {leaves}: An array of transaction hash of all transactions without witness(txid) in a block. 
Second parameter {filteredHash}: transaction hash (the hash without witness).

The function returns an object with the following fields:
totalTX: the size of {leaves} in the array.
Hashes: All the hashes that build the partial merkle tree. This includes the leaves level as well as the upper levels of the tree.
flags: The number of flags bytes to follow.
Hex: The partial merkle tree serialized in hex format.

### Sample Snippet

```
const pmtBuilder = require("@rsksmart/pmt-builder");

const blockTransactions = [
    '8f01832aa125683490e70a9142ccd9c49485b84708180487b5f35dc7795a3afd',
    '6cc629897f3f6c3e873e98af8061f54618fe2be6599853841ca97aeb9614a136',
    '31c8227345ead8477845fda6d8dc68cc1bca9c094523aef60d857d521aca6937',
    'e0714cbc5ed04014e1a1f362612fdb05578a1c8e45257ac6cc0dff0d2e532855',
    '0f9e8932b5bbcad80242077205843e42bcca9d84c58b751535ea07a06e4179e6',
    '5a4d2446ff81be95eacaaac0fcd06856f9625f6f07391a2bf90b1a065be0e0fc'
];

const resultPmt = pmtBuilder.buildPMT(blockTransactions, blockTransactions[0]);
console.log("Result: ", resultPmt);
```
### Tool Usage

This library can be used via a tool(this tool uses mempool.js api to get transactions) that exists in the tool/pmt-builder.js file via the following command: 

`node tool/pmt-builder.js network blockHash txHash`, 

For example: `node tool/pmt-builder.js testnet 00000000000003d91235b675366fc6c26e0ea4b2f125fd292f164247d4e5b07e ac72bd61c72ac8143e5638998f479bdfc5834fce9576fa2054c7be93313abd66`

`network`: testnet or mainnet
`blockHash`: block hash in hex format
`txHash`: filtered transaction hash in hex format

## Test

To run test:

> npm test

For any comments or suggestions, feel free to contribute or reach out at our [Discord server](https://discord.gg/rootstock).
npm package: @rsksmart/relaying-services-sdk
Description: This project contains the SDK of the relaying services system.
Author: Relaying Services Team
Latest version: 0.0.1-alpha.2

## Relaying Services SDK

This repository contains the relaying services SDK providing a way to developers to easy
work with the RIF Relay System.

### Description

This SDK provides a javascript/typescript library to easily interact with the RIF Relay System.

#### How to use it

You can use this library once you have it installed on your project. You have a few
ways to installing this dependency:

* **Use a release version:** just install this using the install command for node `npm i --save @rsksmart/relaying-services-sdk`.
* **Use the development version directly from your changes:** 
clone this repository inside your project's root folder and use the `npm link` mechanism (https://docs.npmjs.com/cli/v8/commands/npm-link) to add it to your project.
  
After you install the library you can import the RelayingServices interface and the DefaultRelayingServices implementation
to start using the SDK.

### How to develop

1. Clone this repository using `git clone https://github.com/JONAF2103/relaying-services-sdk.git`
2. Install it using `npm install`
4. Make your changes and after all the tests and checks are ok you can run `npm run dist` to generate a distributable version
5. Push your new version into a new branch and create a PR

#### How to generate a new distributable version

1. Bump the version on the `package.json` file.
2. Commit and push any changes included the bump.

#### For Github

1. Create a new tag with the new version (from `package.json`) and GitHub actions will update NPM

#### For NPM

1. Run `npm login` to login to your account on npm registry.
2. Run `npm publish` to generate the distributable version for NodeJS

#### For direct use

1. Run `npm run dist` to generate the distributable version.
2. Commit and push the dist folder with the updated version to the repository on master.


#### Husky and linters

We use husky to check linters and code styles on commits, if you commit your
changes and the commit fails on lint or prettier checks you can use these command
to check and fix the errors before trying to commit again:

* `npm run lint`: to check linter bugs
* `npm run lint:fix`: to fix linter bugs
* `npm run prettier`: to check codestyles errors
* `npm run prettier:fix`: to fix codestyles errors
npm package: @rsksmart/rif-id-mnemonic
Description: RIF Identity - mnemonic
Latest version: 0.1.1

<p align="middle">
    <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" >
</p>
<h3 align="middle"><code>rif-id-mnemonic</code></h3>
<p align="middle">
    RIF Identity - Mnemonic
</p>
<p align="middle">
    <a href="https://badge.fury.io/js/%40rsksmart%2Frif-id-mnemonic">
        <img src="https://badge.fury.io/js/%40rsksmart%2Frif-id-mnemonic.svg" alt="npm" />
    </a>
</p>

```
npm i @rsksmart/rif-id-mnemonic
```

## Features

- BIP-39 complaint random mnemonic key generation given sentence size
- BIP-39 mnemonic to BIP-32 seed
- BIP-32 seed to BIP-44 compliant RSK multi-account base HD Key

## Usage

Generate a mnemonic:

```javascript
import { generateMnemonic } from '@rsksmart/rif-id-mnemonic'

const mnemonic = generateMnemonic(12)
```

Get a private key:

```javascript
import { mnemonicToSeed, seedToRSKHDKey } from '@rsksmart/rif-id-mnemonic'

const seed = await mnemonicToSeed(mnemonic)
const hdKey = seedToRSKHDKey(seed)
const privateKey = hdKey.derive(0).privateKey?.toString('hex')
```

Or sync:

```javascript
import { mnemonicToSeedSync, seedToRSKHDKey } from '@rsksmart/rif-id-mnemonic'

const seed = mnemonicToSeedSync(mnemonic)
const hdKey = seedToRSKHDKey(seed)
const privateKey = hdKey.derive(0).privateKey?.toString('hex')
```

## Test

From base repo directory run `npm test` or any of the described [test script variants](../../README#test).

## References

- BIP39: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
- BIP32: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
- BIP44: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
npm package: @rsksmart/rif-marketplace-notifications
Description: Contracts for notifications
Author: Nazar Duchak
Latest version: 0.0.1-dev.1

# RIF Marketplace Notifications

```
npm i @rsksmart/rif-marketplace-notifications
```

**Warning: Contracts in this repo are in alpha state. They have not been audited and are not ready for deployment to main net!
  There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

## NotificationsManager contract

## TypeScript typings

There are TypeScript typing definitions of the contracts published together with the original contracts in folder `/types`.
Supported contract's libraries are:

* `web3` version 1.* - `web3-v1-contracts`
* `web3` version 2.* - `web3-v2-contracts`
* `truffle` - `truffle-contracts`
* `ethers` - `ethers-contracts`

So for example if you want to use Truffle typings then you should import the contract from `@rsksmart/rif-marketplace-notifications/types/truffle/...`.
npm package: @rsksmart/rif-marketplace-notifier
Description: Contracts for notifier
Author: Nazar Duchak
Latest version: 0.0.1-dev.2

# RIF Marketplace Notifier

```
npm i @rsksmart/rif-marketplace-notifier
```

**Warning: Contracts in this repo are in alpha state. They have not been audited and are not ready for deployment to main net!
  There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

## NotifierManager contract

## TypeScript typings

There are TypeScript typing definitions of the contracts published together with the original contracts in folder `/types`.
Supported contract's libraries are:

* `web3` version 1.* - `web3-v1-contracts`
* `web3` version 2.* - `web3-v2-contracts`
* `truffle` - `truffle-contracts`
* `ethers` - `ethers-contracts`

So for example if you want to use Truffle typings then you should import the contract from `@rsksmart/rif-marketplace-notifier/types/truffle/...`.
npm package: @rsksmart/rif-material-ui
Description: <p align="middle">   <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" > </p> <h3 align="middle"><code>@rsksmart/rif-material-ui</code></h3> <p align="middle">   RIF UI toolkit for Material UI </p> <p align="middle">   <a href="
Author: Christian Escalante
Latest version: 1.0.1

<p align="middle">
  <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" >
</p>
<h3 align="middle"><code>@rsksmart/rif-material-ui</code></h3>
<p align="middle">
  RIF UI toolkit for Material UI
</p>
<p align="middle">
  <a href="https://badge.fury.io/js/%40rsksmart%2Frif-material-ui">
    <img src="https://badge.fury.io/js/%40rsksmart%2Frif-material-ui.svg" alt="npm" />
  </a>
  <a href="https://lgtm.com/projects/g/rsksmart/rif-material-ui/context:javascript">
    <img src="https://img.shields.io/lgtm/grade/javascript/github/rsksmart/rif-material-ui" />
  </a>
</p>

The React UI toolkit built on to of [material-ui](https://mui.com/) components that you always wanted and with rif theme.
## Installation

This library is available as an [npm package](https://www.npmjs.com/package/@rsksmart/rif-material-ui).

```sh
npm install @mui/material @emotion/react @emotion/styled @mui/icons-material @rsksmart/rif-material-ui
```

```sh
yarn add @mui/material @emotion/react @emotion/styled @mui/icons-material @rsksmart/rif-material-ui
```

## Components

[https://rsksmart.github.io/rif-material-ui](https://rsksmart.github.io/rif-material-ui)

## Run for development

Install dependencies:

```sh
yarn
yarn storybook
```

### Build for production

```sh
yarn build
```
npm package: @rsksmart/rif-relay-client
Description: This project contains all the client code for the rif relay system.
Author: RIF Payments Team
Latest version: 2.2.6

# RIF Relay Client

This typescript repository contains all the client code used by the RIF Relay System.

This project works as a dependency and needs to be installed in order to be used.

## Table of Contents

- [**Installation**](#installation)
  - [**Pre-requisites**](#pre-requisites)
  - [**Dependencies**](#dependencies)
- [**Usage**](#usage)
  - [**Use a release version**](#use-a-release-version)
  - [**Use the repo distributable**](#use-the-repo-distributable)
  - [**Use a local distributable**](#use-a-local-distributable)
- [**Development**](#development)
  - [**Enabling postinstall scripts**](#enabling-postinstall-scripts)
  - [**Husky and linters**](#husky-and-linters)
  - [**Generating a new distributable version**](#generating-a-new-distributable-version)
    - [**For GitHub**](#for-github) 
    - [**For NPM**](#for-npm)
    - [**For direct use (no publishing)**](#for-direct-use-no-publishing)

## Installation

### Pre-requisites

- Node version 12.18

### Dependencies

Just run `npm install` to install all dependencies.

## Usage

You can use this dependency once you have it installed on your project. There are multiple ways to do this:

### Use a release version 

Install with:
```bash
npm i --save @rsksmart/rif-relay-client
```

### Use a local distributable

Clone this repository inside your project's root folder and use the `npm link` mechanism (https://docs.npmjs.com/cli/v8/commands/npm-link) to add it to your project.

## Development

Make your modifications and then run `npm run build` to validate them.
When you are done with your changes, you can publish them by creating a distributable version.

### Husky and linters

We use husky to check linters and code styles on commits, if you commit your
changes and the commit fails on lint or prettier checks you can use these command
to check and fix the errors before trying to commit again:

* `npm run lint`: to check linter bugs
* `npm run lint:fix`: to fix linter bugs
* `npm run format`: to check codestyles errors
* `npm run format:fix`: to fix codestyles errors

### Generating a new distributable version

1. Run the `npm run dist` command to generate the `dist` folder with the distributable version inside.
2. Bump the version on the `package.json` file (not strictly needed).
3. Commit and push any changes, including the version bump.

#### For GitHub

1. Create a new tag with the new version (from `package.json`) and github actions will update npm 

#### For NPM

1. Run `npm login` to login to your account on npm registry.
2. Run `npm publish` to generate the distributable version for NodeJS.

#### For direct use (no publishing)

No extra steps are needed beyond generating the `dist` folder and merging it to `master`.
npm package: @rsksmart/rif-relay-common
Description: This project contains all the common code for the rif relay system.
Author: Relaying Services Team
Latest version: 1.0.0-alpha.4

# RIF Relay Common

This typescript repository contains all the common code used by the RIF Relay System. 

This project works as a dependency and needs to be installed in order to be used.

## Table of Contents

- [**Installation**](#installation)
  - [**Pre-requisites**](#pre-requisites)
  - [**Dependencies**](#dependencies)
- [**Usage**](#usage)
  - [**Use a release version**](#use-a-release-version)
  - [**Use the repo distributable**](#use-the-repo-distributable)
  - [**Use a local distributable**](#use-a-local-distributable)
- [**Development**](#development)
  - [**Enabling postinstall scripts**](#enabling-postinstall-scripts)
  - [**Husky and linters**](#husky-and-linters)
  - [**Generating a new distributable version**](#generating-a-new-distributable-version)
    - [**For GitHub**](#for-github) 
    - [**For NPM**](#for-npm)
    - [**For direct use (no publishing)**](#for-direct-use-no-publishing)

## Installation

### Pre-requisites

- Node version 12.18

### Dependencies

Install all dependencies by running `npm install`.

The project is ready to be used at this point.

## Usage

You can use this dependency once you have it installed on your project. There are multiple ways to do this:

### Use a release version 

Install with:
```bash
npm i --save @rsksmart/rif-relay-common
```

### Use a local distributable

Clone this repository inside your project's root folder and use the `npm link` mechanism (https://docs.npmjs.com/cli/v8/commands/npm-link) to add it to your project.

## Development

Make your modifications and then run `npm run build` to validate them.
When you are done with your changes, you can publish them by creating a distributable version.

### Husky and linters

We use husky to check linters and code styles on commits, if you commit your
changes and the commit fails on lint or prettier checks you can use these command
to check and fix the errors before trying to commit again:

* `npm run lint`: to check linter bugs
* `npm run lint:fix`: to fix linter bugs
* `npm run prettier`: to check codestyles errors
* `npm run prettier:fix`: to fix codestyles errors

### Generating a new distributable version

1. Run the `npm run dist` command to generate the `dist` folder with the distributable version inside.
2. Bump the version on the `package.json` file (not strictly needed).
3. Commit and push any changes, including the version bump.

#### For GitHub

1. Create a new tag with the new version (from `package.json`) and github actions will update npm 

#### For NPM

1. Run `npm login` to login to your account on npm registry.
2. Run `npm publish` to generate the distributable version for NodeJS.

#### For direct use (no publishing)

No extra steps are needed beyond generating the `dist` folder and merging it to `master`.
npm package: @rsksmart/rif-relay-light-sdk
Description: This is a light implementation of the client RIF Relay SDK built using ethers. This is experimential and is subject to change. Please report any issues that you may find.
Author: Jesse Clark @ IOV Labs
Latest version: 1.1.1

# RIF Relay Light SDK

This is a light implementation of the client RIF Relay SDK built using ethers. This is experimential and is subject to change. Please report any issues that you may find.

## Install:

```
yarn @rsksmart/rif-relay-light-sdk
// or
npm i  @rsksmart/rif-relay-light-sdk
```

## How to use:

The documentation for this is missing and needs much improvement. This repo is under development and is subject to change without notice.

### Basic setup:

```ts
import RIFRelaySDK from '@rsksmart/rif-relay-light-sdk
import ethers from 'ethers'

// ...

// fill out the following:
const privateKey = ''

const relayConfig = {
  smartWalletFactoryAddress: '',
  relayVerifierAddress: '',
  deployVerifierAddress: '',
  relayServer: ''
}

// Create the Signer: 
const provider = new ethers.providers.JsonRpcProvider('https://public-node.testnet.rsk.co')
const signer = new ethers.Wallet(privateKey, provider)

// Create the SDK:
const relaySDK = await sdk.RIFRelaySDK.create(signer, relayConfig)

// Some variables that you might need:
const eoaAddress = relaySDK.eoaAddress
const smartWalletAddress = relaySDK.smartWalletAddress
const isDeployed = await relaySDK.smartWalletFactory.isDeployed()
```

### Deploy the SmartWallet:

The server this is being tested with offers free deployment transactions, if your server costs, then you may need to estimate the cost and send it. Below we are sending 0:

```ts
// Deploy the smartwallet for the user.
const freePayment = {
  tokenContract: RIF_TOKEN_ADDRESS_TESTNET,
  tokenAmount: '0'
}

const deployTx = await relaySDK.sendDeployTransaction(freePayment)
console.log(deployTx)
```

### Estimate and Relay a Transaction:

```ts
// A simple ERC20 transaction:
const sendFiveRifToJesseTx = {
  to: RIF_TOKEN_ADDRESS_TESTNET,
  data: '0xa9059cbb0000000000000000000000003dd03d7d6c3137f1eb7582ba5957b8a2e26f304a0000000000000000000000000000000000000000000000004563918244f40000'
}

// estimate a transaction cost:
const estimateFee = await relaySDK.estimateTransactionCost(sendFiveRifToJesseTx, RIF_TOKEN_ADDRESS_TESTNET)
const payment = {
    tokenContract: RIF_TOKEN_ADDRESS_TESTNET,
    tokenAmount: estimateFee.toString()
  }

// relay a transaction if the smartcontract is already deployed:
const relayTx = await relaySDK.sendRelayTransaction(sendFiveRifToJesseTx, payment)

console.log(relayTx)
```

## Tests:

There are no tests for this library at this time. This tech debt is known, your help is appreciated.

## Contribution

Yes please.
npm package: @rsksmart/rif-relay-sdk
Description: This project contains the SDK of the relaying services system.
Author: Relaying Services Team
Latest version: 1.0.0-alpha.4

## Relaying Services SDK

This repository contains the relaying services SDK providing a way to developers to easy
work with the RIF Relay System.

### Description

This SDK provides a javascript/typescript library to easily interact with the RIF Relay System.

#### How to use it

You can use this library once you have it installed on your project. You have a few
ways to installing this dependency:

* **Use a release version:** just install this using the install command for node `npm i --save @rsksmart/relaying-services-sdk`.
* **Use the development version directly from your changes:** 
clone this repository inside your project's root folder and use the `npm link` mechanism (https://docs.npmjs.com/cli/v8/commands/npm-link) to add it to your project.
  
After you install the library you can import the RelayingServices interface and the DefaultRelayingServices implementation
to start using the SDK.

### How to develop

1. Clone this repository using `git clone https://github.com/JONAF2103/relaying-services-sdk.git`
2. Install it using `npm install`
4. Make your changes and after all the tests and checks are ok you can run `npm run dist` to generate a distributable version
5. Push your new version into a new branch and create a PR

#### How to generate a new distributable version

1. Bump the version on the `package.json` file.
2. Commit and push any changes included the bump.

#### For Github

1. Create a new tag with the new version (from `package.json`) and GitHub actions will update NPM

#### For NPM

1. Run `npm login` to login to your account on npm registry.
2. Run `npm publish` to generate the distributable version for NodeJS

#### For direct use

1. Run `npm run dist` to generate the distributable version.
2. Commit and push the dist folder with the updated version to the repository on master.


#### Husky and linters

We use husky to check linters and code styles on commits, if you commit your
changes and the commit fails on lint or prettier checks you can use these command
to check and fix the errors before trying to commit again:

* `npm run lint`: to check linter bugs
* `npm run lint:fix`: to fix linter bugs
* `npm run prettier`: to check codestyles errors
* `npm run prettier:fix`: to fix codestyles errors
npm package: @rsksmart/rif-rollup-js-sdk
Description: This section contains documentation for the JavaScript SDK for RIF Rollup.
Latest version: 0.13.10-alpha

# JavaScript SDK for RIF Rollup

This section contains documentation for the JavaScript SDK for RIF Rollup.

## Resources

<!-- - [RIF Rollup Lite Block Explorer](https://rifrollupscan.io/) -->
- [RIF Rollup JS SDK Github Page](https://github.com/rsksmart/rif-rollup-js-sdk)

## Table of contents

- [Getting started](./docs/tutorial/)
- [Providers](./docs/providers)
- [Accounts](./docs/accounts)
- [Utils](./docs/utils)
- [Types](./docs/types)
- [Appendix A: Using bundle in a browser](./browser-bundled)

## Project Status

The RIF Rollup project is still under active development and available only on testnet. Consequently,
this sdk is an alpha release. We will let you know as the projects status updates.

## Credits
The RIF Rollup Javascript SDK is a fork of the [ZKSync Javascript SDK](https://github.com/matter-labs/zksync/tree/master/sdk/zksync.js) by [Matter Labs](https://github.com/matter-labs)
npm package: @rsksmart/rif-rollup-nuxt-core
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![License][license-src]][license-href]
Author: Rootstock
Latest version: 1.4.0

# Rif Rollup DApp Nuxt Module

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]

[📖 **Release Notes**](./CHANGELOG.md)

## Setup

1. Add `@rsksmart/rif-rollup-nuxt-core` dependency to your project

```bash
yarn add @rsksmart/rif-rollup-nuxt-core
# or
npm install @rsksmart/rif-rollup-nuxt-core
```

2. Add `@rsksmart/rif-rollup-nuxt-core` to the `buildModules` section of `nuxt.config.js`

#### JS[types](types)
[tailwind.config.js](tailwind.config.js)
[nuxt.config.ts](nuxt.config.ts)
[LICENSE](LICENSE)
[.eslintrc.js](.eslintrc.js)
[index.d.ts](index.d.ts)
[tests](tests)
[.husky](.husky)
[.babelrc](.babelrc)
[plugins](plugins)
[index.js](index.js)
[.prettierrc](.prettierrc)
[store](store)
[utils](utils)
[package.json](package.json)
[.yarnrc.yml](.yarnrc.yml)
[CHANGELOG.md](CHANGELOG.md)
[.github](.github)
[.yarn](.yarn)
[tsconfig.json](tsconfig.json)
[stylelint.config.js](stylelint.config.js)
[jest.config.js](jest.config.js)
[.editorconfig](.editorconfig)
[jsconfig.json](jsconfig.json)

```js
{
    buildModules: [
        [
            "matter-dapp-ui",
            {
                // module options (ref. types/index.ts ModuleOptions)
            },
        ]
    ],
}
```

#### TS

```ts
import { ModuleOptions } from "matter-dapp-ui/types";
{
    buildModules: [
        [
            "matter-dapp-ui",
            <ModuleOptions>{
                // module options (ref. types/index.ts ModuleOptions)
            },
        ]
    ],
}
```

## Development

1. Clone this repository
2. Go to the package and [link](https://classic.yarnpkg.com/en/docs/cli/link/) it with `yarn link`
3. Go to your nuxt project where you want to use the module
4. Install link dependency with `yarn link @rsksmart/rif-rollup-nuxt-core`
5. Import the module into your project as shown [above](#setup)
6. Done ✅

## License

[MIT License](./LICENSE)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@rsksmart/rif-rollup-nuxt-core/latest.svg
[npm-version-href]: https://npmjs.com/package/@rsksmart/rif-rollup-nuxt-core
[npm-downloads-src]: https://img.shields.io/npm/dm/@rsksmart/rif-rollup-nuxt-core.svg
[npm-downloads-href]: https://npmjs.com/package/@rsksmart/rif-rollup-nuxt-core
[license-src]: https://img.shields.io/npm/l/@rsksmart/rif-rollup-nuxt-core.svg
[license-href]: https://npmjs.com/package/@rsksmart/rif-rollup-nuxt-core
npm package: @rsksmart/rif-wallet-abi-enhancer
Description: ABI Enhancer Library
Author: IOV Labs S.A
Latest version: 1.0.11

# ABI Enhancer

The ABI Enhancer package attempts to decode a transaction into a human readable format. There are different strategies for decoding:

- rBTC Transaction - where the data is 0x and the transaction is sending gas from one account to another.
- ERC20 (and variants) Transaction - sending a token from one user to another. In this case the recipient and amout is located in the data field.
- Other Transaction - A contract call interaction. In this case, it queries the publically available list of known method types and attempts to decode it. In this case, the transaction details are not transformed. 

## Basic usage:

```ts
// create a signer:
const privateKey = '' // <-- fill out
const provider = new ethers.providers.JsonRpcProvider('https://public-node.testnet.rsk.co')
const signer = new ethers.Wallet(privateKey, provider)

const abiEnhancer = new AbiEnhancer()
const enhanced = abiEnhancer(signer, transactionRequest)
```

## Contribution:

Contributions are welcomed as long as the supporting tests are with it.
npm package: @rsksmart/rif-wallet-adapters
Description: Wallet Adapters for everyday use
Author: IOV Labs
Latest version: 1.1.0

# Wallet Adapters

This handles wallet adapters specifically connecting the Ethers.js signer instance in the RIF Wallet to WalletConnect and an Injecteced Browser. The WalletConnect implementation is currently implemented but the injected browser is not.

## Install:

```
yarn @rsksmart/rif-wallet-adapters
// or
npm i  @rsksmart/rif-wallet-adapters
```

## How to use:

The documentation for this is missing and needs much improvement. This repository is under development and is subject to change without notice.

### Basic setup:

Please check the tests in order to acquire more knowledge as to what this library is doing.

## Tests:

``
npm run test
``

## Contribution

Yes please.
npm package: @rsksmart/rif-wallet-core
Description: RIF Wallet Core
Author: Jesse Clark @ IOV Labs
Latest version: 1.0.6

# RIF Wallet Core

RIF Wallet Core is the wallet library that the connects the UI with the RIF Relay SDK. This class accepts an Ethers Signer that handles the majority of crypto methods. 

## Basic Usage:

```ts
// Create a signer:
const privateKey = ''
const provider = new ethers.providers.JsonRpcProvider('https://public-node.testnet.rsk.co')
const signer = new ethers.Wallet(privateKey, provider)

// RIF Relay Config:
const rifRelayConfig = {
  smartWalletFactoryAddress: '0x...'
  relayVerifierAddress: '0x...'
  deployVerifierAddress: '0x...'
  relayServer: 'http://localhost:3000'
}

// On Request function
const onRequest = (request: IncomingRequest) => {
  const { type, payload, returnType, confirm, reject } = onRequest
  // type = SendTransactionRequest | SignMessageRequest | SignTypedDataRequest
  // payload = for a transaction it is the TX details, for signData and signTypedData it is the data & types
  // returnType = for a transaction it is the tx, for signMessage it is the message, for signTypedData it is the data object
  // confirm = function to be called if the user confirms
  // reject = function to be called if the user rejects

  if (allGood) {
    return Promise.Resolve(confirm(returnData))
  }
  return Promise.Resolve(reject('User Rejects'))
}

const rifWallet = await RIFWallet.create(signer, onRequest, rifRelayConfig)

// invoke things as normal:
rifWallet.signTransaction(tx) // sends via RIF Relay
rifWallet.estimateGas(tx)
rifWallet.signMessage('hello world!')
rifWallet.signTypedData(typedDataObject)

// RIF Relay specific things:
rifWallet.deploySmartWallet(payment)

```

## `onRequest` function

The onRequest function is where the UX handles the transaction or interaction. A transaction is sent to the RIFWallet then passed to the `onRequest` method. At this point, the UX can prompt the user to click 'accept' or 'deny'. This means that the wallet can be injected into WalletConnect, and injectedBrowser or used via the UX and when a transaction comes in, it will always prompt the user to accept or deny the action.
npm package: @rsksmart/rif-wallet-services
Description: RIF Wallet Services library
Author: IOV Labs
Latest version: 1.2.2

# Rif Wallet Services Library

Rif Wallet Services Library

## Install:

```
yarn @rsksmart/rif-wallet-services
// or
npm i  @rsksmart/rif-wallet-services
```

## How to use:

The documentation for this is missing and needs much improvement. This repository is under development and is subject to change without notice.

### Basic setup:

TBD

## Tests:

TBD

## Contribution

Yes please.
npm package: @rsksmart/rif-wallet-token
Description: RIF Wallet Token
Latest version: 1.0.3

# RIF Wallet Token

This package contains simple classes for ERC20, ERC677, and rBTC assets/tokens. It includes the ABI for ERC20 and ERC677.

## How to use:

```ts
// create a signer:
const privateKey = '' // <-- fill out
const provider = new ethers.providers.JsonRpcProvider('https://public-node.testnet.rsk.co')
const signer = new ethers.Wallet(privateKey, provider)

// create an instance:
const token = new ERC20('0x19F64674D8A5B4E652319F5e239eFd3bc969A1fE', signer, 'tRIF', 'rif.svg')

// init a method:
const balance = token.balance('0x3dd03d7d6c3137f1eb7582ba5957b8a2e26f304a')

```

## Test

First, run ganache by doing:

``npx ganache``

then run the tests:

``npm run test``