https://github.com/pedrouid/connext-store
Connext Store Module
https://github.com/pedrouid/connext-store
Last synced: 5 months ago
JSON representation
Connext Store Module
- Host: GitHub
- URL: https://github.com/pedrouid/connext-store
- Owner: pedrouid
- License: mit
- Created: 2019-12-19T17:39:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:21:33.000Z (over 2 years ago)
- Last Synced: 2025-01-22T10:05:59.083Z (6 months ago)
- Language: TypeScript
- Size: 496 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
}
);
```