open-index/open-npm huggingface dataset:
npm package: @ledgerhq/ledger-core
Description: Ledger Core Library cross-platform C++ bindings for NodeJs
Latest version: 6.14.5
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @ledgerhq/ledger-core

Ledger Core Library cross-platform C++ bindings for NodeJS.

## Usage

For usage example, see [live-common/src/libcore](https://github.com/LedgerHQ/ledger-live-common/tree/master/src/libcore).

## Install

```
yarn add @ledgerhq/ledger-core
```

## Prerequisite

It currently only works with **Node 12**.

### On Linux

You also need to have **g++-7** installed and set up as default. Here is a way to set it up in Debian (root):

```sh
echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" > /etc/apt/sources.list.d/gcc7.list
apt-get update
apt-get install -t testing g++-7
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
```
npm package: @ledgerhq/ledger-wagmi-connector
Description: `@ledgerhq/ledger-wagmi-connector` is a connector for the popular [wagmi](https://github.com/wagmi-dev/wagmi) library based on the Ledger Connect Kit, [@ledgerhq/connect-kit](https://github.com/ledgerhq/connect-kit).
Author: Hugo Lopes
Latest version: 1.0.0

# About

`@ledgerhq/ledger-wagmi-connector` is a connector for the popular
[wagmi](https://github.com/wagmi-dev/wagmi) library based on the Ledger Connect Kit,
[@ledgerhq/connect-kit](https://github.com/ledgerhq/connect-kit).

This connector can be used to add a Ledger button to your DApp. Have a look at
the [Ledger developer portal](https://developers.ledger.com/docs/connect/introduction/)
for more information on Connect Kit and the Ledger button.

## How to use

Here is an example of a wagmi client using the Ledger wagmi connector.

```ts
import { configureChains, defaultChains } from 'wagmi';
import { publicProvider } from 'wagmi/providers/public';
import { LedgerConnector } from '@ledgerhq/ledger-wagmi-connector';

const { chains } = configureChains(defaultChains, [
  publicProvider()
]);

export const connectors = {
  ledger: new LedgerConnector({
    chains,
    options: {
      enableDebugLogs: false,
      // passed to WalletConnect
      chainId: 1,
      // specify if no rpc, passed to WalletConnect
      infuraId: 'YOUR_INFURA_ID',
      // specify chain:URL if no infuraId, passed to WalletConnect
      rpc: {
        1: 'https://cloudflare-eth.com/', // Mainnet
        137: 'https://polygon-rpc.com/',  // Polygon
      }
    }
  }),
};
```

# Contributing

**You need to have a recent [Node.js](https://nodejs.org/) and
[yarn](https://yarnpkg.com) installed.**

## Install dependencies

```bash
yarn install
```

## Build

Build the Connector

```bash
yarn build
```

## Lint

Check code quality with

```bash
yarn lint
```

# Documentation

Have a look at [the wagmi repo](https://github.com/wagmi-dev/wagmi) and [the wagmi doc](https://wagmi.sh/) to learn more on connectors and wagmi.