Installing Silent Shard Duo RN SDK

Installation instructions

Installation

1. Configure your package manager

@silencelaboratories is a private scope and register in NPM the registry. You need to configure your package manager to install our private packages. Choose your package manager and follow the instructions below.

For npm and yarn v1 users:

  • Create a .npmrc file in the root of your project and add the following line:

//registry.npmjs.org/:_authToken=ORGANIZATION_ACCESS_TOKEN

For yarn v2 users:

  • Create a .yarnrc file in the root of your project and add the following line:

npmScopes:
  "silencelaboratories":
    npmAlwaysAuth: true
    npmRegistryServer: "https://registry.npmjs.org"
    npmAuthToken: "ORGANIZATION_ACCESS_TOKEN"

Replace ORGANIZATION_ACCESS_TOKEN with your company access token shared by Silence Laboratories.

2 Install the library

The @silencelaboratories/react-native-duo-sdk is the main package that contains the high-level APIs for the two-party MPC.:

# Using npm
npm install @silencelaboratories/react-native-duo-sdk
# or using yarn
yarn add @silencelaboratories/react-native-duo-sdk

3. Install the native dependencies

The @silencelaboratories/react-native-duo-sdk package requires our native dependencies to add MPC ability to the core package.

You can install the native package for the cryptographic functions you want to use in your application.

  • The @silencelaboratories/react-native-two-party-ecdsa package is a native module that provides the ECDSA cryptographic functions for the Duo SDK.:

yarn add @silencelaboratories/react-native-two-party-ecdsa 
# or
npm install @silencelaboratories/react-native-two-party-ecdsa 
  • The @silencelaboratories/react-native-two-party-eddsa package is a native module that provides the EDDSA cryptographic functions for the Duo SDK.:

yarn add @silencelaboratories/react-native-two-party-eddsa
# or
npm install @silencelaboratories/react-native-two-party-eddsa

The native dependencies should be automatically linked to your project, for React-Native version 0.60. linked to your project.

Android

No additional setup is required.

iOS

To run on the iOS platform, install pods before running the application.:

cd ios && pod install

If the application using the React-Native version below 0.60, you can contact for the support from our team.

For Expo users:

For current version of libraries, doesn't support Expo Go projects.

However, Expo users can use the Expo dev client to configure the native dependencies.

Last updated