@bynn-intelligence/agemin-sdk
Version:
agemin.com SDK for age verification
32 lines (31 loc) • 903 B
TypeScript
/**
* Create a DOM element with specified attributes and styles
*/
export declare function createElement(tag: string, attributes?: Record<string, string>, styles?: string): HTMLElement;
/**
* Remove an element from the DOM
*/
export declare function removeElement(elementOrId: HTMLElement | string): void;
/**
* Add styles to the document head
*/
export declare function addStyles(id: string, styles: string): void;
/**
* Generate a unique ID
*/
export declare function generateId(prefix?: string): string;
/**
* Build URL with query parameters
*/
export declare function buildUrl(baseUrl: string, params: Record<string, any>): string;
/**
* Parse message from postMessage event
*/
export declare function parseMessage(event: MessageEvent): {
type: string;
data?: any;
} | null;
/**
* Check if origin is trusted
*/
export declare function isTrustedOrigin(origin: string): boolean;