open-index/open-npm huggingface dataset:
npm package: @metrito/contracts
Description: It has the entire set of codes responsible for defining the contract and communication between Metrito applications.
Author: Felipe Oliveira
Latest version: 2.14.10

# Contratos

**Para subir uma atualização, siga os passos:**

1. Suba um commit da sua atualização.

2. Execute os seguinte script após o push para atualizar a versão:
```bash
# Caso seja algum fix, refactor, uma mini melhoria ou alguma feature que não altere nenhuma funcionalidade grande:
npm version patch

# Caso seja algum feature nova que não seja exobirtal, e que não quebre a compatibilidade da aplicação anterior:
npm version minor

# Caso seja uma feature nova que seja exobirtal ou que quebre a compatibilidade da aplicação anterior:
npm version major
```

3. Por fim, suba a atualização no npm:
```bash
npm publish --access public
```
_(O build será feito automaticamente)_

Agora basta atualizar a lib contracts em uma das aplicações da metrito.
```bash
npm i @metrito/contracts
```
npm package: @metrixcoin/metrilib
Description: Library for interacting with MetriVerse
Author: SeqSEE
Latest version: 1.6.2-beta

[![GitHub license](https://img.shields.io/github/license/TheLindaProjectInc/metrilib)](https://github.com/TheLindaProjectInc/metrilib/blob/main/LICENSE.md) [![npm version](https://badge.fury.io/js/@metrixcoin%2Fmetrilib.svg)](https://badge.fury.io/js/@metrixcoin%2Fmetrilib) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/TheLindaProjectInc/metrilib/develop) [![Node.js CI](https://github.com/TheLindaProjectInc/metrilib/actions/workflows/node.js.yml/badge.svg)](https://github.com/TheLindaProjectInc/metrilib/actions/workflows/node.js.yml)

# metrilib

metrilib is a library which can be used to interact with MetriVerse core contracts.

### [**Documentation**](https://thelindaprojectinc.github.io/metrilib/modules.html)

### Installation

```
npm install --save @metrixcoin/metrilib
```

### Example usage

```
const network = 'MainNet'; // can be 'MainNet' or 'TestNet'

//  const mrpc = new MetrixRPCNode(
//    null,
//    'http://localhost:33841',
//    'rpcuser',
//    'rpcpass'
//  );
//  const sender = 'maTQfd4w7mqCzGL32RgBFMYY9ehCmjLEGf'; // sending address which the wallet controls the keys for
//  const provider = new RPCProvider(network, mrpc, sender); // create a read/write provider using a local wallet daemon (usually used server side)

//  const provider = new Web3Provider(network); // create a read/write provider using web3 (MetriMask) (always used client side)

const provider = new APIProvider(network); // create a readonly provider using the explorer API (usually used client side)
const tokenId = `0x${BigInt(0).toString(16)}`; // the token id (uint256) as a hex string
const tokenAddress = '848b9ec4299dac31d21c5db87add813d0cfc58c5' // PyroPets mainnet address

const nft = new MRC721(tokenAddress, provider);

const name = await nft.name(); // PyroPets
const symbol = await nft.symbol(); // PYRO
const totalSupply = await nft.totalSupply(); // bigint of the total supply

const tokenURI = await nft.tokenURI(tokenId); // https://pyropets.org/api/metadata/MainNet/0

const mrc20Address = 'fb26a19c8c75cc4a7dfc95260cd838bf204cf1af' // Embers mainnet address
const mrc20 = new MRC20(mrc20Address, provider);
const nft = new MRC721(tokenAddress, provider);

const tknName = await mrc20.name(); // Embers
const tknSymbol = await mrc20.symbol(); // MBRS
const decimals = await mrc20.decimals() // 0
const tknTotalSupply = await mrc20.totalSupply(); // bigint of the total supply,
                                                  // this unit will be the smallest unit
                                                  // and dependent on the number of decimal places
                                                  // this unit would represent satoshis when dealing
                                                  // with MRX, which has 8 decimal places


```
npm package: @metrixnames/mns-contracts
Description: Contracts for the Metrix Name Service
Author: SeqSEE
Latest version: 1.0.2

[![GitHub license](https://img.shields.io/github/license/TheLindaProjectInc/mns-contracts)](https://github.com/TheLindaProjectInc/mns-contracts/blob/main/LICENSE.md) [![npm version](https://badge.fury.io/js/@metrixnames%2Fmns-contracts.svg)](https://badge.fury.io/js/@metrixnames%2Fmns-contracts)

# mns-contracts

mns-contracts is an update/port of [**ens-contracts**](https://github.com/ensdomains/ens-contracts) made to work for the Metrix Name Service and MetrixCoin blockchain.

## Installation

`npm install --save @metrixnames/mns-contracts`

## Example Usage

```
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@metrixnames/mns-contracts/contracts/registry/MNS.sol";

contract HelloRegistrar {
    MNS mns;
    bytes32 rootNode;

    modifier only_owner(bytes32 label) {
        address currentOwner = mns.owner(
            keccak256(abi.encodePacked(rootNode, label))
        );
        require(currentOwner == address(0x0) || currentOwner == msg.sender);
        _;
    }

    /**
     * Constructor.
     * @param mnsAddr The address of the MNS registry.
     * @param node The node that this registrar administers.
     */
    constructor(MNS mnsAddr, bytes32 node) {
        mns = mnsAddr;
        rootNode = node;
    }

    /**
     * Register a name, or change the owner of an existing registration.
     * @param label The hash of the label to register.
     * @param owner The address of the new owner.
     */
    function register(bytes32 label, address owner) public only_owner(label) {
        mns.setSubnodeOwner(rootNode, label, owner);
    }
}
```
npm package: @metrixnames/mnslib
Description: Library for interacting with the Metrix Name Service
Author: SeqSEE
Latest version: 2.2.3

[![GitHub license](https://img.shields.io/github/license/TheLindaProjectInc/mnslib)](https://github.com/TheLindaProjectInc/mnslib/blob/main/LICENSE.md) [![npm version](https://badge.fury.io/js/@metrixnames%2Fmnslib.svg)](https://badge.fury.io/js/@metrixnames%2Fmnslib) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/TheLindaProjectInc/mnslib/develop) [![Node.js CI](https://github.com/TheLindaProjectInc/mnslib/actions/workflows/node.js.yml/badge.svg)](https://github.com/TheLindaProjectInc/mnslib/actions/workflows/node.js.yml)

# mnslib

mnslib is an update/port of [**ensjs**](https://github.com/ensdomains/ensjs) made to work for the Metrix Name Service and MetrixCoin blockchain. The [metrilib](https://github.com/TheLindaProjectInc/metrilib) dependency is used to interact with the MetrixCoin blockchain.

### [**Documentation**](https://thelindaprojectinc.github.io/mnslib/modules.html)

### Installation

```
npm install --save @metrixcoin/metrilib @metrixnames/mnslib
```

### Example Usage

```
import { APIProvider } from '@metrixcoin/metrilib';
import { MNS, Name, getMNSAddress } from '@metrixnames/mnslib';

const network = 'TestNet'; // can be 'MainNet' or 'TestNet'

//  const mrpc = new MetrixRPCNode(
//    null,
//    'http://localhost:33841',
//    'rpcuser',
//    'rpcpass'
//  );
//  const sender = 'maTQfd4w7mqCzGL32RgBFMYY9ehCmjLEGf'; // sending address which the wallet controls the keys for
//  const provider = new RPCProvider(network, mrpc, sender); // create a read/write provider using a local wallet daemon (usually used server side)

//  const provider = new Web3Provider(network); // create a read/write provider using web3 (MetriMask) (always used client side)

const provider = new APIProvider(network); // create a readonly provider using the explorer API (usually used client side)

const mns = new MNS(network, provider, getMNSAddress(network));

const name: Name = mns.name('burn.mrx');             // return a Name object which can be used to make record queries

const address = await name.getAddress('MRX');      // return a standard MetrixCoin address slip44:326
                                                     // ex: M7uAERuQW2AotfyLDyewFGcLUDtAYu9v5V

const resAddress = await name.getResolverAddr();     // an EVM address of the resolver for the name

const resolver: Resolver = mns.resolver(resAddress); // a Resolver object which can be used to query names from this specific resolver

const owner = resolver.name('burn.mrx').getOwner();  // an EVM address of an EOA (Hexified MRX) or contract
                                                     // ex: 0x0000000000000000000000000000000000000000
```
npm package: @metrixnames/pricelib
Description: A library for fetching the MRX to USD price based on the MNS price oracle
Author: SeqSEE
Latest version: 1.0.5

[![GitHub license](https://img.shields.io/github/license/TheLindaProjectInc/pricelib)](https://github.com/TheLindaProjectInc/pricelib/blob/main/LICENSE.md) [![npm version](https://badge.fury.io/js/@metrixnames%2Fpricelib.svg)](https://badge.fury.io/js/@metrixnames%2Fpricelib)

# pricelib

pricelib is a library for fetching the MRX to USD price based on the MNS MRXtoUSDOracle.

### [**Documentation**](https://thelindaprojectinc.github.io/pricelib/modules.html)

### Installation

```
npm install --save @metrixnames/pricelib
```