@gamechanger-finance/gc
Version:
Official GameChanger Wallet library and CLI for integrating with Cardano dapps and solve other tasks (https://gamechanger.finance/)
42 lines (41 loc) • 1.27 kB
TypeScript
import type { ObjectType } from '../types';
export type QRLoaderResult = {
_QRCode: any;
QRCode: any;
Canvas: any;
createQRCode: (options: ObjectType) => any;
renderQRCode: (args: {
text: string;
style: any;
}) => Promise<any>;
registerFonts: (items: Array<{
file: string;
def: any;
}>) => void;
};
export type FontRegistryItem = {
file: string;
def: any;
};
export type FooterOptions = {
text: string;
font: string;
color: string;
bottom: number;
textPadding: number;
};
export type HandledQRError = Error & {
handled: true;
isHandled: true;
originalError?: unknown;
};
export declare const getErrorMessage: (error: unknown) => string;
export declare const toHandledQRError: (error: unknown) => HandledQRError;
export declare const getSVGDimensions: (svgText: string, fallback?: any) => {
width: number;
height: number;
};
export declare const getFooterOptions: (style: any) => FooterOptions | null;
export declare const drawFooterOnCanvas: (canvas: any, context: any, style: any) => boolean;
export declare const escapeXml: (value: string) => string;
export declare const appendFooterToSVG: (svgText: string, style: any, qrCodeOptions?: any) => string;