generate-pay-qr-code.ts
1 import { toString as qrcode } from "qrcode"; 2 import * as izly from "../src"; 3 import { persist, read } from "./_persisted-session"; 4 5 void (async function main() { 6 const identification = await read(); 7 const data = izly.qrPay(identification); 8 9 // show the qr code in the terminal 10 qrcode(data, { type: "utf8" }, (_, qr) => { 11 console.log(qr); 12 }); 13 14 await persist(identification); 15 }());