bitcoin-qr
Version:
A zero-dependency, zero-framework QR code web component for Bitcoin on-chain, Lightning, and unified BIP-21 payments.
94 lines (93 loc) • 2.98 kB
TypeScript
import QRCodeStyling from 'qr-code-styling';
declare enum ClickBehavior {
COPY = "copy",
CLICK_CALLBACK = "click-callback",
NONE = "none"
}
export declare class BitcoinQR {
bitcoinQR: HTMLElement;
unified?: string;
bitcoin?: string;
lightning?: string;
parameters?: string;
callback?: () => void;
clickCallback?: () => void;
isPolling?: boolean;
pollInterval?: number;
imageEmbedded?: boolean;
clickBehavior?: ClickBehavior;
debug?: boolean;
width?: number;
height?: number;
type?: 'canvas' | 'svg';
margin?: number;
image?: string;
shape?: 'square' | 'circle';
qrTypeNumber?: number;
qrMode?: 'Numeric' | 'Alphanumeric' | 'Byte' | 'Kanji';
qrErrorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
imageHideBackgroundDots?: boolean;
imageSize?: number;
imageCrossOrigin?: string;
imageMargin?: number;
dotsType?: 'square' | 'dots' | 'rounded' | 'classy' | 'classy-rounded' | 'extra-rounded';
dotsColor?: string;
dotsRotation?: number;
cornersSquareType?: 'square' | 'extra-rounded' | 'dot';
cornersSquareColor?: string;
cornersDotType?: 'square' | 'dot';
cornersDotColor?: string;
backgroundRound?: number;
backgroundColor?: string;
qr: QRCodeStyling;
poll(): void;
get uri(): string;
getDefinedProps(): {
type?: import("qr-code-styling").DrawType;
shape?: import("qr-code-styling").ShapeType;
width?: number;
height?: number;
margin?: number;
data: string;
image?: string;
qrOptions?: {
typeNumber?: import("qr-code-styling").TypeNumber;
mode?: import("qr-code-styling").Mode;
errorCorrectionLevel?: import("qr-code-styling").ErrorCorrectionLevel;
};
imageOptions?: {
hideBackgroundDots?: boolean;
imageSize?: number;
crossOrigin?: string;
margin?: number;
};
dotsOptions?: {
type?: import("qr-code-styling").DotType;
color?: string;
gradient?: import("qr-code-styling").Gradient;
};
cornersSquareOptions?: {
type?: import("qr-code-styling").CornerSquareType;
color?: string;
gradient?: import("qr-code-styling").Gradient;
};
cornersDotOptions?: {
type?: import("qr-code-styling").CornerDotType;
color?: string;
gradient?: import("qr-code-styling").Gradient;
};
backgroundOptions?: {
round?: number;
color?: string;
gradient?: import("qr-code-styling").Gradient;
};
};
getImageOverlay(): void;
handleCopy: () => void;
handleClickCallback: () => void;
componentWillLoad(): void;
componentDidLoad(): void;
componentShouldUpdate(_new: unknown, _old: unknown, propName: string): boolean;
render(): any;
}
export {};