Skip to main content

Installation

1. Configure your package manager

  • Obtain a NPM token from Silence Laboratories team.

  • Configure your package manager to use the Silence Laboratories NPM registry.

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=${NPM_TOKEN}

For yarn v2 users:

  • Create a .yarnrc.yml file in the root of your project and add the following line:
npmScopes:
"silencelaboratories":
npmAlwaysAuth: true
npmRegistryServer: "https://registry.npmjs.org"
npmAuthToken: "${NPM_TOKEN}"
  • Add the npm token as an environment variable, e.g. in a terminal session run:
export NPM_TOKEN=your-npm-token

2. Install the library

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

# Using npm
npm install @silencelaboratories/silent-shard-sdk
# or using yarn
yarn add @silencelaboratories/silent-shard-sdk

3. Install the native dependencies

The @silencelaboratories/silent-shard-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.

  • ECDSA support
npm install @silencelaboratories/dkls-sdk
# or
yarn add @silencelaboratories/dkls-sdk
  • EdDSA support
npm install @silencelaboratories/schnorr-sdk
# or
yarn add @silencelaboratories/schnorr-sdk

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

  • Android

No additional steps are required for Android.

  • 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 prebuild to extract native modules. Then auto-link should handle the linking of the native dependencies.