@portal-hq/mobile-key-values

The @portal-hq/mobile-key-values package contains a storage adapter intended for use with the @portal-hq/core package.

This storage adapter allows end users to save MPC shares to their local device keychain using react-native-mmkv.

Basic usage

Install the package in your React Native project.

yarn add @portal-hq/mobile-key-values

Import the package into the component where you initialize the Portal class

import Portal from '@portal-hq/core'
import Keychain from '@portal-hq/mobile-key-values'

Register your storage adapter and initialize the Portal class

const keychain = new Keychain() // Optionally accepts an MMKV configuration object
const portal = new Portal({
  // ...your other config options
  keychain,
})

Dependency linking

Because this package uses the react-native-mmkv package (which contains native modules) there is some additional linking required to make it work with your React Native project.

Explicitly install the react-native-mmkv package in your project.

yarn add react-native-mmkv

Last updated