Digital Signature Plugin
Digital-Signature plugin is designed to capture and display digital signatures using the react-signature-canvas library. It provides a modal interface where users can sign digitally, clear their signatures, and save them. The modal is highly customizable and adjusts to different screen sizes and orientations. Already signed signature converts to base64 and keeps in contract data as digitalSignature memo field
interface PluginOptions {
contractId?: number;
settings?: {
networkType?: DAT2.NetworkType;
};
isHeader?: boolean;
isOpen?: boolean;
}
<!DOCTYPE html>
<html lang="en" translate="no">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Digital Signature</title>
<script type="module" crossorigin src="/plugin.js"></script>
<link rel="stylesheet" crossorigin href="/plugin.css" />
</head>
<body>
<div id="root"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
window.DIGITAL_SIGNATURE &&
window.DIGITAL_SIGNATURE.init({
selector: '#root'
}),
contractId: "48424991"
});
</script>
</body>
</html>