Socket
Socket
Sign inDemoInstall

@tkey/chrome-storage

Package Overview
Dependencies
2
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tkey/chrome-storage

TKey Chrome Storage Module


Version published
Weekly downloads
121
increased by137.25%
Maintainers
2
Install size
10.2 MB
Created
Weekly downloads
 

Readme

Source

tKey Chrome Storage Module

npm version minzip

The tKey Chrome Storage Module helps you store and recall key shares in the chrome extension storage. This module is the part of the tKey SDK.

Installation

npm install --save @tkey/chrome-storage

Initialization

Import the ChromeExtensionStorageModule class from @tkey/chrome-storage
import ChromeExtensionStorageModule from "@tkey/chrome-storage";
Assign the ChromeExtensionStorageModule class to a variable
const chromeStorageModule = new ChromeExtensionStorageModule();

Returns

The ChromeExtensionStorageModule class returns an object with the following properties:

class ChromeExtensionStorageModule implements IModule {
  moduleName: string;
  tbSDK: ITKeyApi;
  constructor();
  setModuleReferences(tbSDK: ITKeyApi): void;
  initialize(): Promise<void>;
  storeDeviceShare(deviceShareStore: ShareStore, customDeviceInfo?: StringifiedType): Promise<void>;
  storeShareOnChromeExtensionStorage(share: ShareStore): Promise<void>;
  getStoreFromChromeExtensionStorage(): Promise<ShareStore>;
  inputShareFromChromeExtensionStorage(): Promise<void>;
}

Usage

With the ChromeExtensionStorageModule , you've access to the following functions:

Storing a Device Share

storeDeviceShare(deviceShareStore, customDeviceInfo?)
  • deviceShareStore: The ShareStore object to store.
  • customDeviceInfo?: Information about the device to store.
ShareStore
class ShareStore implements ISerializable {
  share: Share;
  polynomialID: PolynomialID;
  constructor(share: Share, polynomialID: PolynomialID);
  static fromJSON(value: StringifiedType): ShareStore;
  toJSON(): StringifiedType;
}
interface ISerializable {
  toJSON(): StringifiedType;
}

Storing a Share on Chrome Extension Storage

storeShareOnChromeExtensionStorage(share)

Get a ShareStore from Chrome Extension Storage

getStoreFromChromeExtensionStorage()
Return

FAQs

Last updated on 08 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc