Skip to main content

Modules - tKey JS SDK

Modules extend the tKey SDK's capability to provide additional functionality for managing your tKey shares. These modules can be used for multiple purposes, from storing shares to generating password or converting them into a form that can remembered or sent out.

A standard tKey flow looks something like this:

Web3Auth's Private Key - Key Reconstruction

Out of the multiple modules available, you can choose the module you want to include in your implementation. Here is the list of available modules:

  • Storage Modules: Storage Modules are used to store Shares B in the user's device storage.
  • Recovery Modules: Recovery Modules are used to recover the Shares C and so, in the case user doesn't have access to their device/storage or needs additional security.
  • Additional Modules: These modules provide extra capability to the tKey SDK, like importing users' existing private keys or seed phrases.

Storage Modules (Share B)

Storage Modules are used to store the tKey shares in the user's device storage. You can choose any of the following modules:

Web Storage Module

Adds the capability to add or remove a share from the local and file storage.

@tkey/web-storage

npm install --save @tkey/web-storage

React Native Storage Module

Adds the capability to add or remove a share from the React Native Encrypted Store/ Expo Secure Store.

@tkey/react-native-storage

npm install --save @tkey/react-native-storage

Chrome Storage Module

Adds the capability to add or remove a share from the Chrome Extension storage.

@tkey/chrome-storage

npm install --save @tkey/chrome-storage

Recovery Modules (Share C)

Recovery Modules are used to recover the tKey shares in the case user doesn't have access to their device/storage or needs additional security.

Security Questions Module

Adds the capability to add or remove a question and password as a share.

@tkey/security-questions

npm install --save @tkey/security-questions

Share Transfer Module

Adds the capability to transfer a share to another device.

@tkey/share-transfer

npm install --save @tkey/share-transfer

Share Serialization Module

Adds the capability to serialize/ deserialize a BN (private key) into a mnemonic.

@tkey/share-serialization

npm install --save @tkey/share-serialization

Additional Modules

These modules provide extra capability to the tKey SDK, like importing users' existing private keys or seedphrases.

Seed Phrase Module

Adds the capability to store and use seed phrases on the metadata.

@tkey/seed-phrase

npm install --save @tkey/seed-phrase

Private Keys Module

Adds the capability to store extra private keys on the metadata.

@tkey/private-keys

npm install --save @tkey/private-keys