2.0.2-beta.0 • Published 5 months 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-orai
Instantiation
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" });