@plutoxyz/frame-js
Version:
SDK for integrating with Pluto Frame
40 lines (39 loc) • 1.8 kB
TypeScript
/**
* Frame SDK - A library for integrating with Pluto's frame-based verification system
* @packageDocumentation
*/
import { Child } from "./child";
import { PlutoSDK, DEFAULT_ENDPOINTS } from "./parent";
import { Brand, Endpoints } from "./types";
declare let Pluto: PlutoSDK | Child;
export default Pluto;
/**
* Public types that SDK users will need in their applications
*/
export type { InitializationOptions, PageHooks, ErrorPayload, ProofPayload, Brand, Endpoints, } from "./types";
/**
* WebSocket functionality for advanced integrations
*/
export { SocketActionTypes, WebSocketClient, WebSocketEvent, } from "./websocket";
export type { WebSocketDefaultEvents, WebSocketClientConfig, } from "./websocket";
/**
* API functions for interacting with Pluto services
*/
export { sendMetadata, runScript, closeSession, submitPrompts, getProof, submitOauth, } from "./api/apis";
export { isPromptValueValid, initializePromptValues, PromptTypeKey, type PromptRequest, type PromptTextType, type PromptPasswordType, type PromptCodeType, type PromptNumberCodeType, type PromptCheckboxType, type PromptSelectType, type PromptLoginType, type LoginProvider, LoginProviderID, } from "./utils/prompt";
export interface IPlutoSDK {
connect: (script: string) => Promise<void>;
resetConnection: () => Promise<void>;
isConnected: () => boolean;
isInitialized: () => boolean;
initialize: (hooks: any, options?: any) => Promise<any>;
updateBrand: (brand: Brand) => void;
updateEndpoints: (endpoints: Endpoints) => void;
getFingerprint: () => string | null;
}
/** @internal */
export { Child, PlutoSDK, DEFAULT_ENDPOINTS };
/** @internal */
export { ChildToParentEvents, ParentToChildEvents } from "./enums";
/** @internal */
export type { PlutoStorage } from "./storage";