connext-store
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

connext-store

Connext Store Module

Install

Install NPM package in your project

npm install --save connext-store

Setup

For Browsers

import ConnextStore from "connext-store";
 
const store = new ConnextStore(window.localStorage);

For React-Native

import AsyncStorage from "@react-native-community/async-storage";
import ConnextStore from "connext-store";
 
const store = new ConnextStore(AsyncStorage);

Advanced Options

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)
  }
);

Package Sidebar

Install

npm i connext-store

Weekly Downloads

1

Version

1.1.7

License

MIT

Unpacked Size

1.06 MB

Total Files

26

Last publish

Collaborators

  • pedrouid