187 lines
26 KiB
TypeScript
187 lines
26 KiB
TypeScript
import BaseService from "@Services/BaseService";
|
|
import puppeteer from "puppeteer";
|
|
import { Service } from "typedi";
|
|
|
|
// import proofTemplate from "./proofTemplate";
|
|
|
|
export interface AnchoringProofData {
|
|
rootHash: string;
|
|
anchoringTime: string;
|
|
txLink: string;
|
|
office_name: string;
|
|
}
|
|
|
|
@Service()
|
|
export default class AnchoringProofService extends BaseService {
|
|
constructor() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* @description : Generate a PDF file from a SVG template from anchoring proof data
|
|
*/
|
|
public async generate(data: AnchoringProofData): Promise<Buffer> {
|
|
const browser = await puppeteer.launch({
|
|
executablePath: `/usr/bin/chromium`,
|
|
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
});
|
|
|
|
const page = await browser.newPage();
|
|
|
|
// const proofTemplateSvg = proofTemplate({
|
|
// rootHash: data.rootHash,
|
|
// anchoringTime: data.anchoringTime,
|
|
// officeName: data.office_name,
|
|
// txLink: data.txLink,
|
|
// });
|
|
|
|
const rootHash = data.rootHash;
|
|
const anchoringTime = data.anchoringTime;
|
|
const officeName = data.office_name;
|
|
const txLink = data.txLink;
|
|
|
|
var htmlContent = `
|
|
<html>
|
|
<body>
|
|
<svg width="842" height="595" viewBox="0 0 842 595" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<g clip-path="url(#clip0_523_25027)">
|
|
<rect width="842" height="595" fill="#EFF0F6"/>
|
|
<g filter="url(#filter0_d_523_25027)">
|
|
<rect x="16" y="16" width="810" height="563" rx="8" fill="white" shape-rendering="crispEdges"/>
|
|
<path d="M375.811 67.4303H381.927V69.7976H372.845V51.9224H375.811V67.4303Z" fill="#005BCB"/>
|
|
<path d="M396.682 63.8051H385.728C385.815 64.9361 386.239 65.847 387.004 66.5318C387.765 67.2166 388.703 67.5605 389.813 67.5605C391.409 67.5605 392.537 66.9005 393.196 65.5805H396.397C395.964 66.885 395.177 67.9509 394.042 68.7813C392.907 69.6117 391.496 70.03 389.813 70.03C388.443 70.03 387.214 69.7263 386.129 69.1159C385.044 68.5086 384.194 67.6503 383.58 66.5442C382.965 65.438 382.655 64.1583 382.655 62.699C382.655 61.2396 382.953 59.9599 383.552 58.8537C384.151 57.7476 384.991 56.8955 386.076 56.2944C387.16 55.6933 388.405 55.3927 389.81 55.3927C391.214 55.3927 392.368 55.684 393.428 56.2665C394.487 56.849 395.309 57.667 395.901 58.7236C396.491 59.7771 396.785 60.9917 396.785 62.3612C396.785 62.8942 396.751 63.3744 396.682 63.802V63.8051ZM393.688 61.4379C393.669 60.3565 393.28 59.492 392.518 58.8413C391.753 58.1907 390.81 57.8653 389.681 57.8653C388.656 57.8653 387.781 58.1876 387.054 58.8289C386.326 59.4734 385.891 60.341 385.753 61.4379H393.688Z" fill="#005BCB"/>
|
|
<path d="M400.466 56.1147C401.29 54.7266 402.41 53.6421 403.824 52.8613C405.238 52.0804 406.787 51.69 408.47 51.69C410.395 51.69 412.11 52.1579 413.609 53.0906C415.11 54.0263 416.198 55.3493 416.876 57.0628H413.311C412.844 56.1209 412.192 55.4175 411.361 54.9527C410.53 54.488 409.564 54.2587 408.473 54.2587C407.276 54.2587 406.21 54.5251 405.272 55.055C404.335 55.5879 403.601 56.3502 403.074 57.3448C402.545 58.3394 402.281 59.4951 402.281 60.8151C402.281 62.135 402.545 63.2939 403.074 64.2885C403.604 65.2831 404.338 66.0515 405.272 66.5907C406.206 67.1298 407.276 67.3994 408.473 67.3994C409.567 67.3994 410.53 67.167 411.361 66.7053C412.192 66.2436 412.844 65.5403 413.311 64.5952H416.876C416.198 66.3087 415.11 67.6286 413.609 68.5551C412.107 69.4815 410.395 69.9432 408.47 69.9432C406.771 69.9432 405.216 69.5528 403.811 68.772C402.407 67.9912 401.29 66.9067 400.466 65.5186C399.641 64.1305 399.231 62.5595 399.231 60.812C399.231 59.0644 399.641 57.4935 400.466 56.1054V56.1147Z" fill="#005BCB"/>
|
|
<path d="M422.08 69.1159C420.986 68.5086 420.127 67.6503 419.503 66.5442C418.879 65.438 418.565 64.1583 418.565 62.699C418.565 61.2396 418.885 59.9816 419.528 58.8661C420.171 57.7507 421.045 56.8955 422.155 56.2944C423.265 55.6933 424.507 55.3927 425.877 55.3927C427.247 55.3927 428.488 55.6933 429.598 56.2944C430.708 56.8955 431.586 57.7507 432.226 58.8661C432.868 59.9816 433.188 61.2582 433.188 62.699C433.188 64.1398 432.859 65.4163 432.201 66.5318C431.542 67.6472 430.642 68.5086 429.507 69.1159C428.372 69.7232 427.118 70.03 425.748 70.03C424.378 70.03 423.171 69.7263 422.08 69.1159ZM427.893 66.9408C428.561 66.5814 429.103 66.0391 429.52 65.3203C429.937 64.6014 430.144 63.7246 430.144 62.6959C430.144 61.6672 429.943 60.7965 429.545 60.0869C429.147 59.3743 428.617 58.8382 427.959 58.4788C427.3 58.1194 426.588 57.9397 425.823 57.9397C425.058 57.9397 424.353 58.1194 423.704 58.4788C423.052 58.8382 422.538 59.3743 422.155 60.0869C421.773 60.7996 421.582 61.6672 421.582 62.6959C421.582 64.2234 421.977 65.4008 422.767 66.2312C423.557 67.0616 424.551 67.4799 425.745 67.4799C426.507 67.4799 427.225 67.3002 427.893 66.9408Z" fill="#005BCB"/>
|
|
<path d="M439.33 58.0171V69.7945H436.339V58.0171H434.649V55.6251H436.339V54.6212C436.339 52.9914 436.778 51.8047 437.653 51.0579C438.528 50.3112 439.904 49.9394 441.779 49.9394V52.3841C440.876 52.3841 440.243 52.5514 439.879 52.8861C439.515 53.2207 439.333 53.8001 439.333 54.6212V55.6251H441.989V58.0171H439.33Z" fill="#005BCB"/>
|
|
<path d="M448.488 58.0171V69.7945H445.497V58.0171H443.808V55.6251H445.497V54.6212C445.497 52.9914 445.936 51.8047 446.811 51.0579C447.686 50.3112 449.062 49.9394 450.937 49.9394V52.3841C450.034 52.3841 449.401 52.5514 449.037 52.8861C448.673 53.2207 448.492 53.8001 448.492 54.6212V55.6251H451.147V58.0171H448.488Z" fill="#005BCB"/>
|
|
<path d="M457.922 56C458.643 55.5972 459.496 55.3958 460.487 55.3958V58.4292H459.731C458.568 58.4292 457.69 58.7205 457.091 59.303C456.492 59.8855 456.194 60.8987 456.194 62.3364V69.7945H453.229V55.6251H456.194V57.6825C456.627 56.9637 457.204 56.3997 457.925 55.9969L457.922 56Z" fill="#005BCB"/>
|
|
<path d="M475.423 63.8051H464.469C464.556 64.9361 464.98 65.847 465.745 66.5318C466.506 67.2166 467.444 67.5605 468.554 67.5605C470.15 67.5605 471.278 66.9005 471.937 65.5805H475.138C474.705 66.885 473.918 67.9509 472.783 68.7813C471.648 69.6117 470.237 70.03 468.554 70.03C467.184 70.03 465.955 69.7263 464.87 69.1159C463.785 68.5086 462.935 67.6503 462.321 66.5442C461.706 65.438 461.396 64.1583 461.396 62.699C461.396 61.2396 461.694 59.9599 462.293 58.8537C462.892 57.7476 463.732 56.8955 464.817 56.2944C465.901 55.6933 467.146 55.3927 468.551 55.3927C469.955 55.3927 471.109 55.684 472.169 56.2665C473.228 56.849 474.05 57.667 474.642 58.7236C475.232 59.7771 475.526 60.9917 475.526 62.3612C475.526 62.8942 475.492 63.3744 475.423 63.802V63.8051ZM472.429 61.4379C472.41 60.3565 472.021 59.492 471.259 58.8413C470.494 58.1907 469.551 57.8653 468.422 57.8653C467.397 57.8653 466.522 58.1876 465.795 58.8289C465.067 59.4734 464.632 60.341 464.494 61.4379H472.429Z" fill="#005BCB"/>
|
|
<path d="M478.232 69.59C478.041 69.401 477.947 69.1624 477.947 68.8711C477.947 68.5799 478.041 68.3413 478.232 68.1523C478.423 67.9633 478.665 67.8703 478.959 67.8703C479.235 67.8703 479.47 67.9633 479.661 68.1523C479.853 68.3413 479.947 68.5799 479.947 68.8711C479.947 69.1624 479.853 69.4041 479.661 69.59C479.47 69.779 479.235 69.872 478.959 69.872C478.665 69.872 478.42 69.779 478.232 69.59Z" fill="#005BCB"/>
|
|
<path d="M482.916 52.4492C482.725 52.2695 482.631 52.0247 482.631 51.7148C482.631 51.4236 482.725 51.185 482.916 50.996C483.108 50.807 483.343 50.714 483.619 50.714C483.894 50.714 484.13 50.807 484.321 50.996C484.512 51.185 484.606 51.4236 484.606 51.7148C484.606 52.0247 484.512 52.2664 484.321 52.4492C484.13 52.6289 483.894 52.7187 483.619 52.7187C483.343 52.7187 483.108 52.6289 482.916 52.4492ZM484.192 55.8327V69.7976H483.02V55.8327H484.192Z" fill="#005BCB"/>
|
|
<path d="M490.437 69.1283C489.378 68.5458 488.55 67.7092 487.951 66.6216C487.352 65.5341 487.055 64.2606 487.055 62.8012C487.055 61.3418 487.359 60.0962 487.964 59.0087C488.572 57.9211 489.409 57.0876 490.475 56.5144C491.541 55.9412 492.736 55.653 494.052 55.653C495.369 55.653 496.561 55.9412 497.617 56.5144C498.677 57.0876 499.505 57.9149 500.103 58.9963C500.702 60.0776 501 61.3449 501 62.8012C501 64.2575 500.696 65.531 500.091 66.6216C499.483 67.7092 498.645 68.5458 497.579 69.1283C496.514 69.7108 495.319 70.0021 494.002 70.0021C492.685 70.0021 491.494 69.7108 490.437 69.1283ZM496.877 68.2917C497.771 67.8362 498.486 67.1484 499.025 66.2219C499.561 65.2955 499.831 64.1552 499.831 62.8012C499.831 61.4472 499.561 60.3317 499.025 59.4053C498.486 58.4788 497.777 57.791 496.89 57.3355C496.006 56.88 495.049 56.6538 494.027 56.6538C493.005 56.6538 492.055 56.88 491.177 57.3355C490.303 57.791 489.594 58.4788 489.058 59.4053C488.519 60.3317 488.252 61.4627 488.252 62.8012C488.252 64.1398 488.516 65.2955 489.045 66.2219C489.575 67.1484 490.278 67.8393 491.152 68.2917C492.027 68.7472 492.977 68.9734 494.002 68.9734C495.027 68.9734 495.984 68.7472 496.877 68.2917Z" fill="#005BCB"/>
|
|
<path d="M361.804 54.869C361.892 55.0166 362.072 55.0884 362.24 55.0392L365.036 54.2109C365.185 54.1693 365.284 54.0331 365.284 53.8856V48.6695C365.284 48.2988 364.982 48 364.607 48H341.566C341.226 48 341.019 48.227 341.019 48.556L341 60.5012V71.3305C341 71.7012 341.302 72 341.677 72H364.718C365.059 72 365.265 71.7731 365.265 71.4402L365.284 59.4988V59.461C365.284 59.0184 365.219 58.7121 364.611 58.8823L363.514 59.2038C363.338 59.2567 363.223 59.4194 363.23 59.5972L363.25 59.9981C363.25 64.7527 360.744 68.1645 356.323 69.5036C349.09 71.6936 342.492 66.0804 343.077 59.1319C343.482 54.3622 347.361 50.4889 352.18 50.0501C356.258 49.6794 359.887 51.7031 361.8 54.8615L361.804 54.869Z" fill="#005BCB"/>
|
|
<path d="M356.938 64.7943C357.96 64.0984 358.747 63.0922 359.164 61.9158C359.275 61.5943 359.363 61.2577 359.417 60.9135C359.451 60.7055 359.252 60.5315 359.05 60.5958L357.172 61.1783C357.091 61.2048 357.026 61.2653 356.996 61.3447C356.403 62.8085 354.873 63.7958 353.144 63.5877C351.457 63.3835 350.107 61.9991 349.958 60.3272C349.908 59.7674 349.988 59.2303 350.168 58.7423C350.685 57.3655 352.027 56.3821 353.599 56.3821C354.487 56.3821 355.301 56.696 355.936 57.218C356.009 57.2785 356.108 57.3012 356.204 57.2709L357.986 56.7187C358.086 56.6884 358.151 56.6128 358.178 56.5296C358.201 56.4426 358.189 56.3442 358.124 56.2686C356.973 54.9031 355.198 54.0672 353.228 54.1844C353.205 54.1882 353.182 54.192 353.159 54.192L352.551 52.278C352.475 52.0284 352.207 51.8884 351.954 51.9641L350.57 52.3915C350.317 52.4709 350.176 52.7357 350.256 52.9854L350.707 54.4114C350.788 54.661 350.688 54.9334 350.467 55.0733C349.369 55.7617 348.508 56.7981 348.061 58.0237C347.877 58.5154 347.762 59.0374 347.724 59.5783C347.713 59.7787 347.709 59.9754 347.716 60.1683C347.728 60.4293 347.556 60.6638 347.303 60.7433L345.781 61.2275C345.529 61.3069 345.387 61.5716 345.463 61.8213L345.896 63.1906C345.976 63.4402 346.244 63.5764 346.496 63.5007L348.045 63.0052C348.29 62.9296 348.562 63.0166 348.703 63.2284C349.759 64.7906 351.557 65.8232 353.599 65.8232C353.687 65.8232 353.771 65.8232 353.855 65.8232C354.123 65.8081 354.364 65.9783 354.444 66.2279L354.915 67.7258C354.995 67.9754 355.263 68.1154 355.515 68.036L356.9 67.6085C357.152 67.5329 357.29 67.2643 357.214 67.0147L356.716 65.4487C356.64 65.2066 356.728 64.9419 356.938 64.7981V64.7943Z" fill="#005BCB"/>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="20" letter-spacing="-0.02em"><tspan x="266.5" y="110">Certificat de dépôt international</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="16" font-weight="300" letter-spacing="0.005em"><tspan x="333" y="139.6">${anchoringTime}</tspan></text>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="14" font-weight="600" letter-spacing="0.005em"><tspan x="48" y="200.4">Nom de l'office</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="12" font-weight="300" letter-spacing="0.005em"><tspan x="242" y="198.2">${officeName}</tspan></text>
|
|
<path d="M32 214H810" stroke="#D7DCE0"/>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="14" font-weight="600" letter-spacing="0.005em"><tspan x="48" y="237.4">Déposant(s)</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="12" font-weight="300" letter-spacing="0.005em"><tspan x="242" y="235.2">LEcoffre.io</tspan></text>
|
|
<path d="M32 251H810" stroke="#D7DCE0"/>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="14" font-weight="600" letter-spacing="0.005em"><tspan x="48" y="274.4">Hash </tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="12" font-weight="300" letter-spacing="0.005em"><tspan x="242" y="272.2">${rootHash}</tspan></text>
|
|
<path d="M32 288H810" stroke="#D7DCE0"/>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="14" font-weight="600" letter-spacing="0.005em"><tspan x="48" y="311.4">Explorateur blockchain</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="12" font-weight="300" letter-spacing="0.005em"><tspan x="242" y="309.2"><a href="${txLink}">${txLink}</a></tspan></text>
|
|
<rect x="32" y="356" width="778" height="207" rx="8" fill="#F7F8F8"/>
|
|
<g filter="url(#filter1_d_523_25027)">
|
|
<path d="M145 392C145 380.954 153.954 372 165 372C176.046 372 185 380.954 185 392C185 403.046 176.046 412 165 412C153.954 412 145 403.046 145 392Z" fill="white" shape-rendering="crispEdges"/>
|
|
<path d="M165 398V392.75M165 392.75C165.518 392.75 166.021 392.684 166.5 392.561M165 392.75C164.482 392.75 163.979 392.684 163.5 392.561M167.25 400.039C166.521 400.178 165.769 400.25 165 400.25C164.231 400.25 163.479 400.178 162.75 400.039M166.5 402.422C166.007 402.474 165.507 402.5 165 402.5C164.493 402.5 163.993 402.474 163.5 402.422M167.25 398V397.808C167.25 396.825 167.908 395.985 168.758 395.492C170.996 394.194 172.5 391.773 172.5 389C172.5 384.858 169.142 381.5 165 381.5C160.858 381.5 157.5 384.858 157.5 389C157.5 391.773 159.004 394.194 161.242 395.492C162.092 395.985 162.75 396.825 162.75 397.808V398" stroke="#005BCB" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</g>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="10" font-weight="600" letter-spacing="-0.02em"><tspan x="128.023" y="431">À quoi ça sert ?</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="8" letter-spacing="-0.02em"><tspan x="48" y="451.8">Un </tspan><tspan x="60.6902" y="451.8">certificat </tspan><tspan x="97.0535" y="451.8">d'ancrage </tspan><tspan x="138.928" y="451.8">sur </tspan><tspan x="153.224" y="451.8">la </tspan><tspan x="162.774" y="451.8">blockchain </tspan><tspan x="207.606" y="451.8">permet </tspan><tspan x="238.609" y="451.8">d'établir </tspan><tspan x="271.953" y="451.8">de </tspan><tspan x="48" y="463.8">manière </tspan><tspan x="82.9033" y="463.8">irréfutable </tspan><tspan x="124.831" y="463.8">l'enregistrement </tspan><tspan x="189.567" y="463.8">de </tspan><tspan x="201.997" y="463.8">données </tspan><tspan x="238.119" y="463.8">spécifiques </tspan><tspan x="48" y="475.8">à </tspan><tspan x="55.2431" y="475.8">une </tspan><tspan x="71.9553" y="475.8">date </tspan><tspan x="91.9997" y="475.8">et </tspan><tspan x="101.552" y="475.8">une </tspan><tspan x="118.264" y="475.8">heure </tspan><tspan x="142.601" y="475.8">déterminées. </tspan><tspan x="195.014" y="475.8">Il </tspan><tspan x="200.628" y="475.8">constitue </tspan><tspan x="238.334" y="475.8">une </tspan><tspan x="255.046" y="475.8">preuve </tspan><tspan x="48" y="487.8">immuable </tspan><tspan x="91.4516" y="487.8">et </tspan><tspan x="102.426" y="487.8">juridiquement </tspan><tspan x="159.913" y="487.8">opposable </tspan><tspan x="204.861" y="487.8">de </tspan><tspan x="218.327" y="487.8">l'existence </tspan><tspan x="260.979" y="487.8">et </tspan><tspan x="271.953" y="487.8">de </tspan><tspan x="48" y="499.8">l'intégrité </tspan><tspan x="84.6503" y="499.8">des </tspan><tspan x="100.69" y="499.8">informations. </tspan><tspan x="151.055" y="499.8"> </tspan><tspan x="48" y="519.8">En </tspan><tspan x="60.9535" y="519.8">cas </tspan><tspan x="78.9735" y="519.8">de </tspan><tspan x="93.0754" y="519.8">litige, </tspan><tspan x="116.784" y="519.8">ce </tspan><tspan x="130.339" y="519.8">certificat </tspan><tspan x="168.262" y="519.8">peut </tspan><tspan x="190.075" y="519.8">démontrer </tspan><tspan x="235.377" y="519.8">de </tspan><tspan x="249.479" y="519.8">manière </tspan><tspan x="48" y="531.8">incontestable </tspan><tspan x="103.195" y="531.8">que </tspan><tspan x="120.584" y="531.8">les </tspan><tspan x="133.597" y="531.8">données </tspan><tspan x="169.721" y="531.8">n'ont </tspan><tspan x="190.844" y="531.8">pas </tspan><tspan x="207.741" y="531.8">été </tspan><tspan x="222.481" y="531.8">altérées </tspan><tspan x="255.921" y="531.8">depuis </tspan><tspan x="48" y="543.8">leur </tspan><tspan x="64.3641" y="543.8">enregistrement.</tspan></text>
|
|
<g filter="url(#filter2_d_523_25027)">
|
|
<path d="M401 392C401 380.954 409.954 372 421 372C432.046 372 441 380.954 441 392C441 403.046 432.046 412 421 412C409.954 412 401 403.046 401 392Z" fill="white" shape-rendering="crispEdges"/>
|
|
<path d="M420.25 391.25L420.291 391.229C420.865 390.943 421.51 391.46 421.355 392.082L420.645 394.918C420.49 395.54 421.135 396.057 421.709 395.771L421.75 395.75M430 392C430 396.971 425.971 401 421 401C416.029 401 412 396.971 412 392C412 387.029 416.029 383 421 383C425.971 383 430 387.029 430 392ZM421 388.25H421.008V388.258H421V388.25Z" stroke="#005BCB" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</g>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="10" font-weight="600" letter-spacing="-0.02em"><tspan x="320.374" y="431">Qu'est-ce qu'un explorateur blockchain ?</tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="8" letter-spacing="-0.02em"><tspan x="304" y="451.8">Un </tspan><tspan x="323.757" y="451.8">explorateur </tspan><tspan x="377.207" y="451.8">blockchain </tspan><tspan x="429.106" y="451.8">est </tspan><tspan x="450.242" y="451.8">un </tspan><tspan x="469.718" y="451.8">outil </tspan><tspan x="495.565" y="451.8">numérique </tspan><tspan x="304" y="463.8">permettant </tspan><tspan x="350.803" y="463.8">d'accéder </tspan><tspan x="392.063" y="463.8">et </tspan><tspan x="402.201" y="463.8">de </tspan><tspan x="414.832" y="463.8">consulter </tspan><tspan x="453.193" y="463.8">les </tspan><tspan x="466.406" y="463.8">transactions </tspan><tspan x="517.233" y="463.8">et </tspan><tspan x="527.371" y="463.8">les </tspan><tspan x="304" y="475.8">données </tspan><tspan x="344.266" y="475.8">enregistrées </tspan><tspan x="398.451" y="475.8">sur </tspan><tspan x="416.779" y="475.8">la </tspan><tspan x="430.361" y="475.8">blockchain. </tspan><tspan x="480.745" y="475.8">Il </tspan><tspan x="490.89" y="475.8">assure </tspan><tspan x="523.285" y="475.8">une </tspan><tspan x="304" y="487.8">transparence </tspan><tspan x="359.216" y="487.8">totale, </tspan><tspan x="385.801" y="487.8">permettant </tspan><tspan x="432.86" y="487.8">à </tspan><tspan x="440.945" y="487.8">toute </tspan><tspan x="464.008" y="487.8">partie </tspan><tspan x="489.527" y="487.8">prenante </tspan><tspan x="527.953" y="487.8">de </tspan><tspan x="304" y="499.8">vérifier </tspan><tspan x="332.148" y="499.8">les </tspan><tspan x="345.26" y="499.8">opérations </tspan><tspan x="389.315" y="499.8">et </tspan><tspan x="399.353" y="499.8">les </tspan><tspan x="412.465" y="499.8">enregistrements </tspan><tspan x="478.399" y="499.8">effectués </tspan><tspan x="516.661" y="499.8">sur </tspan><tspan x="530.945" y="499.8">la </tspan><tspan x="304" y="511.8">chaîne </tspan><tspan x="332.442" y="511.8">de </tspan><tspan x="344.463" y="511.8">blocs.</tspan></text>
|
|
<g filter="url(#filter3_d_523_25027)">
|
|
<path d="M657 392C657 380.954 665.954 372 677 372C688.046 372 697 380.954 697 392C697 403.046 688.046 412 677 412C665.954 412 657 403.046 657 392Z" fill="white" shape-rendering="crispEdges"/>
|
|
<path d="M674.879 387.519C676.05 386.494 677.95 386.494 679.122 387.519C680.293 388.544 680.293 390.206 679.122 391.231C678.918 391.41 678.692 391.557 678.451 391.673C677.706 392.034 677 392.672 677 393.5V394.25M686 392C686 396.971 681.971 401 677 401C672.029 401 668 396.971 668 392C668 387.029 672.029 383 677 383C681.971 383 686 387.029 686 392ZM677 397.25H677.008V397.258H677V397.25Z" stroke="#005BCB" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</g>
|
|
<text fill="#005BCB" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="10" font-weight="600" letter-spacing="-0.02em"><tspan x="620.953" y="431">Qu'est-ce qu'un hash ? </tspan></text>
|
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Poppins" font-size="8" letter-spacing="-0.02em"><tspan x="560" y="451.8">Un </tspan><tspan x="572.215" y="451.8">hash </tspan><tspan x="593.415" y="451.8">est </tspan><tspan x="607.009" y="451.8">une </tspan><tspan x="623.744" y="451.8">empreinte </tspan><tspan x="665.839" y="451.8">cryptographique </tspan><tspan x="733.021" y="451.8">unique </tspan><tspan x="761.768" y="451.8">générée </tspan><tspan x="560" y="463.8">par </tspan><tspan x="577.147" y="463.8">un </tspan><tspan x="590.892" y="463.8">algorithme </tspan><tspan x="637.208" y="463.8">à </tspan><tspan x="646.285" y="463.8">partir </tspan><tspan x="670.819" y="463.8">de </tspan><tspan x="684.697" y="463.8">données </tspan><tspan x="722.266" y="463.8">spécifiques. </tspan><tspan x="771.497" y="463.8">Il </tspan><tspan x="778.945" y="463.8">agit </tspan><tspan x="560" y="475.8">comme </tspan><tspan x="595.569" y="475.8">une </tspan><tspan x="615.231" y="475.8">signature </tspan><tspan x="656.792" y="475.8">numérique </tspan><tspan x="704.174" y="475.8">permettant </tspan><tspan x="753.341" y="475.8">de </tspan><tspan x="768.335" y="475.8">vérifier </tspan><tspan x="560" y="487.8">l'intégrité </tspan><tspan x="598.735" y="487.8">des </tspan><tspan x="616.859" y="487.8">données </tspan><tspan x="654.656" y="487.8">: </tspan><tspan x="660.257" y="487.8">toute </tspan><tspan x="684.538" y="487.8">modification, </tspan><tspan x="738.82" y="487.8">même </tspan><tspan x="768.643" y="487.8">infime, </tspan><tspan x="560" y="499.8">des </tspan><tspan x="579.262" y="499.8">données </tspan><tspan x="618.196" y="499.8">d'origine </tspan><tspan x="656.154" y="499.8">entraîne </tspan><tspan x="693.498" y="499.8">la </tspan><tspan x="705.748" y="499.8">production </tspan><tspan x="753.351" y="499.8">d'un </tspan><tspan x="774.82" y="499.8">hash </tspan><tspan x="560" y="511.8">distinct, </tspan><tspan x="594.822" y="511.8">garantissant </tspan><tspan x="649.249" y="511.8">ainsi </tspan><tspan x="672.437" y="511.8">l'authenticité </tspan><tspan x="727.006" y="511.8">et </tspan><tspan x="739.908" y="511.8">l'intégrité </tspan><tspan x="779.933" y="511.8">des </tspan><tspan x="560" y="523.8">informations.</tspan></text>
|
|
</g>
|
|
</g>
|
|
<defs>
|
|
<filter id="filter0_d_523_25027" x="-8" y="-4" width="858" height="611" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
<feOffset dy="4"/>
|
|
<feGaussianBlur stdDeviation="12"/>
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_523_25027"/>
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_523_25027" result="shape"/>
|
|
</filter>
|
|
<filter id="filter1_d_523_25027" x="129" y="360" width="72" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
<feOffset dy="4"/>
|
|
<feGaussianBlur stdDeviation="8"/>
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_523_25027"/>
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_523_25027" result="shape"/>
|
|
</filter>
|
|
<filter id="filter2_d_523_25027" x="385" y="360" width="72" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
<feOffset dy="4"/>
|
|
<feGaussianBlur stdDeviation="8"/>
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_523_25027"/>
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_523_25027" result="shape"/>
|
|
</filter>
|
|
<filter id="filter3_d_523_25027" x="641" y="360" width="72" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
<feOffset dy="4"/>
|
|
<feGaussianBlur stdDeviation="8"/>
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_523_25027"/>
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_523_25027" result="shape"/>
|
|
</filter>
|
|
<clipPath id="clip0_523_25027">
|
|
<rect width="842" height="595" fill="white"/>
|
|
</clipPath>
|
|
</defs>
|
|
</svg>
|
|
|
|
</body>
|
|
</html>
|
|
`;
|
|
|
|
await page.setContent(htmlContent, { waitUntil: "networkidle0", timeout: 1200000 });
|
|
await page.addStyleTag({
|
|
content: `
|
|
@page {
|
|
size: A4 landscape;
|
|
margin: 0;
|
|
}
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
body {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
`,
|
|
});
|
|
|
|
const uint8Array = await page.pdf({
|
|
landscape: true,
|
|
printBackground: true,
|
|
format: "A4",
|
|
});
|
|
|
|
const buffer = Buffer.from(uint8Array);
|
|
|
|
await browser.close();
|
|
|
|
return buffer;
|
|
}
|
|
}
|