2.0.2-beta.0 • Published 1 year ago
@oraichain/storage-layer-orai v2.0.2-beta.0
oKey Orai 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 oKeys generated. This SDK gives you the ability to get and set the Metadata for the various shares generated.
Installation
npm install --save @oraichain/storage-layer-oraiInstantiation
Import the OraiStorageLayer class from @oraichain/storage-layer-orai
import OraiStorageLayer from "@oraichain/storage-layer-orai";Assign the OraiStorageLayer class to a variable
const storageLayer = new OraiStorageLayer(OraiStorageLayerArgs);Parameters
declare type OraiStorageLayerArgs = {
enableLogging?: boolean;
hostUrl?: string; // use `https://metadata.social-login.orai.io` for connecting to the Orai Metadata Server
serverTimeOffset?: number;
};Example
import OraiStorageLayer from "@oraichain/storage-layer-orai";
const storageLayer = new OraiStorageLayer({ hostUrl: "https://metadata.social-login.orai.io" });