UNPKG

lighthouse-encryption-sdk-browser

Version:

Encryption SDK: Build your trustless, decentralized and fault resistance Application using distributed key shades with threshold cryptography

57 lines (56 loc) 3.03 kB
import { generate } from "./methods/generate"; import { getJWT } from "./methods/getJWT"; import { getAuthMessage } from "./methods/getAuthMessage"; import { recoverKey } from "./methods/recoverKey"; import { recoverShards } from "./methods/recoverShards"; import { saveShards } from "./methods/saveShards"; import { shardKey } from "./methods/shardKey"; import { revokeAccess } from "./methods/revokeAccess"; import { accessControl } from "./methods/accessControl"; import { shareToAddress } from "./methods/shareToAddress"; import { transferOwnership } from "./methods/transferOwnership"; import { getAccessCondition } from "./methods/getAccessCondition"; export { generate, getJWT, getAuthMessage, recoverShards, revokeAccess, recoverKey, saveShards, shardKey, accessControl, shareToAddress, transferOwnership, getAccessCondition }; declare const _default: { generate: (threshold?: number, keyCount?: number) => Promise<import("./types").GeneratedKey>; getJWT: (address: string, payload: string, useAsRefreshToken?: boolean, chain?: string) => Promise<{ JWT: any; refreshToken: any; error: null; } | { JWT: null; error: string; refreshToken?: undefined; }>; getAuthMessage: (address: string) => Promise<import("./types").AuthMessage>; recoverShards: (address: string, cid: string, auth_token: string, numOfShards?: number, dynamicData?: {}) => Promise<import("./types").RecoverShards>; revokeAccess: (address: string, cid: string, auth_token: string, revokeTo: string[]) => Promise<import("./types").LightHouseSDKResponse>; recoverKey: (keyShards: import("./types").KeyShard[]) => Promise<{ masterKey: string; error: null; } | { masterKey: null; error: string; }>; saveShards: (address: string, cid: string, auth_token: string, keyShards: import("./types").KeyShard[], shareTo?: string[]) => Promise<{ isSuccess: boolean; error: any; } | { isSuccess: any; error: null; }>; shardKey: (key: string, threshold?: number, keyCount?: number) => Promise<{ isShardable: boolean; keyShards: { key: string; index: any; }[]; }>; accessControl: (address: string, cid: string, auth_token: string, conditions: import("./types").Condition[], aggregator?: string | undefined, chainType?: import("./types").ChainType, keyShards?: import("./types").KeyShard[], decryptionType?: import("./types").DecryptionType) => Promise<import("./types").LightHouseSDKResponse>; shareToAddress: (address: string, cid: string, auth_token: string, shareTo: string[]) => Promise<import("./types").LightHouseSDKResponse>; transferOwnership: (address: string, cid: string, newOwner: string, auth_token: string, resetSharedTo?: boolean) => Promise<import("./types").LightHouseSDKResponse>; getAccessCondition: (cid: string) => Promise<{ data: import("./types").IGetAccessCondition; }>; }; export default _default;