10.0.1 • Published 1 year ago
@tkey-mpc/storage-layer-torus v10.0.1
tKey Torus Storage Layer
A storage layer is needed to store and recall the metadata information of the shares generated so as to be able to recover the private key from the tKeys generated. This SDK gives you the ability to get and set the Metadata for the various shares generated.
Installation
npm install --save @tkey-mpc/storage-layer-torusInstantiation
Import the TorusStorageLayer class from @tkey-mpc/storage-layer-torus
import TorusStorageLayer from "@tkey-mpc/storage-layer-torus";Assign the TorusStorageLayer class to a variable
const storageLayer = new TorusStorageLayer(TorusStorageLayerArgs);Parameters
declare type TorusStorageLayerArgs = {
enableLogging?: boolean;
hostUrl?: string; // use `https://metadata.tor.us` for connecting to the Torus Metadata Server
serverTimeOffset?: number;
};Example
import TorusStorageLayer from "@tkey-mpc/storage-layer-torus";
const storageLayer = new TorusStorageLayer({ hostUrl: "https://metadata.tor.us" });