import { AppIdentifier, IInitializeParameters, IOpenModalParameters, IOpenOnboardingModalParameters, ISetFiltersParameters, ISetJWTParameters, ISetNavigateParameters, ISetUserOnboardingJWTParameters, IZeroHashSDK } from "./types"; export declare class ZeroHashSDK implements IZeroHashSDK { private rootQuerySelector; private onboardingInitialized; /** * initializedApps is a map that keeps track of which apps have been initialized. * This might grow as we start supporting new apps. */ private initializedApps; /** * Sets up the ZeroHash SDK and appends the ZeroHash DOM elements onto the page. * * For more information, see {@code IInitializeParameters} */ constructor({ zeroHashOnboardingURL, rootQuerySelector, userOnboardingJWT, cryptoWithdrawalsJWT, fiatDepositsJWT, fiatWithdrawalsJWT, cryptoBuyJWT, cryptoSellJWT, fundJWT, profileJWT, cryptoAccountLinkJWT, cryptoAccountLinkPayoutsJWT, payoutsJWT, payJWT, fiatAccountLinkJWT, zeroHashAppsURL, }: IInitializeParameters); /** * setJWT sets the JWT for the appIdentifier provided. * The JWT should be the JWT provided by ZeroHash via the platform * API proxied through your servers. As ZeroHash cannot authenticate * your users' requests, it is paramount that the user be authenticated * and validated on your servers, and exchanged for the JWT using your * API key. DO NOT have the JWT exchange logic be on your front-end. * * As a precaution, we may restrict traffic to the JWT exchange API to * whitelisted IPs that come from your server. */ setJWT({ jwt, appIdentifier }: ISetJWTParameters): void; setFilters({ filters, appIdentifier }: ISetFiltersParameters): void; /** * Sets the navigate field for the appIdentifier provided. Currently this is * specific to Onboarding and is used to navigate to a specific page within the App. */ setNavigate({ appIdentifier, navigate }: ISetNavigateParameters): void; /** * setUserOnboardingJWT sets the JWT to be whatever value is provided. * The JWT should be the UserJWT provided by ZeroHash via the platform * API proxied through your servers. As ZeroHash cannot authenticate * your users' requests, it is paramount that the user be authenticated * and validated on your servers, and exchanged for the JWT using your * API key. DO NOT have the JWT exchange logic be on your front-end. * * As a precaution, we may restrict traffic to the JWT exchange API to * whitelisted IPs that come from your server. * @deprecated in favor of setJWT({jwt: , appIdentifier: "onboarding"}) */ setUserOnboardingJWT(params: ISetUserOnboardingJWTParameters): void; /** * isOnboardingModalOpen returns true if the onboarding modal is open, * false otherwise * @deprecated in favor of isModalOpen("onboarding") */ isOnboardingModalOpen(): boolean; /** * isModalOpen returns true if the modal is open, * for the appIdentifier provided, false otherwise */ isModalOpen(appIdentifier: AppIdentifier): boolean; /** * closeModal hides the modal for the appIdentifier provided. */ closeModal(appIdentifier: AppIdentifier): void; /** * openModal opens the modal for the appIdentifier provided. */ openModal({ jwt, appIdentifier, filters, navigate, }: IOpenModalParameters): void; /** * openOnboardingModal opens the onboarding modal * @deprecated in favor of openModal({appIdentifier: "onboarding", jwt: }) */ openOnboardingModal(params: IOpenOnboardingModalParameters): void; /** * closeOnboardingModalModal hides the onboarding modal * @deprecated in favor of closeModal("onboarding") */ closeOnboardingModal(): void; } export default ZeroHashSDK; export * from "./types";