Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/pedrouid/connext-store
- Owner: pedrouid
- License: mit
- Created: 2019-12-19T17:39:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:21:33.000Z (almost 2 years ago)
- Last Synced: 2024-11-29T16:48:56.092Z (29 days ago)
- Language: TypeScript
- Size: 496 KB
- Stars: 1
- 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)
}
);
```