You can type this command into Command Prompt, PowerShell, Terminal, or any other integrated terminal of your code editor.
npminstall@cryption/dapp-factory-sdk
or
yarnadd@cryption/dapp-factory-assdk
Getting Started
Wrap your app with the DappFactory Provider and pass the DappFactory Reducers into your redux store.
In your store pass the dappfactoryReducers:
src/state/index.ts
import { configureStore } from"@reduxjs/toolkit";import { save, load } from"redux-localstorage-simple";import { dappfactoryReducers, DF_PERSISTED_KEYS,} from"@cryption/dapp-factory-sdk";// OPTIONAL: set the dapp factory persisted keys// If don't use `redux-localstorage-simple` you can skip this step and only set the reducersconstPERSISTED_KEYS:string[] = [...DF_PERSISTED_KEYS];conststore=configureStore({ reducer: {// Pass the dapp factory reducers...dappfactoryReducers, }, middleware: [save({ states:PERSISTED_KEYS, debounce:1000 })], preloadedState:load({ states:PERSISTED_KEYS }),});exportdefault store;
In your main file wrap your app with DappFactoryProvider: