Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pedrouid/connext-store

Connext Store Module
https://github.com/pedrouid/connext-store

Last synced: 7 days ago
JSON representation

Connext Store Module

Awesome Lists containing this project

README

        

# connext-store

Connext Store Module

## Install

Install NPM package in your project

```bash
npm install --save connext-store
```

## Setup

For Browsers

```javascript
import ConnextStore from "connext-store";

const store = new ConnextStore(window.localStorage);
```

For React-Native

```javascript
import AsyncStorage from "@react-native-community/async-storage";
import ConnextStore from "connext-store";

const store = new ConnextStore(AsyncStorage);
```

## Advanced Options

```javascript
import AsyncStorage from "@react-native-community/async-storage";
import ConnextStore from "connext-store";
import PisaClient from "pisa-client";
import ethers from "ethers";

const store = new ConnextStore(
window.localStorage || AsyncStorage, // REQUIRED
{
prefix: "CONNEXT_STORE",
separator: "/",
pisaClient: new PisaClient(pisaUrl, contractAddress),
wallet: new ethers.Wallet(privateKey)
}
);
```