{"_id":"symbol-qr-library","_rev":"37-c549041a024d82daf9fa3c97ec261a25","name":"symbol-qr-library","dist-tags":{"latest":"0.14.2","alpha":"0.14.3-alpha-202201041139","next":"0.12.1"},"versions":{"0.9.0":{"name":"symbol-qr-library","version":"0.9.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.9.2","symbol-sdk":"^0.17.2","open":"^7.0.2","qrcode":"^1.4.4","rimraf":"^3.0.2"},"devDependencies":{"@types/chai":"^4.2.9","@types/crypto-js":"^3.1.43","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^14.1.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^5.20.1","typemoq":"^2.1.0","typescript":"~3.5.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"build":"rimraf ./dist && tsc","build.browser":"npm run build && webpack","lint":"tslint -c tslint.json 'src/**/*.ts'","pretest":"npm run build","test":"mocha --compilers js:babel-core/register --ui bdd --recursive ./dist/test","examples":"node dist/examples/index.js"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"keywords":["nem2","symbol","qrcode"],"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","gitHead":"c70a35625857db49e7240568a1630f07b042fbf5","_id":"symbol-qr-library@0.9.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"evias.be","email":"greg@evias.be"},"dist":{"integrity":"sha512-5O/q0KkVgjHnZWB7+ctpouLCQ6N5cU+GBRMe7V8dIGuDMTsFOm0Ns5R1sQcKJsrn2OTAU6VE2+fZzvNj3xOPWw==","shasum":"83b3ff504e808fc35e8c23a5b305de402cd04733","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.9.0.tgz","fileCount":157,"unpackedSize":10753097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXoO9CRA9TVsSAnZWagAAreQQAIBEuxIUOv61izk7PuHF\nDD4qrnJ59GFjrBEmNNcHr6z1kIcbE4AjaWF+X/vgyuar/Q7zA5+vaXUT0OKG\nxxBo0EUOHk9b579xY5FrXuyrgMxyKxVsO4kgqW2MLkPja3GLbEcPB4KcfJVj\nd85z0LNoNhzCOqps45Rr521W941D8bUaatvMUb4nKQX2oaHpX/e2sNJP53g/\nThotcIaQQvvbM1DPv/H+2A8eEqzfeiwp4hrVJABNZGvv4R6wEcPj5dUw0jF/\nSCVaLk9FOvemkHKgzY32aJMBWJqXjuZWgzb5BE6B+HGzT24Vfvoy3mhMqfVp\nS8AxL8vGwBEGftdiFrzIGtc7DDEsLagwfT+GGf/gET6DBCOtZoyhxD1yPTXR\nXGYvsCjwcPWn2LeRJa02jliHrJ6hcwFhZiSYBwsSdwROtVMKulYNczIUxTTp\nZmE+L+AW2Ms/H2Ka97Ds6jRzkcZAbGd3Ip9LAoC3NVW7wxdDXATPp5kDQAz1\nm5qJFHWSihFancMpCZ631zB97xge/jMBiykCuHj0uaRstFyJm8MGimP/Pv8D\n8R7nd2n8MOWJTIolmUgARwCfeYOzu+QmdRKka1TORbgQIBLjpbdF66fPZU81\nsZcW41RZQVDvcVoIqR4/O3WOm+dcYkmaQA27y89dDIgHjpFghsUptl+p82R6\nEFye\r\n=Dhvo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFp1EcYFEqWAlzbcHElBypcaqGu+N9f6YoWJRfpUhjFwAiA5X5k7IaE0+ahUu+H2GUebdQNwzAksaAjt2BdCvSjlAA=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.9.0_1583252413326_0.2847292213139163"},"_hasShrinkwrap":false},"0.9.1-alpha-202004161009":{"name":"symbol-qr-library","version":"0.9.1-alpha-202004161009","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.9.2","symbol-sdk":"^0.17.2","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/crypto-js":"^3.1.43","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"101f92f7d6afad9cdd00e6dbad1f2c337a4044b3","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.9.1-alpha-202004161009","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-g4h054qkm8/MFxZ03MPxcKMfqlNqUFmovjNXd/4ZMSfYdibUVs4ZiDKog5THR7N/H3NCulGKM8RCne6n2vUPmA==","shasum":"923e15ea65872720c85c4bb09353cc151d18c6e6","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.9.1-alpha-202004161009.tgz","fileCount":241,"unpackedSize":2091294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemC7oCRA9TVsSAnZWagAAKPsP/ivPxIeVWUFj6cBWgyEO\n/3JMF2x1XMm4CiVWrXgdFNpXpGjbWHq1zyfxluApWNZ3UrQqGsZFv6pm/pBP\nxNbg4SCdkmRMbsP5vetK+V50dTyZy7H+qw9R5npOoAxx3i9oktfSKgDDrMap\npbq+K+RnjYeleh0/z5GL9yHf6BaH/IF9+923BL6jkd81zNhISz1kanck2Mwa\nS9LMOCPiUkOw6z45xI4o8sRoWvrjDZocnYF3lwsqeR2/TLTRBrvcBTKW0SDc\nz7YCoWqtPiHsV2Emear5xdssAXaeo5BK5OuxqWshsZqa6ZGTwFWdW/xYOAuH\n9K37qgLZBOH/6urdItkwZxB35mx1E/RKUa5nDnbwPztmbOxZ0J70YWTM3Ngp\nQy77SyNW2MUzwiUBJO6vszDmDNaVIQRZCdXTIFohChyA6UK1mmPK++z95OIk\nGVyhP8DDITVmGItWQ/DN0CiETNdw7zKQGT130xYLjQ2/7AaknOJttIBaybt3\nBDhxEmjrqaCahVRrENRbxYW4SG3TgXlZYNjztIGK1CmDE7DyavOhnZFF81tQ\nzSMaUo4Vx+ViCWdFwBFyc21ZIuXGkFU7KfK7ZB2ckbasJd8jxv85i96Cqfol\n1brwd0+MsUEKx5oOjmBuHpVUUT53txFLm+wkdhlwf/a3dgBKZJ17WJ1ZaFgG\nl+lB\r\n=Ql36\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcloXvSP2LntIZsBZ21RN4ubqr07dCLQrHBM20QHSgPAiAMv7q57lY8DHYyUBpYOzJXzGHTJ/eXaTGHx8CEJxfavQ=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.9.1-alpha-202004161009_1587031784539_0.9081981966163657"},"_hasShrinkwrap":false},"0.9.1-alpha-202004161309":{"name":"symbol-qr-library","version":"0.9.1-alpha-202004161309","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.9.2","symbol-sdk":"^0.17.2","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"7d2d457a7675d75baec3ff928bd7a52a0de1bdcf","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.9.1-alpha-202004161309","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-u0e0Z4nmmsJj40E9SAarj/OEHR/IPLpr3kAFknR10RAEL7EZjQjle4wf3j984cOe9BFf6d/d6m21i2hFy6kabw==","shasum":"26e3bc905849fbfecc84fe55ea00f4d29639d76a","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.9.1-alpha-202004161309.tgz","fileCount":241,"unpackedSize":2093474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemFkbCRA9TVsSAnZWagAAqRkP+wW59+lEWhkV5GOKfvDp\nC8kZtdfPODwAgbvqokn2DWwF02sAznwEgBbm1fZsCKbb8qWghIT59cepI7U8\n+XnJvi1V8ujL/iu7YMBwxmU7L428i1U5GhIjEgFqi/wclg/noFzprHrvZ9UW\nrdbaJf7Qf+ELa4+u7SSEMo3Oy21ZugAtsPkjNilIMG40DKkPbKb+Cep6KqzA\niitlSdNJVMhrChbcAIs0lJ1uOfM+RW1h3w1BEVTAqP4Jmcn9mUmxLlmmEb8L\ntB/SlARTxATRZTIx6Qli4y9/wpU+iU/BoYQ7jqifcENCV5nWTzgQWNTeszfc\nwUcMHmcr8cJh9rwzx3m2e5QzoXUryy7D2f6yrvxp0DpVj7SocIwWx4WpXFbk\nXNnhVO5B13kpPYlaLr+WD4l/u2mV7rG3xzdtnFfyTU7z4a1OYxbVDfPsQWqJ\n/SoEKwGJz7qw+ncOJCi2s9Tl1dwoOzpPjKIZgp6MzIAmhNcBwSgWj/FzhUhT\nYa8Z/4lqsVxf5WnHdRAaMWHatlgTV3gOXm/K618xq65QkjRlty6g1OuKPf4r\n9CNTgY7BVQvWnIVtqX1a/1U1MHsLt/E4Y6FHUhON4FqI0zcNqn7bFdyd6SPU\n74S57coaDWMJaGXtN3Gahzs+eAZvy+Wt/cLHps8Dq7jJQN4CdpBisRoDWesA\nj006\r\n=p7tl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFenetTqLeVtuzk53WqFoDKdr06BqmYuTGW8ZycZOijVAiAQWh9mtMQab1ldLAPO/ivjLiMQrN5mduK/OJ0jm/ItUw=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.9.1-alpha-202004161309_1587042587404_0.25053175579160647"},"_hasShrinkwrap":false},"0.9.1":{"name":"symbol-qr-library","version":"0.9.1","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.9.2","symbol-sdk":"^0.17.2","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"7d2d457a7675d75baec3ff928bd7a52a0de1bdcf","_id":"symbol-qr-library@0.9.1","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-aUxg5BxkGB6Bd7vyZwzMTHOqGcmP6Y2vzp6+y4FRFDZKzzRhGIs/B9Mpbt869smWbgq00SYaLvwN8roicQK2FQ==","shasum":"4a0b0b5807d52a7ddb78baa2d01c9af2432a2f29","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.9.1.tgz","fileCount":241,"unpackedSize":2093455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemGUkCRA9TVsSAnZWagAAC84QAJY7KTw8zutanXSMFPnY\nEk2QNhBU2QEJuPNppgFH56jPyBtCRiT5A+ty4cVKJj/Kv+jRjiContddwhDD\nG1kvDUuWqdR/N7oCQLqdTH6uvVLDePjpsOeenTYrBvhikIAI6CCGz0/vfHFZ\nk80/EXDclfFTai9WYs5cjPj1sewAAI1VgbdE0qFn8xG8yN7owpQii3RXuz2z\neLbcWpqTHAOu4+1Q2QIrJJ411nmekE79Ruau6lUa1sf5ice7+72L5H77hP/4\nLvgyIgCIbYbF/jcaXovsxRouiuhUQwLJYU6KXdYhGiEmm92pPnT96aV2VCzT\n5fYg442+5hFqv1x6/S+PlIKBOSqM5/R5P9cr6+pIuIWfS+em/UcuUj1NYMHB\nKOP/xLJMedGGmWfmCDw0bs/5TShShncMTKp/JuJkGsalcKFnAV8FbSc6F1lN\nG1M4gQMFpLpXLFNTVVB9zQScrKwZRVyEyTwJHiVA0K7ofMIyjYMOnNHFTTt9\nR0+46+991RukUhSIYCtRU7iZ2XUz+tTCWOtyjIVFaTU1n7FgMhTFXdjreWZe\npx5QGeLM1ZeUVqLuQo4saqDYTbuGzYs0M50noccdXu17XSReWwciuXJjhcTW\nB2KaFdIeE5dXIWBtfmlr0bR+qOxkvM0byX0Ot7OtExui6V3NzhzEziLM7IBH\nOP49\r\n=H2Vh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoo/I0ubpemTNhiFWmH2pOkp0A9MeLV8PMDMkOjoKBxAIgSSZrgYsULds/pNzPdLZxcbWhHWbHXQY3/dk/4CdSF40="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.9.1_1587045667914_0.0617753120731348"},"_hasShrinkwrap":false},"0.9.2-alpha-202004161420":{"name":"symbol-qr-library","version":"0.9.2-alpha-202004161420","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.9.2","symbol-sdk":"^0.17.2","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"d26c5856687d53cb2a871135d79e5e14ed9b7819","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.9.2-alpha-202004161420","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Sz7tTWYDi5VC0+z5owA331eWPuLg7XQu/L/jZIgdobtehXiF/ZERx7uPArzU4r+XOGDVoXRHDhTmtogEIPlifA==","shasum":"34704dad40a3707cd9c18d6dc7b4837c74b86f66","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.9.2-alpha-202004161420.tgz","fileCount":241,"unpackedSize":2093611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemGmsCRA9TVsSAnZWagAAGM4P/10yPnH3LkHRHzelPXZr\nehGnGoCaxNNXqk+ulCpNtYrPHfUW2e/pIDypfgCu6EUOQsN2hScaU4MVKTFq\nBgXgjJZhqJF+eGnbj0C/p1M09Xz1YDVfrkyphBQy1/YqJLHHelpLtulJ1E7l\nuZUdq6N8ywGG/BdC3QqK70OlrQee/V53+BTTIas8yxp3IYVMzYKhVr7W8LA5\nM2XQQcnmMxiNxnBEsxpZngvMUw4kddUiHau3d1gnkgC/d7CsQgTQXc4M7fx3\nLEqaaTLaJp/IlvVxbRO6MwvrGaDh5HGs7zVFIEQC5k8oMJlPU3BUh2F+rgTd\nJf2uF/P8Z/QB4EFQcHzFcu6SaTP5JkT/ASAQWBVaei8JRNZ9UGtfs3qUHMUA\nZ4SrclZE6mLefVXJPG6Jb0j+4IFbR70ob5Cw3kDpmpq8DDVtG6pk91i5Oz7o\nvbGtf5m76HEXjMYKnRd2Y3PYQhKnf9uUt3/C8GBu4fOrkznTwuQvxLs9m8bY\n147N5EP+9ziebXNz/JmafpJPADqiv1lNDRzO1x7e6tNFcOBwZWvLKyOdD7H5\n+LziBSuScjzRoD12d6QJzmI3YWWlajzaF2+2iivKaBSla0ZBZvs7r5AzKu/7\nYNUKpVUzIEWIc5auaeo7tv7uxA3tXPNyW4RuU8EraorJA14ogcmbyE7ouHGn\n4mW0\r\n=YU7x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLTYyL5/P0UIyvf5q5qXXzhwOkktdbyH+SQiABNov/oAiA5n9ZcgGXxMwPQ7pBHM1gkUalOD3e6AD+CgDCbuQbaLA=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.9.2-alpha-202004161420_1587046827827_0.20653573880021825"},"_hasShrinkwrap":false},"0.10.0-alpha-202004271705":{"name":"symbol-qr-library","version":"0.10.0-alpha-202004271705","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.10.0","symbol-sdk":"^0.18.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"1cd972801132add5256709bfdee7b2fa6bac6a92","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.10.0-alpha-202004271705","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-RE5Zm3ut6BgWbPY457tKh4HrbrBSbbhBd7bvCGEmX/xbxDOvisTSX4iHcaK0sFiGAnzSFKGsKIwS0Rr9NQPc7g==","shasum":"cb10342f1b3be115b7939b61ee952b65e81e5766","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.10.0-alpha-202004271705.tgz","fileCount":241,"unpackedSize":2093654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepxDTCRA9TVsSAnZWagAABtUP/1uvngjL+CB+0PJu6xNf\nPyHYJ9oUiZItch5kFYUtyy3JMOgNHgPymy9y/+T3botXJiLrWehpjlqcjV7g\nowIsjIpO8G9JX23j+XXkY0HPfbQO982J2M05rR5xZvWC3Qk+G6m1hObLSnnx\n19KttlsKE2x1fhBRm7CgEcFplxuorgpDedkMSZC4DEZJBmYCVwDJp0v1t/5y\nhMabwvMixU6r1zCLf6BAZTBGX+JisB+LGDJBwK/HedgN5NATOlxzsSwfBEX8\nzFGn6IOwAVDsvHuFZRFiV9BnwR2rE2Oydxc3dpicgJcrFLaCBDqkFOi1W1+m\nSJiaZ3tEg1yOjp2NCY7i/YWcw/uGjQsbvHdxHAr4QxTEam2zb5WMu0ii41GE\nJT98+aQKKYBrHbW1Fp7hGYB0t96GL855ZTD8CsF7R+ZPf6GpjJ0vETcoeJHa\nY4yeLKhq1qYqvLBOR0EmjvclyZMYC2w/8YIs4ebuMk/bzkABVZk3Tpk8PDqn\nqM7mbLb3y6GZ0p5qlW8crhMf/T+lulxKz7qa5+XUWG0r3LeMVnx4rVkgzoLg\nV0/S/HKynvff9lrhSSlxDKmjeW98wYJjH6p4VIxOzDkUGlC3K30OW73i+AUA\nodqv40qWSrjqjf6z7q9RZh1s4gX6wJxwMSxnIjGBZ9RshT5kuiAfFfml1NwE\n+n6v\r\n=KDk2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHF7Ix4TC5YirJpFu35D4EHog3q7EuEtFPFIOqjCWNn+AiApK6E7D2tTKfOYp1OLavOIlLPsNMd/UoDQp1WkRySWNA=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.10.0-alpha-202004271705_1588007122585_0.5338547060920391"},"_hasShrinkwrap":false},"0.10.0":{"name":"symbol-qr-library","version":"0.10.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.10.0","symbol-sdk":"^0.18.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"1cd972801132add5256709bfdee7b2fa6bac6a92","_id":"symbol-qr-library@0.10.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vujlk5DTXmTF7Ra2P4l9L6BaC4Gn5LTLJU2cbXC0dFvytvVAew5k0fkroYOz8h04SvLwKK6OTnrRiKDKvOUQow==","shasum":"34be357b5253f16765e22d605b336408601efebe","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.10.0.tgz","fileCount":241,"unpackedSize":2093770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepxDhCRA9TVsSAnZWagAAtm8P/3YbTs0BT1BRvGnhP8lJ\nV4qN4wmb8zntCu8yNjqp38NQjNwsGKg5a/CBZsKoWOoVem2uf0Bo63Hnj3x1\ncDW+mr5ooYK5JMBtbzr61KOtnbr+nv5gr6+0zFom2CH7ZMwt1+hRtp/6wytB\nSG7jd2jrcqLTBrkoUZu9e1Gcun72d67o0XM0Fj6HQhnaaFGzfPqGK+0UfYEk\nRXhytLVf7mShVB3SJjaqTjR6EBx9d4f4s/J8JBvqTCx/x+RdM6R0cTGFdbaf\nZXV9bnjHEeWss5Tp4Xg2NcuVkTPqWJGekoSj3ufBLRFPgOoZBfO/cswUbPc6\nOVUDatHxFrW3isH2Y0/lik7NpUVZkaAsyXj+t3lwGS2b1TZ+8gHyZ75hqj53\nlpvg2Q6AkhDzJhMMwUj6GCUdmtymthcj53ikZZvTWchd+3ZImNicTqMQO/z3\n/7KZzsgRqdQJ+BWooYb2fEu8Uyv3dutfZhWTnkpGTSk+sVBOwQHiupqFgK6H\nh9hI0kLlestq7HMVRLTXFudwbByZORMvRVRzIh1/7s53Bj0iiFXQYiZDwJ6o\nPpndgOWh0VJVntTgtTzFFLLFyBFFa/SgR6ZB/FiHQEBJjm7TKLLmj6eaZvwL\nmbOv38yFlpRHMqewUeYfoi2C2rAfTEqNTWx6tShnTSQab3OUHxzHT2GUek02\nl1WF\r\n=QyMM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVqQtZNmggnAyXE93lb1OhR6jZGmwUKMIQ7N52Hm6GaQIgMcb6cz+4/cgQII3NaubP5zcBUIpZ6YMQB5Wl7PXzn+c="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.10.0_1588007136642_0.2567547321946344"},"_hasShrinkwrap":false},"0.10.1-alpha-202004271707":{"name":"symbol-qr-library","version":"0.10.1-alpha-202004271707","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.10.0","symbol-sdk":"^0.18.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"f5c48e1cd97917715349f9e5da5256a6d031eff2","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.10.1-alpha-202004271707","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-lP7VivQDcCZgu/K0HzFc4q6lZvyugo5DpRUlLSb2/d26XxdrOK+gefohNxp0fc6lXHC0Ryotc5/y7VQrx17wOQ==","shasum":"4a054507e9c38d1948276d7f549e8c6c5592e2ff","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.10.1-alpha-202004271707.tgz","fileCount":241,"unpackedSize":2093780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepxFlCRA9TVsSAnZWagAAZxkQAIDPuI396kb9b/AeTXa9\nxqD/3ZiTQXC2Cugr+OEmjHti1px5Xvp2lJ70YDuoEWqhUMPD+MMYd87DCVQT\njklu1fkPFv4hwdLF5LrZRohGpQbgWkXCwV+snOpWTVNMEvbCDojdhg9GLZSS\nH3ybp4dZlSFH7/4WeQ4gwKmD3cn6Y6UJ6jD2GsThN26ZzYWRkUXu9EDNShpA\naIQykiyOuKfSB40WPfelB9dJJtbLq0G62ykTA42voJq4KqiVm7Wvf7ZYzfSo\nK2isosJwyjLWA05G/pG1GF6F+CbZzVYLjFFCr4IYvzGbjdI0My4qEnshSQzo\nYlF3ZYkIaIkIXs2diHyDrEP/lSvZBQE/4HN7fBYZLhOgp49BfRSBynjFNxQW\naPG3KY6v2oAFN6ehtjMkEtrrr3oRyRf5E2qmCAhGLiYZc0VS2oMrKZSZBgUh\n41VikDBDNMYpAKLlSCCCyg+2C97/bSKtAzXSpyCz7rKrn5c/ZkMHNdjNx6vR\nRcjRoA+hQeczR1deFa/Q72FW3NhongcAxEVztLKUfdBuqDuRGBQCjZxtCoa8\nuko6eMnh9cxWWspUnWAJcDnXhcRjjUAaqqMfarbv8BvDs4GxWE1Qn32MVcYs\noIuDhhM9/tH/lr9x9NXBbddbGs9yKsihqka8y4iu3ssR+dDhnwREUgjcj2sh\n+A6q\r\n=ZNo4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/RNgT6C5rdBXPdypiA/8PuQWUWhwMwtWBTLzhCtCUEgIhAJY4OMUpoDR76hCjlIzs+mtAspB+mZTdsXs2+lruQxby"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.10.1-alpha-202004271707_1588007269177_0.9556150140179838"},"_hasShrinkwrap":false},"0.11.0-alpha-202005251421":{"name":"symbol-qr-library","version":"0.11.0-alpha-202005251421","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.11.0","symbol-sdk":"^0.19.1","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"38826c82a2b04a72c27f76c102d9cd3638fcd322","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.11.0-alpha-202005251421","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-OSXxl8MhVeXwjBMjwEMi5E8d+f0AURkJfXrP52dlRnNuIPfLCCYwYYa8TgyUMhkprjiXkbpfXPMCPO5KEEaCKQ==","shasum":"6b74d91f9f0a07c046c5aaec97ea0ad9fe0eb7fa","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.0-alpha-202005251421.tgz","fileCount":241,"unpackedSize":2093940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey9R+CRA9TVsSAnZWagAA2GgQAKQLgwV35vCsxnTAiVTG\nUP1iBfOiNWkwFglFLoFuCQ2k8qBm9UJbDZmhxXOgnPFDt2MpbsQV/UQZQ0XB\ndGHlPbN7yI6n4GX8gw6BqaqQ6zQIe/ObM3mvPzQKLKWJvm0KubbMveHNnO5F\nbtq9NUcKYkyhwpkgwpbkM14bQ5EGnkMQt0xSl1kn2+BcoulF6Z28JG4ns9ac\nkZH/O8SjrnUSh2O9d85gY/G/f99ikDuaXrsFyWYCKPfwRrN+ayEA7u8xRnUN\nzefohaHl00Rlhs4CNXe56vSJ5iMuREFOCtzMkYHkUG6pi0YrcjpsRbCUVqwb\n9vNRn1xpJ+UjScr8x5s+efF8GrnOp1OTzIJO/0zHRWowBA5B2gzg3XWrwFd6\nFE4gfPC+MM1Mb9egzqykt+m/y3NRxRefIJOIKTPRaAfgJILKO3msOaBHlRbM\nqjm+hbfqaDXqUqhkc5t6NBmrKtTasWhDGatwchDd13mNL1etMBj7K+hj8rbe\nr6fmZ+dX/YnymtKoLQIharjyDkZckLCJoEimzSQQ1qKaPlq1z0uHCzdTPs5C\npUofOdvc2RNHMPoulgenF3YA1Mr9rbgO99ZNPol+QPNiYt+415HCmNPfqbYv\nKs7qqz90PsyMqP/rG1LVBoL//QmL2oItWAGhKn4mdVDozYlmG4737ujFwZ/i\n6Q5t\r\n=M0JI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNtiKr9HnDj5/2GjW8AK8VFMHg8OiOYryDXeXqn/9xfwIgJAknCKfklnYh3Cc6bTETLN43UhmvHbyJK6TinRjAKjE="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.0-alpha-202005251421_1590416509673_0.19968914734792742"},"_hasShrinkwrap":false},"0.11.0":{"name":"symbol-qr-library","version":"0.11.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.11.0","symbol-sdk":"^0.19.1","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"38826c82a2b04a72c27f76c102d9cd3638fcd322","_id":"symbol-qr-library@0.11.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Wrc3G18Tn1IoW84cYXV417inpD7DSjOx8W6afDhS/d6QW10JTwwHPMHr9xCScDvdZ3+6FYda9lSL5aqeAl8Q3Q==","shasum":"2cae3157f1916d69f8c037cf1f26cd20d83965c8","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.0.tgz","fileCount":241,"unpackedSize":2093921,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey9VhCRA9TVsSAnZWagAAZe0P/iI1yb50B9UoDj0b5DmB\ndyIyFLA7Ma0rPCr8HMPiLC/VvYeefX4iubBIn7BpqPjXa+e6TO93Y3VvoKch\nj0aRcGIG85d0psbdXQXgyrDRKZBKBBUQRUwGgHSpIGfIKnoHTIEnMDk+U9mt\nBtOmqS1D0+mxnHbzVx6MArsPvRaEr1WPn+PXjkayB9IAzgvsWpc1lxZW0uRX\nYpWmBdssLYjwp6yiUFlQAtotBgmzUmPTHAqdVNeJ1hjSuo+ob1iiG6qDqXq5\nnhzBRLaKZ9h6+CNMcmIZCGX9DuAYlBDA2WT00OZwZmVoo4wUeuRcUdo1uqEH\nPhfa8qhVdAI+NXuSwkiczI0+PiQ3Q3zWv+DfVglJO6GprAzCABUODtMB6Xl3\nzSVAbnBOSvixy425kD2va2gtxl3dPK/DIkNi9WKvOqsWhrznD/zj+3i4S6BW\nSoQjot2+2SrA+jvJXYs6rDuzrOsLJUMT49qfUcB3dkjI552q5vQMzXGOmz6B\niTrwZP1rYRtgkyOUGZUl8MtFLLtx7z3b+EsjJ01CnDHyjDQlwoPMym5GEdBt\nt1oxecpnMskTTCCdAyoDgvJZ1bpFd4n3dzCVNOHIFXIFjQ0PWLJ1GT9fL+Ij\nfgCBMwfMYQ8JdLS3Ylf3rPnpxiMLhUhI4nfqFQUtPb2UjoQ/dWEWNlrayI1/\nngnK\r\n=JF7L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGfRysZ1GklWPdsDwmuEUisUfZ/mTOlHEwJVT1GJ+1kSAiEAjtG6X4wYMd0KvHl5hjoqjQbLF95bDxUaq7xQGhB6MBs="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.0_1590416737138_0.446327609145045"},"_hasShrinkwrap":false},"0.11.1-alpha-202005251427":{"name":"symbol-qr-library","version":"0.11.1-alpha-202005251427","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.11.0","symbol-sdk":"^0.19.1","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"nemfoundation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"ddad0a8576ebb06a3bd83af6645779addf9457f8","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.11.1-alpha-202005251427","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ao/2cPInwxeYi+PFVkYjV7myyI5shjOghI+BAPGoZAhYeD80vosR9VAuG3Mz1DcA8mTVYeFSUAvxbi1XAbXfAA==","shasum":"10e0a9b98628dc5663a96a7a54c726d97dd15b17","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.1-alpha-202005251427.tgz","fileCount":241,"unpackedSize":2094066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey9XdCRA9TVsSAnZWagAAeQIP/AgzPp59yRxCZSdX8w1X\nEhtMkPzhbLWU0msAcXbJBPMLb8LhDEd+5hekbYaNQVgzjSPz7zHrW1ytvPoh\nTG75WyfxSJ2c9QuuGqWCfUGi+nW9AwOqWuLyUE7lutiapckB6KMpUm+qIf9u\nE6yg29h5xpzURC3U0Ay3kXbA/o1xwzdnzwxgWJWzihnGuIkHF8VVqkPS5+MV\nypbAEK8RPpmrynkuWtu4xT+WcHmJgiLygzg2LGN3OgMIMME3JpFv8xYsEG93\nwGEVPuJT/dXZysxpaUvaXRM7sDXZoaC1kcP5Ix4ifKCfiKvKvL4Y5fYNVNGc\nUdFVhdbIeQmi9PyKt6/TYeEIZ3ZvkjISVnGW5pZumDGPY5fM6uquWyIputnM\nd1PUAjC8tzoalrlOd/KP4AmB01GVQUGDXstYN6KB+Vc5vNRMBxWtlH/LEgyi\nar/0EX3mgA+CooP+vT/TuZYvEvIoctsWWGdi9ZLFRQVwkx++vNHGrhXXn+As\n2jQqiYisDxxuNomR0kTclw+IX7zUhq/EcneY2L7+ho0Z26JwYKdLDps+/LDN\nQAKvlgCrfiPugx4KDKR9A6Tgcbd7tQm6iDexNs7tEHtXiQYspWh6d/+lY/Z6\nCaTLPbpStts+oUwOqTHiXxd7kR1sZmNeqCFMVzP34nJe0KW18wXEBm8kvyaY\nfL5f\r\n=BD9c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxZx1ObJH4X8c9/hbe4PFZKt523tKNgTPORpYUOvVcoAiA0Hwo6gXedJq9aEtW/EWz0FVa5wvpRK0o+lDdBIWyfTg=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.1-alpha-202005251427_1590416860828_0.938793036725581"},"_hasShrinkwrap":false},"0.11.1-alpha-202007132144":{"name":"symbol-qr-library","version":"0.11.1-alpha-202007132144","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"0b8d303c5868d6c8db6c9aca50ee20b99aec419e","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.11.1-alpha-202007132144","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Xw+Ga1+TuXl633Mb3w4757Pe4xk6XSrjqiGjz/zaG7fKuyHXUWgCVgwxNNfrh/V+rpyUb8PoYdzEgfsKDRjdcw==","shasum":"6cb70ba7508b973797b2521d75ebdf0f951d61bc","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.1-alpha-202007132144.tgz","fileCount":241,"unpackedSize":2094312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNXMCRA9TVsSAnZWagAArh4QAJTqSSmkha/idASYPIEA\nYL5M1nepqCIRNL2FzvCcMEmygXFnw3louW0465r01WVde4KnhcPkPm/pF0Od\n4lPS46qC1zVgmFpniLY/WHMh8BAdsjDvDgs4wu4xF+W7iFi8VHGsWnTbSz5p\nn+WJnv9PWsFzWIqdCHSQf9F4o203YX8SCRS5dbjjfam8ffVyYDShbhN0gCyn\nqxN0dSTu3KXE66nkgyAnn+8tx4V9S7jkOjhEiC0ARNN1zZkY0V1iQKx9uOUA\nDd1khS4Xq2pPqqv5btUfRCoT2W1zv6IP51Y4n/ztLrxuabXZ4AZfsnQguQlL\nipUz+X/jA9OwNiAwjb8iC26CKy6f30rMOxLctWh7zo8irndqhkQhugPoyAzc\n6tvOUd87IdhtH0XyMJZhwrAaMkzfnY1vglbKztSgsuJ8doj5VYDxRegBDLuz\n/OmACkyhM4xk0s2GzO/fmK7Xo2x99Z49LBAgQGWX9SBgDFg0w0lk+0iAlZd8\nuanHXrGdlA0NWh4HZGJTbpuq3XvkV9ZGVj+PcQg3Y9FGHfzyJGkoRCnPkcGw\nIOcGTcp7wmsRtBzC6wCOhIb+tVppCEdpC7mUQu5GQhlSg+sjOcBN/ojaFzzQ\nENBxUDytG5KqjH61ZcwXvSmNUxbPeJFcRztrQY2pvucMskE5uMH0p8PzqlHx\nwI9i\r\n=qcFp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICm1sh2nAP7pFGElVmAO3+ZHkHmJIxFHr7RTdTrV7pp2AiBfcqqSriZ36xw7oVqBRi5wuT3h+UNROmmzPZEongC7uQ=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.1-alpha-202007132144_1594676683760_0.29029019408246315"},"_hasShrinkwrap":false},"0.11.1":{"name":"symbol-qr-library","version":"0.11.1","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"0b8d303c5868d6c8db6c9aca50ee20b99aec419e","_id":"symbol-qr-library@0.11.1","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-RX46MaTJkWG2/PYKXWL+XFjihscMn1p7+Wc3cif7YF1NGBdXbc/n8HkJ0Xt3Cu4lvuIp/JZmyd6dSyzuxDls9w==","shasum":"c54be7eeaaa9e979757d24b165ae72d9426a38f5","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.1.tgz","fileCount":241,"unpackedSize":2094147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNYpCRA9TVsSAnZWagAAvIcP/RxT7EH8Eme1gpwkgakp\namtWWSHhfi+ZJsoqns5odIJPhfpV42GXLrgVGNEtLbLluQz4rYsQX0eWfe+P\ns2TMyPmp+5c6g+8Td83jUoP6AxfVrohfCCgypusAIgE4eiPUuEV5ZePG60A3\nlu3La3I0VArGJ5qekgLs5pFlXU3/3I02zxoXlAe7hULtSCwonH94LWIefBNT\noQGxlyLBgh4314QUSXxBcPW56+kK9quU3qweaNYT8ZxsB/pcm8UNOCmpWoJB\nzSrvZEffv7skJRpvnl2Hv6PxLSLi+sNWwUR701O0HhxvwNQL6HvFOiQAQ7WN\nnUT4fdGAXnAl3F6KINzgl3lfl2JicJ17YlFDu6ndRoZGcQvJ7MNB/ykEBoho\nxLv3Y6rQ6ooCv/uduzMMXVUTaH2dDPlyWCHorTzMFTgPrbKAB+vyZ470TWYs\nMdTTXgawX/U6cXZpVYnVecoTgFB7Qs4FiR/wcT8JQmxJgTIFIETS8kXLgA+R\nlTHwJIEm5Y4ErnskpmeQRz6AnMuKGhSJ1YspwQCCP4Hikc1ateHz9rwtSDOv\nA8kyqq5L2D3uvYcax4FPn62AsW3LXpTBMfu0V7etge83KZMQiexJQz76FJSG\n1K72clieTuJ40ko70uKA4pT5XA/y+FFx//iRuLymZR3t9KqJF/FByHcVXrA0\nvclR\r\n=kjIQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHPCNPxpXh8nSIuNECaE4A2LztPTFjNfWTl6q1ZUItBEAiEA0iz7+ufad86V07bmZmlBOe8Df+6VEOuGJcE6NpUlchk="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.1_1594676776878_0.8564317688475822"},"_hasShrinkwrap":false},"0.11.2-alpha-202007132148":{"name":"symbol-qr-library","version":"0.11.2-alpha-202007132148","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"7458579a7b65664ea6251eceeb7e1681bd587351","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.11.2-alpha-202007132148","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-GM16kzo+8RiDc9iVqh/fAf8f8C7ye6/gl4VNwA2Wc6zIQPudASAkNhL3GSPzAJHrFJcBVSf9GyfDQznuRKKcTg==","shasum":"579ba5121e21b839b60f9c17745b398f474d6884","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.11.2-alpha-202007132148.tgz","fileCount":241,"unpackedSize":2094175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNanCRA9TVsSAnZWagAABscP/1rIugsH0Ya5juVYiwP7\nl4YLNJ46syErG78CS6Gi8l2NiuuzbHq1evKLV8226y+stxOedkEjCe94tLAB\njhWrykSxnSztwq5mYMLJqJL0byu1DNEfr7hnXEqlZLdGJafsJ33KVkmMDJFq\nTdLLblQoXFjPUbZAJ/jWufJ5A6siRmyEyIYyHFGcsKBD4pvNYT/p/Xs7OZx+\nnUfRVYeH27PCvO7x5VyZjl+rGI/ht9advV/ZMJxYIhi69CsowWoPGGVo7ESi\nW/0NVP/GQE+GlmDJQpkDOFvlZm/v5RksPbr9Npi1uTuPTRlfXfYzf1hmVLvV\n6/LpUjwlHl3hPlf+mDL1GXZ5ttxYqfyfcB7oUaRcZ7XVIwS9RWM2bT9BDXUE\ndfx7Ipnc7Gr24wG2Kg3gaUM7BRC8QzcQd1sHY41GiQPBaeXVVBSwamAkggUZ\n+ICCYazVeyrJu4gsyYy0c8oF2fuH5+MhQONN5XHhSCbqZcUdilXmcmMZ3VDs\nSXTd4bX6zDL9xeMnHR+yWCmafz9wzkUpvCQuGkOfehI3gAgSwhtLKED3KeVA\nBbSSvkWeLEa12h0ApJ0JC7Ea00o7PScVl1R2z65bXm7Tnf42GWinpSpj/X3W\nLRw0LfOfcMr85/QVQrz7TT/GgcRNgEwWP+SVyNODs0Yrtr0AiA20wqWk51AK\naOXN\r\n=fiww\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEM5JTSFzNdTTTUS9Y7eKmA5mg8Nn199cYZsNGzK8vfwAiEAkkjCQMpeC0aM80y4Uqu4HRrbGcnw28S7bzdDxo0rHoc="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.11.2-alpha-202007132148_1594676903402_0.6568446917968536"},"_hasShrinkwrap":false},"0.12.0-alpha-202007132152":{"name":"symbol-qr-library","version":"0.12.0-alpha-202007132152","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"6e4907e13b9acf6cbf01d383951f5db75082bb49","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.12.0-alpha-202007132152","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-tRBHzSy5kXU1CG/tve3WFAEgXPEIhH5vwcGgKwZYPcEFdW3Y3Zq8vgqs6NB3JMVsLICSVt1/dieAjHJX4207ig==","shasum":"d6a3475243e063292bf791f7d671ce069b8bf24c","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.0-alpha-202007132152.tgz","fileCount":241,"unpackedSize":2094040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNeSCRA9TVsSAnZWagAA30EP/je029cSpfNnFTgi5WFP\nwPfLYRb+XjA6JobBXDMnojXPEqwQNs8Y/+6b/VpTXyp9AxxAyPYWTwXQLotG\n+QDB76GW2k/Qv1wCfVZUJA6j/u8BKM9I/BcOMdAPlzuRUv+Q48ZGJI+D3ZEt\n93F+YjTgmfjAwGhTwLjHgnqTWqArIv+fhsuVH/0UHaljg23VbNQs88S5M5tX\n2pd9adMf4rW8GABjV0y3mJhRPiHcFsrLo1rPgTj5gUI24uPzUo1VUcF90jfj\nb83pJg6O4wmoTwvNq2x4TRRIDOwRze7T+4/LPVcwAQMCmAMKJP130l258wzs\nWDTAF0NeWFEtpXe/L3INA53I1h7ZK9zMTEOWLNmGwbnGjjLObBF/aImxABfi\ne5Q9qng8QBAFnnuS60bJEaN8JAHpS7g2fONQoz733XmHxNeZO/noINn6ZC1+\nVT0PP+udvnjPbWqsMC4Lkhvqb2ZprHxJzquOhz4OFpl2WI84o/4a5GKDWHNe\nEv/5TB1kkpi7JjXShQ2ZqHj+sG496b+QcGVc5Zn2N0hsFhGF3SstXM2vRRMB\nepVCaYozaN/QJ/xGfcNzl6dAVkBgMzVtPNhAGPZhajqtWRcg9TgJ34lz+TkS\nLuOutjHsv4kIAthgT/jui8UTRQ/V9Cx8ONiS024LIU/sG7Lu33Xv15SdD3n2\nisaG\r\n=nNpv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCxury5fnt/LXyuxfJzXTDKHhWs2LidAFwnr4RTuTtOwIgagMxT2Ggf7RWkn3+bPQYwQ3k59MiFi0wqFJ96rAxwl8="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.0-alpha-202007132152_1594677130336_0.27702346984418047"},"_hasShrinkwrap":false},"0.12.0":{"name":"symbol-qr-library","version":"0.12.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"6e4907e13b9acf6cbf01d383951f5db75082bb49","_id":"symbol-qr-library@0.12.0","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-mt9f2nGBTMt+YAbZzEHQ9Ls8/36y4ttrIN5J7Lj1O2FSFPdKXi/x/+OaGIZnVvIknIURCpSR81iNYgMC2BBs6g==","shasum":"217e09cc7dd3b6d25db4b75b2306c5e65fe683df","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.0.tgz","fileCount":241,"unpackedSize":2094147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNefCRA9TVsSAnZWagAAGGkP/3RUsTsmqjH3Z611UiaU\nGoNfvnUOq0CNaVoO+P3kJSEqx+8wu1ljXQa4O9r5u1O+Nyy2vqHSkk+zWJNs\ni2u/0oBMfUuHTCUqG1XkP7ggVPCUMu0dDRiAk8BFrdxERgkfYJKTsQCDNSB6\njSFgFxZgbaUFX1oENrRG3X85IFCZFFByMHzYyErgOB4FSNUCLz8vBpSp9sjX\nYrzn9xtMSy1wZe77C6E3qAJSCKiPB48RksHyCOZEEqwrj58zmXUQAFKCG0cV\nGbokI/x9fs0bGNq/g+cWoFGENwH0nVkwCTJy03T/5KroaakdN1jQAvMlMwvR\nWsTUMTgbYl7dq/HLPSC51tu0C5SG+OsDV35QiVz6uWaqwziOZUh2wjQGSXa3\nBEnot6RIqHM7PVZ5h5Z3kAtBQ36uGmUjrEnlQgStUJJOZjPSeUyVLKd8TAFE\nEYziqxXFssqVPZaCeHB2KiwOIU/QA3aB2He1eG7AqOxauyRujnyK8NG820h+\nEmb4FfBEhc0N/1AYbQ/jivuCwVOpAK1CdgfHCkDqW74FMwJrwtRgkS+tERc/\ng6kf+/W1lTdMZ4U2sDpUw12lUrHpfIgaXzrfQ3FpsgMT1Tmqmp7W+J0rDJ/U\n5g8YCnVkACgYSSRPt7YNc/9VoXzSL64TbqIG3mPQPnt4Z8qmSjAgCvY2zgt0\njo0T\r\n=TBgN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyfU7tsxOHr7bH8rVaN4F7FlB+YVETxYddJxqr7+RVAAiEA8WOYWTKyBbVWiPbo+1urBHTUsfAUulMm4N+lMsEOyr8="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.0_1594677151439_0.8887936308092463"},"_hasShrinkwrap":false},"0.12.1-alpha-202007132154":{"name":"symbol-qr-library","version":"0.12.1-alpha-202007132154","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemfoundation/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemfoundation/symbol-qr-library/issues"},"homepage":"https://github.com/nemfoundation/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"129f530185c12307cf48dcbd7303db8963a2ff5b","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemfoundation/symbol-qr-library.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nThis project is developed and maintained by NEM Foundation.\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemfoundation/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemfoundation/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.12.1-alpha-202007132154","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"integrity":"sha512-V6vAu5VzDFQVipfdWmn0SRVU/JMMpoLoQYwDvJ24vCgqtG76Yqq43VMg/qW0kxUIjKi/sreeOkrxDBJbjCOj1w==","shasum":"d5aecb3599afd6510c301be94cdd5d200b7ff7f3","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.1-alpha-202007132154.tgz","fileCount":241,"unpackedSize":2094312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDNgeCRA9TVsSAnZWagAAFagP/0xH6HbIeQm1hE37nfZo\nwfk3fBa569wl6PxVm9qCmjLxFr3z/9DfNy4swnuRtoM7K/7+BW0oj90oiu+P\nOlz+09RiXd/r0zFArcHIyPS+q91JXfag7xZjonIZINk78VBjUvlZa7y/+60e\nVhu1O7w8G2gMlsIpC0tb81AKStOZ9guYvA9HsfuXPWD67jbjbOmIBXDVqFRn\nLJGI0RoYAuqZwmDWQ34oI5MuuDXnbk6dfbV4pEvAZJ5Zas+qiuN/Y+ev9+UE\nkgERD22PEo1AD97c3tDsKiV6pCX38ZY9UAhsc9tADPBtbi3Nm1VM9bUEA/A1\nj11JN0sphB6w0ysbwBv6jc4zGT49Mn+wKET0bihHwj3YcYnqBmrieq8F80VP\n7uITaR51UEsqqNdBzJ9kh8MwfZV+fck60ithGKT9jaqMOCtq7TPJiiuOULxL\nsMJ0s99Cz6xhTTAioN7sPVkjD8jfi1Mfl2FroJ46wZrhNB5bv5xG9Z9GCbKM\n0KKva7RnATSkIapWr1uqMf1hNkt9lXVUvJ6OpXImwrfFXXsc7wzIoKBF4Sye\ntuSgUW4ZE/iG4Yb2f5haD5m15hfFW3kgP4sJF7uTbRxnTnzCuHaj/qJ1DOIJ\nFrv6giwDWK26zItPgGQ8P5o5xxq93oAmvfZUFBzSu9XYk0Yp3UR9DHzrSX5B\nfgJe\r\n=v6PR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChahCnGdFtHpGxy3BCow1Z4SojDLdfkNDqISP81bT84wIhAO0LYwIztbQnybWCeGrAv1cQZePpI/60Q4ak1MfHCpjn"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"devs@nem.foundation"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.1-alpha-202007132154_1594677278250_0.5783487640258125"},"_hasShrinkwrap":false},"0.12.1-alpha-202007281456":{"name":"symbol-qr-library","version":"0.12.1-alpha-202007281456","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"bb79d96d5ffac95f3bd70b4f7a7dba6261506ec0","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.12.1-alpha-202007281456","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-uPv5k/vB3cp4wjLWvNPI4x4ZL09C8yjSXvaTzxIBvapDmFYtfT20X23XDy0NPjlixMeS68xfrhUBpCYJ/B7H6g==","shasum":"f1db5273be5d9a6753fd63d019aff0630c8fdbb6","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.1-alpha-202007281456.tgz","fileCount":241,"unpackedSize":2093054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIDyxCRA9TVsSAnZWagAA+4oP/0yNaiZInobRK8HtiMnZ\nfG2W5u40RuUN7wEiOLE18wVL9msSp4bdiH4aHMFVc5g7QBEhtQhoSrIXpP0J\n0z9qOuKr//OvH0jSGtTsOwHFTTB99iV1/XcaDt5gc4x0om6eale7oQf920Kv\npcdvvgcRZNUaENar4RAfpseXy/kUen10nYUtp1Lj7qSfDiKLvycTZ9KuwA1S\nV+1fFPYjm+SVTEiWNJlifp6F6+/tb+dpwF7cf2uHip2SWYJp2zEYHK6cDyEU\nkp7kEunhID+P7pOQd96JsZNm2gfJtuU2Jwk3bq2esrujoLEoPdBIzSmKQdo9\nsjTdUfMAq66YaY0fyiqgfhdeA5cHY2gyN71uxWo5Q5Pb63kcqYWnfRAlt9bE\nNaugj8Qh31KVwJ5CdtnG58u42AQOIqCr3VqjKccFmeHgA9wLBl0n5FAKgUi5\nFiaF+iZpWhjqw5CjLeDYlOEalDh96H1Gvohn2P2Cs4BTSG+v+c9Ybh2cSGT3\nNvNl+SXUvsce8Q0ZmUwqiWZjVPSRKLaPs1ETtIh+FULLLH3h+eqtcMn8aBWs\nhlaeWnhz7LCwprDq2kLY8k09j5Fx4jhE73Y97iyx7YwDG9PhT6qmbKr14Hhk\nD/wqwkT5t49koBUCLq+P2LefJLZetl7Re1Kis8hD67s+4+tpVHRo/xnSVFIl\nBKNs\r\n=I4ZR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbQ2fjOGaV22i9DrrwypA12QPdq/Sg/eZgDsPFCqdIWAIhAO5/obKowBgDMZ9ItpWTUdpdq/wn/D3463B4qIcvzoLs"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.1-alpha-202007281456_1595948208561_0.903053504301722"},"_hasShrinkwrap":false},"0.12.1":{"name":"symbol-qr-library","version":"0.12.1","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"next","symbol-sdk":"^0.20.8-alpha-202009180859","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","gitHead":"8398928143543a94fd39bd0e438e9ebe62b8e1e8","_id":"symbol-qr-library@0.12.1","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"evias.be","email":"greg@evias.be"},"dist":{"integrity":"sha512-ctK+WBcq2rmxLbD4ZcD1XWc8+8+W3jcKPZ0xeVKrQwxGmFP0ONbwtmwyX5z69OhJLLVljdlCXBtw28aILQMH1A==","shasum":"077c99e163d596c3ddf7cc4c5900365bc4f1e05e","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.1.tgz","fileCount":157,"unpackedSize":8566978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbS3ECRA9TVsSAnZWagAAB+0P/Am7N/5ScskSi2Q1AjhI\nSHCOcgjYjRwGKvZ1Ay7Ec9mMCkbVg54r9Qw+HMiVedzLiXXY6Ws67NiNddGB\nhonUSRMeOtBN6MCLaDXtu6Fk9BOZtvFBugYdrtF0m5iXANkp8mM91FRK6xzo\nCPdfUmbObwBKKjbyCX3qxeEudXM2I/Qe1N039M3Fb9vSN0XZmh8BIRqAaL45\nIY1MJgBi47V/B79UnajnUCM5mScEcm3ZRnnqdxJnGnUFjhsSomH6bT7ypBP6\nUHxpAeoklmznsacEGjpDNM12e4a2L4YX2YwMObGKRDMjz00Y9RsQ3nuvQdyl\n35Iz/JKB5NLqZMNQKlSxnt5UNRCHE8tDWtINmyj8hCbWSS6RzxP9eWY/H8UA\nQoSoASR8QI/5FhyaVH+Wrg6rLR0YJyOkINPf3ch4rwX6TEV9udknUoOCNrCc\nvMXPUpU9a1iJBzEZTwTsjTeg9G4unnMJCBQ0hlup9u75WRbWuqKrDsHT9vC+\nWixHz1YR6nmGjGoRGW6wk5KLW5qTezyCh1NEfxf5+vD6MhIPrm+pHuT8yOPq\n76hnVW2E9ImMe+xiL9jO6d8tgQirqviN0ZBRjE7Ci/jAiBmbUmj+a/f7VIWA\n6DbKuIqcrWx6LPIhmYyEoBNbK4wojcw0kYnxV09OiTRnZlCfwXTMVW/hbQWM\ncd3d\r\n=4aXj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCT8cgArbDfErnluAGY4NyZVuH4pCJLQvaDDOtWze73IAIhAJWOZx7Rg6DJ1ob+BCB9zWXsnBemRQsKCUbyPlYa/7tW"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.1_1600990660026_0.9007649986171955"},"_hasShrinkwrap":false},"0.12.1-alpha-202009291327":{"name":"symbol-qr-library","version":"0.12.1-alpha-202009291327","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"^0.12.0","symbol-sdk":"^0.20.6","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"48b8767469874e83bd294d81348e865a100474ff","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.12.1-alpha-202009291327","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-l4JC7AEaeSbgdhYJyyB7Rc+CBFtWE/ob0qXC6LsOxFp0DK7+1OhA9r1yENzxD7X3baplYvhfRYIbA5TgkztaXg==","shasum":"64768dfca276749f8ef568ff29f8c7e45d57ec84","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.12.1-alpha-202009291327.tgz","fileCount":241,"unpackedSize":2092971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfczZHCRA9TVsSAnZWagAAr6MP/2CSMcfo1W98FWTacWA0\nVn2Ku5wUVqTpzocmFpnqgU6nj+GiyUwfEE9/kab8te0VotPRbjR4TvlwJAlp\nhDp+HQv83ZpVi6Wa4IXkrpRe2WFQku+5PJCYXfJiLfW94tP1hAlDZywrrbja\nUNoJRkJUNplAdpxi7BFIblAad5U1FiSUEyZt3yVxjeb495qOJN/Mv8T8RErl\nphEpFtWNRnTBv8Ue+BxPmKjMbFRvoF43/5R+UqAoOqdPJfMiRZ00iSGangBj\nwcW5vjFTctf4qQ8qsOVMBSNvW2o95EocuR03xG93M7g2RaRKeuFpu5bHLLVE\nC/wNyyGFgUXGehut1sjQy/9an8VPKjxY+KJsWnyYW5Qh0Dyj4b6PYuHDVolY\n8bwDoEo326ahA9UP4AnDuXSQJT5fk29SCyTzWKUqFRjWY/Jc+f8hsUFWywUW\n0nKYI0NJ4oEYX7fGuM12I15I0ieGKrMZhXUc+2SE0WyRJjc2LyjhpZuW7kIE\nZ/ftPuE25yy03DO77PEyujN4fa3XyUrO6ranMbMEnDc3ITQD6fsZe5YtxO10\noKhMIgqfrj7/MSIjJIEni9XZ2Zj8AhuL2hbJGNctaf6si+Un+eEoeYkXTf3V\n5XWXnp4tNesFzvK4TycAq2Pg8G5M1XHXoHQC1RHHnJa/yZeoBawVAfnBKAAw\nK90q\r\n=+/tf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfHHwRK2c7zW7KXOhLSGuL8kMs2hZe7LQ41tO4cIVGJwIhAODJDY6062wjjn0cGsIGcRGW/E6RuQjY7TwM43Qjbe1z"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.12.1-alpha-202009291327_1601386055221_0.866245039096124"},"_hasShrinkwrap":false},"0.13.0-alpha-202009291346":{"name":"symbol-qr-library","version":"0.13.0-alpha-202009291346","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"0.13.0","symbol-sdk":"^0.21.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"32843e4c52ba9a66fc7c7d71d51438d2b5effd2c","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.0-alpha-202009291346","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-yuTnerwpMIlbXMdMfR/Q/dK3cXbXNy1/JDcnYWwaC9wnOUYa9dxR20C0QXPhhj8WOugQTr95GedZK8QUZBEFrw==","shasum":"3e08d01f09dd67f72f51c10c0e91e3cccc046b52","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.0-alpha-202009291346.tgz","fileCount":241,"unpackedSize":2093280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfczqdCRA9TVsSAnZWagAActAP/AjRNWtyV/eE4Z9S/oCX\nhHbtRelj0siRbdDscA3Xz0NGaXr+Laag99R9a47X78f5J331PXnYQcuyclAh\nNWwH1+giRzSzMx/7zb4V3somo8U8mBc14hGSG6bTW1F6VL4VWdbEKNb6a5Gh\nQNJNIpJNq21X4qlX9hh9hOfK2auZFmzhwXGvGlXLMct55NiNqG0Tilzzerrq\n1paJeEX4AzliqaeSUHqQWQIM3UJRvUsywYVuqwYhXjTxZJPCpOg5AvJph0DN\n95KTghcv9fUDtwKX2qG5Ymfrs4HJD2wB69E4YJMJSnZtELyGMWh4WA3eanPG\nNjSmtVC3iDb+b8UY0BOl6noxil7AaaI8hXOrt6AjxgArbN+bpJb5TQgi6/O6\nzu98hfTnUrxsH1z2zOpThaSkVqmyCzGpqXduQztncICuJKGKKihWrxAcHYaU\n2482cZW0mJWg2HQ2ZykfnEWag59nkcfWkLS99ncyQDBEfUplq3GgmZEEtCbH\ngUdQc4CzIA5LjXTHg87girStITF9LBJ475kCoD+jwHvHzcFBSv6R6MtUx6Rw\nE94QuzmG/hsO3WRi3Rp+fvKuTjlaM+Ga6fWmOMb8AN17oe/y3NCCSZIux4dv\nRTA7YIHXPSMHY71/1eMfxJWyhjsycPwtWVHVtSpoIIEM/UFgqxrKv6xBHF7y\nrDVA\r\n=Qei1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKzLlPz94MOOxVCcPRgLXE96HtvyHDj5KJB0w08IfNpAiB5VvJJ7vybG6FH+MIpKm1Z5DR7KeiK8naUstb7Z4QlCA=="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.0-alpha-202009291346_1601387164516_0.9086553282473169"},"_hasShrinkwrap":false},"0.13.0":{"name":"symbol-qr-library","version":"0.13.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","symbol-hd-wallets":"0.13.0","symbol-sdk":"^0.21.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"32843e4c52ba9a66fc7c7d71d51438d2b5effd2c","_id":"symbol-qr-library@0.13.0","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"evias.be","email":"greg@evias.be"},"dist":{"integrity":"sha512-NZSMo+bcH4hinZr40pIqxSbLsWA1dAFUdGXVw2eG1PUlmQldv3UM4Un5STsKLwRlzHMMoeyBoaKKk01C4qsJPw==","shasum":"1a9f3f635a7d15fc53f8171770f2dd8afd6be66f","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.0.tgz","fileCount":157,"unpackedSize":8565193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfczrUCRA9TVsSAnZWagAAn7oP/R2VIwJfENPgsEGC8eaK\nmlofdan5U9OJqYOLI8PTf608pJGzCJAX/A5ygEdazqQeNzwul2jwR9B6uCRm\nkdNQEnxvDfi9Daq2l0TddsXi0RPtO9NVBDCYUzYY2SsGx4ERdGuaVhCydwjP\nFuaPEvGMbwECvQFfMPkhtuybydbzGqigOy1B8m6Cn3YkAbbYdkvNq31fVk1z\nfwdBjHb6JKEYCUJRolZB51lW1yyjJ8l3lcxtvPxoJid7LBpIcyy9iHPzlXjB\nOgBiIujJWuhBrJ61YxZvki+hH/X0SK89J9NFHdMizJ1DG5RdQ9eoZK1Jl2wQ\nqFrwf8PgD9Vxa8Sai0DHjR1yTxb8FX63Z+IjYLm0QcR72iihwRIBXwo7A/uQ\nNvdJOpS3mobNzOvm6t+BjOAk6X8SCRUvMMuLY1Otuw6Co+7SVZmxnnDZ8VjI\nR3Xv1hXeG+Kp4Cmxzpj6dkp8ufxHjBJu0sakwrYYKb21m+PNNaYAcBVWX9TS\noJFvzmXeY6O0IMnWWmuuaecejf8F6VFVF7DPtfem27urcqtlimR+mLm1lULN\n72+5hHZMLnoQK34AnMJ+ju7RgPEtKHDp7ucdVBQHjfrDZXCWV3rTlnozPqhe\nSLuIcawC7MhJOgI3MrPFSI8/LMc81hrNtgLgyWlDc1cFgGZwEYBLlmsBWovM\nD0Hn\r\n=5R1E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNe7dNJxObD6Xs6MaHhyiqIrJJU8/q71axmMhdufxttAiEAlnW6DK1BYGkzQTpSefgzBuc3iJU0V3K7vrfOkdRdF7w="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.0_1601387219821_0.9661649041687745"},"_hasShrinkwrap":false},"0.13.1-alpha-202010221121":{"name":"symbol-qr-library","version":"0.13.1-alpha-202010221121","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4","symbol-hd-wallets":"0.13.0"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"a6975361df7c5875dabbe1942bb2fd17aa685c40","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library'; \nimport {Address, Deadline,Mosaic,NamespaceId,NetworkType,PlainMessage, TransferTransaction,UInt64} from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202010221121","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-3m6LgCTQGHdK82pJ+AlVbl4njzrPPoi01T198mBT/mXxtYM7dbFUsVK8VuHmvDTgNZB+ATOAkiWvMvwzeFqjYg==","shasum":"242ec797b1743774d492e6af0576afe2280cef95","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202010221121.tgz","fileCount":257,"unpackedSize":2007123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkWtGCRA9TVsSAnZWagAA7t4QAJN3NiY8yf4TIZkmu1jY\nWQOIXsM/LHRwQNpdckfn4M574safH5f43pelGpLicPIw/9Bd+SegmbOy0YtV\nxWHLGhWz+nZF+vKtbZ3J5qI3CVHRKBCubJCNfss1PfpaSJ7M0LxM+Iip/K10\nx7O/D3IU76qsuZKX02zNR4ijUpOUSumRHMo5o4AS/CaAyWfHZvxjJK6AXHQI\nc3Ua687uXb/cdU4HW+xXCrw90aaxkL5q27UQsnUQ6J+qEujEPoTUtDCkXt0q\n1nMqupAesyT4AVacNTdFXIPi+nHOUo3VPpvH9nLCwdyiOjuSqVsbOfKhSvVJ\nbvMu6CzdNrB/LvNBk0M6s7s5ZzkCB45tOK62ycpZY2il4Ew1d188HZGtO4gh\n+7QQ1RvZiOo6LNgXLDEVNH76PZBD5piV0lNdm/3B9ixrP/Ckq4M32vjqs4Ab\n1SIeXDrvFrXi16Oxy3g8GpKrZoqFRbTbaUGqaWfFxHdt9KJIpsgLKxZP1y9E\ncRzlNVcAZ4hUu3xOpYdOjSBTrjB8chpjwbikJXr4z12Jpdo2UOF7nO8vEKde\nWFnBVFUWtcuT2momElzRPiI4FmuOmr80z0NDfNFR7GhRRl8s/J5LSOAwxwp2\nVxXRyspwwyGZRt1vq3o+2qGaBQ0UaJPNPeUsGLGO/i+38/DqWSPiy47csHSw\n+dFu\r\n=ICHf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTclABcSoqYiIouq34lE7KbWpnOX2WdsL4yJ1B/JrpTgIgeS8QxkxZoHKiK91O7fBeVXgu779qqanySakFXCzTM2w="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202010221121_1603365702337_0.6726782151240427"},"_hasShrinkwrap":false},"0.13.1-alpha-202010221122":{"name":"symbol-qr-library","version":"0.13.1-alpha-202010221122","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4","symbol-hd-wallets":"0.13.0"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"e929e306f3963d2d36e7df597880897efff86fd4","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library'; \nimport {Address, Deadline,Mosaic,NamespaceId,NetworkType,PlainMessage, TransferTransaction,UInt64} from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202010221122","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-RX/w3XO7ZhAOvmXvRmPTxa/9YzTY8C7KxbBbnm/bLeqZ9vsPCSQ1tLM/MiQZmLW73pFUEA5UGp+XyIRejFrCCg==","shasum":"abd5b1efa8bcf0d53b7055c5dcc016b8b7504ca4","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202010221122.tgz","fileCount":257,"unpackedSize":2007123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkWt1CRA9TVsSAnZWagAAEBkP/jjOLh0nWOm7VBzD7Iaz\nqtrUqQ1EKgT1LUE2i/ZSAAwjJMZb7+2FTShGNc7uh5g6RGWH/2nmfzv/4G8J\nC5oPnyomi0+brQp6ffgzy7gainGlFQybvEtinRhPBjU5eRhsyQnnN6DHGsUe\ngyxiiRlWqIDiYblCfdC5zHlX03IZ9xArhzgDdOnXzJnatc94yB97QDfAjvPP\nQsE6pa1kE6WS+gQicrYAOVW8dNTAjP+IQ6CHLU/z7B8JP+QuE2/bqj7Aq4t0\nFTXD2r0kcQJCXPVM/zkuSulY+w0zZglnqUZlUAB+YRR9NsBkHb6c5rmOVjeJ\n1dNULTUQKKxRzyaVOekiDqusly/tks80fZZnpXHjQcOij8xJS0rjpfeAsxtS\nKB6rQl/+Ut4jynvfO6Q7+uZ5Bvs1mCD7XOOeGiw2/l+fX3IdYxx+YKrUr5nX\noo7vCaPy8goLmmMjzVfAzFxFySmr7jyZiXj6vK0ggg96SdnWDlkAxp5QTN0I\n4xJOKW/lsdfP0p9YO2IshqTJREp9saKm5D0Z4MOh+89xlCgrBMoUlb+AAVFD\n61PfgcPfpk5UkvprFtedAoc4y4AeDhYdG2bcE4y7PqVLoLSFE10Lc7dgSlOG\nqJYy7k2NYATpWIRS+P8L3im3sESo0JnsBR3jMJWwbaEnAJEq+AXEk2pRNmIX\nFQyc\r\n=MrJa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAbdD9OuSRuiaMmn3LHr6u8Bf/XT83dktkntK/OSaOdAIgM5cARoy+ayKqCdb73O0nyI8RfFwCo5P4pIqf/KhwTtM="}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202010221122_1603365748656_0.026463100401856954"},"_hasShrinkwrap":false},"0.13.1-alpha-202010231204":{"name":"symbol-qr-library","version":"0.13.1-alpha-202010231204","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"c434a220d1c6b5d09d9fa479cda5f73593681239","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **CreateAddContact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups.\n* **CustomObject**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library'; \nimport {Address, Deadline,Mosaic,NamespaceId,NetworkType,PlainMessage, TransferTransaction,UInt64} from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// create QR Code base64\nconst request = QRCodeGenerator.createTransactionRequest(transfer);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n```\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator } from 'symbol-qr-library';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// create QR Code base64\nconst request = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate ContactQR code\n\n```typescript\nimport {\n    PublicAccount,\n    NetworkType,\n} from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst account = PublicAccount.createFromPublicKey(\n                'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n                NetworkType.TEST_NET\n            );\n\n// create QR Code base64\n  const request = QRCodeGenerator.createAddContact(name, account);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = request.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport {\n    Account,\n    NetworkType,\n    Password,\n} from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// create QR Code base64\nconst exportMnemonic = new MnemonicQR(mnemonic, 'password', NetworkType.MIJIN_TEST, 'no-chain-id');\n\n// get base64 notation for <img> HTML attribute\nconst base64 = exportMnemonic.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202010231204","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6I+XZemGNNF7FdB6OQ3kar5AxZZg/vtQuGdwJKBb2cg43UkUBKPvidsphmjL8wbamk45xqJvPueycbuhy4R/8A==","shasum":"fb9f1a1254171157b841b2eea1d75f90bcefdc5a","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202010231204.tgz","fileCount":257,"unpackedSize":2004788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfksblCRA9TVsSAnZWagAAMtkP/2wZTrrAbwsqDOBDG5JK\ndXfvj0Xc+KxME175wrRfjLFgxDpeD6h+1WSiKgXp5L8jl+mHO/e+/QVhvkHH\nPDc082qBCwYEx/3EOWKkLHT0coPYU/IqoJI/0tCmKQd7v/yXP3CBWCbbeiCz\nwzcDWYqpnUxKTSSw+DY7VDF42vvKeWtoAYlgi0Wc/RS7D1/oKvjwFQt91WNY\nDOPuCTJeUsGZSp1oVAmyfLkNfL3ssUfO3U5mVGjS+grGvIGhNKVXU0EHRz+2\nGVUOgCvU960Xk9TCEZTgCLFfUIt9wAEpXCsCSP6wv8cquF0uHXFYhlniFgV0\n6lUFFJSpSWxdzrMRzU9/HGtKrZhIeYJYhXY5+ARrmKULc8ARP/1gx0zVcTJl\nRC1JhwEd0Ulgzn5YeNsHJb1sS7yWm1q+9sG4w9vfju2IThEsRWdvu5NJLYC5\nj+c/oZDqjubIXBcY+wItHqq3+bSLOP584AvFUuWhdVRg9ZWxzuZSZLr/CUa9\nyWKasR8Emt2bjoYfSuY2dvTphAOi9xO3Z+otjnJgzt1hRJh3AFq9r8jKrrrF\nAdPOA8hA0cM24SGErS7SVnr0myWKaEY9qS7SEPA9RbBgdEbNrpTziowVwpPj\nd7BUDUTLXM69Xds3OnbaydJtSkXCi776Uksvqlu16sDyzO9CVX3krJ26KBqU\nMxHa\r\n=69v+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVW7wCDt3uuyzPzZGceVGtM3Zqwi3gfGevGZl2Su//xgIhAOKHbdl9O7cJ+yi4vlPYUA0JbOF/ki0seOOJLBwT5yxP"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202010231204_1603454693369_0.9260368718859311"},"_hasShrinkwrap":false},"0.13.1-alpha-202010241730":{"name":"symbol-qr-library","version":"0.13.1-alpha-202010241730","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"e727828ecbeb2b20fa9cd777a925524a11a97a5b","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Contact**: QR to share the account address with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202010241730","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-/ehn2WaDgs4LOl7kJK5SNyTKtIRROCMyUvwfHoQJFZp+xsHkSJ3x0G/Sr6qLgR4ZXlc4BQccKLRUHc7e1hHJzA==","shasum":"af9badc7981883510bcb7567327401bf17466ff5","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202010241730.tgz","fileCount":257,"unpackedSize":2050777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflGS4CRA9TVsSAnZWagAAWLoQAIkTNuc9zZZRh8vxmXvm\nqyDIeLpUaxhmbQgu0APu5Ymhg3AvoyuyjIYpbgR6+fyvQIfm5SKQYyrRZvkB\npqObwSlgJ2CGNHk4pniakJ/+pDthKHC+CDYmgSt3AWdaZelSpNND7E2YlHh0\nKOFsaHQpw9QMq6nZCpkBspUSPm/y0p4IazGMgUBmPVI0rLjhIwVpLsdHPCa2\nziMfTjd+lLD6rHfEL8gosY2WB9t5RFO6RaiCcYl781E/ChbgBFWUP8BkfHLF\n3wwImi5bE2nlLks7STMRbQKTAA7NszL2stqrOCu2wRYTHi+wHvkk8pFiRKPo\nxTAkxb2bj4EcUDFccWwSMGGwFaEtj3qjHDBrMBDupYM9dqhiqNOAe9lIADCy\nrxgB0UQh3BW8HSad0hkjVnYMu6FN+JxAeLSljYEhhdv4/wH1zWwb5v14cOQo\noFx1+N1/q4olZrXOBxk3nbOn9WJjdFPzrjOO7d6oTmB2M6J01LZMeYebp3sy\nN8lMF4WlnguDK1HGa2PpeGVyVP8OuMhAbAJT/5dbAD60k10/SEv1I0CAjiJF\nV7npj2TH2eULGB0FiZmxNil0Lpn+K8asgadRWaccrihBAAOA+SnM6S0jqomw\nztVmxk5RacYsGQVoh5uRGDv3S67RmIrKG3lrGwKfRbWPDwqCHhCz3NjXt74V\neZQT\r\n=0/xF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUSD0cM+0nUE/xg3GWwhzTF5cLyrQGWmaVdlBs9Q46TgIhAI+ie5UFNWHZ4y5fNvYil6z9C8gQDIyranrPIF1GHubn"}]},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202010241730_1603560631436_0.26436676055281216"},"_hasShrinkwrap":false},"0.13.1-alpha-202011091256":{"name":"symbol-qr-library","version":"0.13.1-alpha-202011091256","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"1457e0bc8b043fda7544263508b66f3113aa7f65","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202011091256","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-ewcDHW3xukLjbBqU356cUmQTl83m2bghNIgVIYAhok/oaKMq9DX4EjoclJvZTFo15n74Vxso4zx4v0m0eC4hRA==","shasum":"d1507431ddcfb36b861b81127c68111f4072bbc1","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202011091256.tgz","fileCount":275,"unpackedSize":2213818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqTxwCRA9TVsSAnZWagAAuLcP/0I0ok4m4Koe/1C+CQy2\n3Jto9nWfTUzKySfpPg/Rf3qgcr1Oh4oGRd1CPOjhX4m+qbwt5lHuyU5qaMHy\nWsdaG8qbtp62j0/6ZTiN5KYiSwv+xxyOJw8r10QKP9NoI6XlxbVXpwYoo2pr\nw9Ht2vWhXB0bREkrbm9mCHwPqSo6vFvyd2xk5XJJskWHUg4W7sRa6Eh5OHjF\nynqFe7tEtft3aZ+KjiRQy4T6SGPUcGE6GDv/y77qit2buPXuqE1zMj9ktxAB\nIWvhiOTmAAUWdVHAriVBKFa6t4ttEqeH4BXhd8BcMXFM7TOuGGkaJn1B8qsQ\nEGaXPKK3kRZy2UPerUV/7396tmDlw88rahS+Kprop5865pQqha9qwwWCcHrv\nfC5dTMF9zKbWH2Ew53Vkzisf0BwnXvTqlfI7SkQVDJz00x3k68KHbplg54OE\nhZP7rwbulTNcYGI76pS1sJR48njGnNexH5CDljmWh6WBCWZkWAVHJA9l68Kf\nid21xZyNSy3Atx7e5CMqw/+ihZcnReC23xcT8ApxYR6xXh4CgdTgrEHDlGT3\n12zNRqVaytX1e9tkaOP0OJtC1zsSh6rAm4yu7KSmwPswzHqGxZdV6WQdMtfM\nk2in6xSH+eFyEwYKHkqjyQ7f3dWJ0pjGoQB4lzkXMnWRh4U6iBgjSvCIW4FO\nSN0P\r\n=+4cU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAE9Lu3ynpeiyTqHzlXYyAOxoAAk6ayrL5GP3GuOpl5mAiEAnU2jW3WCrJ+dapSmh4YNlP19E3/6MyQRZmB4oy7rgwI="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202011091256_1604926575794_0.7147876571740108"},"_hasShrinkwrap":false},"0.13.1-alpha-202011121108":{"name":"symbol-qr-library","version":"0.13.1-alpha-202011121108","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"68b68fa75d0c6b981298a664bcad5be9dbb8a474","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202011121108","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-uf1JLt8ex8qQ1pgD1CWUBuKwh+EJp2rkJFNycXtYOLEcwf5uO3zgu4ItzMxoI0r6Mz7kzjT4h+VPQckiDOPSdQ==","shasum":"978767f3e0a99b9240521ef4be6d8198c5624e12","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202011121108.tgz","fileCount":275,"unpackedSize":2213782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrReTCRA9TVsSAnZWagAAW24P/1GQdpOXGBF0Slaw2mUN\nivwA1UkMVVFvg8Cx4fEx1UBXWMZS3XyHrYt4OYvYZS7L2r8V39w0NI5Wb+PO\nSlvWmqXflKILalWc6BOKf1byBL+SRwEifKAkfBthcYR55NdKXgnpX6v0MvDZ\nmeQbYOky8/mIxo5LNoWsgayi654CPqNLDbBSeUBnvU4SBFuD4rRS/XMUxFk+\n/ty6WEt+DxOnuDheYg5qWPKspVtSjvs54z5qNCbmsIq8g+fywWo8J1iWPa6B\nDjQdJxZyQQ2UnyT01D95Lh89JTLqBbAtPvchCiCJ+Br+yOepvjyCJ21cecga\nXZncY/PqKhJiyV5UyivKdgQiRWGpgMgfgbvGgQFQwc4vTl5yZiyl3h8Iq3mp\neAVNdJmh+7ySBCeevqGpJERlj8u386UESwJueaJQsVxmrm5bDvPRzKNg1AFH\ni2GjSCr2/zbbfTD62yDqmK65HYV8hj+0aeLXFxO90k3uzWwkWyIkkeVRDavn\nHdI3cA6oPVo5LlgN1y98sYbjTICrGeRljh/FNDS+dQYN/6p1IWWlvCMlaYe6\nGDeOyA4F/o7F7FWMau6wzG6SEPJtt8tov5/4DXnDgatgmz5LVfj8Drgkq6TO\n+6nlCtxMRLsG+If0dmvFMKfAcrSaZkDbwHSFUPu4rZhlstE32NvJn1N6eNlS\nQeJ6\r\n=14XD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcD4Lbg0FOtApGsiRArx8f24jQo1vmwlEvFNPQcNoM1AiBF6BPhdNNbepkGyNVD2bRvPYSDGh4V4xXu0Gd3rsdZAg=="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202011121108_1605179282573_0.0970091033953624"},"_hasShrinkwrap":false},"0.13.1-alpha-202012151037":{"name":"symbol-qr-library","version":"0.13.1-alpha-202012151037","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"6382627ca5459cb13372548e43f0faa64f6c3b6a","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202012151037","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-HBn6wC4DGcIuK60jgYFH1oWSPXrUVO1QrtylU916InFFl4mTR+p9qAGujzI0mVyRY3HnWElI7HTYnUUqZ6FnQA==","shasum":"970851b1efc4c9c0689d6bade03a89bbd5bd3119","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202012151037.tgz","fileCount":275,"unpackedSize":2213782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2JHxCRA9TVsSAnZWagAAyM8P/ixBOxHRZbRRIQxWdS51\n4v9Wh8bi9FCQLPui9fLjcTDc0y0WJYLXbNLnzgjSo4q23l4ssFqp51niiSKe\nvamGcwtAzqhsPn4YgGsuA3YwkOU71DoFTDW9SwoKz78mGlzVnmttc2JENJMB\njHsz9nBroCzZaWQYA/MeVzeYn4ED3FnI9kpY4cN5zzweHSyRSCUlsl1QWNZz\nRx/UKN5GnWfahLJs/fNW3F8HgkF3cciA6HS+aZbS5EC0uDfXl135E7mhsgmV\nN2qSSU4C+BRK1divRut085mM2FvYEXU0AQsBmbS2PLyZhn6qqzSBviGsARrD\ngLKpSDX0GAXP5etdbxnI4f6I4JESkMfiBlMJZ5t+WsNU5/1Uytrg7x0VWucp\ndZgQA2fJDK1L4HU5zRXmP9hM38/Fb+f+oEiJxfn5YG+wCLPVBe5ZyneipdER\nMVf3BFyHwi3cjKqrgx3TIigBjBHdzh7nwWyR7dCbfotKhfiJ5J2ntLpQJPqo\n0yOpHhZt8mCTTv8cqipZZQ738RH3Fz8f+mcnxklmVH9mKMGdH57oGzf50Fmc\ne5d2Wc+warb82+ro8sQ9fShHgQ/t5NXhoG3zy1m489vx9E7qP949mouTgagd\nor7q/K8fQ30mk5gpM1GVgXPASQZsnlvLQ01/ghQkdiWUysSatfOKI4DBlriV\nCYPI\r\n=S6jc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpgQAY0Y0AG69hBHxcuJc+1Fl8A68YISN9/Sq8p0R3xAiAJzflclQaNrZ4qqZFSoA7RLNM5G3CcYUoHz0pkjZLHFQ=="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202012151037_1608028657430_0.11769233996579209"},"_hasShrinkwrap":false},"0.13.1-alpha-202012161038":{"name":"symbol-qr-library","version":"0.13.1-alpha-202012161038","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^5.2.0","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"c1311c4cf1c18ae8b458edd65967343d1de983b5","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202012161038","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-qUfRBqCMx+gkaOhwIc99OHGFVGtsq8vlnr51jng/BzIDdzAd7O8VuKjttKdQhXzI/UmnhQ3CQZ/g4HmQigo/lA==","shasum":"a681fadfdcc5457693ffb31a1ecde41abdbd22db","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202012161038.tgz","fileCount":275,"unpackedSize":2213782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2eOTCRA9TVsSAnZWagAA3A4QAIOfpcLkupvVQbWFYWhw\n+haHUOh2kyLHBTLQiyMG2fLDl6WjGuHlT66TYIiFJ2HqjTP/K7KinzNFjYGq\nUHpRaSMXUfHVM3yCmsXq1g8BEa8OmV7UTSdmMH/0mNvKypAJZbTaGD7D5aXM\nJpcfPq5Ua5/p/5iQbSEMLmuLvEKMuhZFTKD6tjwToldmPvNkOV+ios9o8Vd/\nUpBkWkEQKNJz+fhFICB7M3gfqo8xULHdUeKx9S9AGaQLTM81Uscbh1kwIC+5\nBDg8tQGyo1lpjgAN8IUXy/XAUrxCHAuipUWJnCwon+DTdoEe4ijAefhs/kWS\n0x1S4IoK/bVLjoM2qHXzZ+bOunrM1LGvpCMwbmsx0ULUCNtR24q+EhxXerxB\nW2wPyRstQB6U/Sq+EM0UNVb8akTCp5JPzyc+yX+dQT18vaZ3jIm4Vejyyz3l\n8IFKkkbO1V61jlkrwnhQFGVopg7CfM4xeg+qJ2O0eE2G+MTIETE7aO/u+o9N\nPftjBqqgprhiGNg1XzDYPxhgxoIvjviRr+K3k1dgmTnp07qzob9QJPnqlcZQ\nli4CeLELgZ65xBOFIYI/31LFKq8OpQScYdzUvrKsZw/5b41j09A8AoeK9xLY\nF/60TJeZXFkkYB2l6Fql5FcXEKC+7PBldFkfnHa2fY+GtxSYQONq9M/A5w7m\nRaQF\r\n=ZB1P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8EQ3m0S4lGWHxx7ZHKrhfVhI3cGJx/RGWhaAdFfh3vAIgPj0B9JQVaHw0tdWJyL9Lteyjl8IxK1ue629vVECefYU="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202012161038_1608115090649_0.6778347050466735"},"_hasShrinkwrap":false},"0.13.1-alpha-202012220953":{"name":"symbol-qr-library","version":"0.13.1-alpha-202012220953","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^8.2.1","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"e244526fadcf74932758c646102fd764f048710d","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.13.1-alpha-202012220953","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-76f23EZUKOUH7EdY183uIefoTN4fCq00cNVdvrKHIo73i1W0QPwL5xQt4ygd9RGYoip/st6Zc0AlkW1+ymS0Eg==","shasum":"7452a25db31729143a4948808123c4cb26fa13da","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.13.1-alpha-202012220953.tgz","fileCount":180,"unpackedSize":482796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4cH+CRA9TVsSAnZWagAAlaoP/AzImzGwqJNn4DP6YhG+\nmFf0QbKG14qfl1mmdzJ9g89t77hHwRg4GoxwLMujUl5T3VamtpjVNj+/6Wrw\nC38OH4Zt2H8s0CJuxqtRgiasbqKm4bc9i0Vghl9OSr7ckicipSdr8Ce5uWq9\n48PomG5doww1R0j5/DiNmHsKr+lpdaadyK7ZT0bWaFxZ8EIiFHq5GRiETg2p\nHHMOgAe6bkbjIyPPla2mvYMePjVrjJqdfQ3WjWOY/6AEKliWij+T0rbVQ2Sz\ny/4u+pQzFBOKzEylXj27a/H7X4uffaS52W+kFj1hS7hUksAUQc+G6a9WS6qE\nOOIaY6vIg5L6WfQpOpBBtVMx01zj3DCDpOECHaVHCCNp8+yX6Wkp0Bzv/jZa\nnqGuPW57SUcCZTw0xvuEXEtEi5mZw5lSftO/v0RC/oiTKRiWm58w1yNeGJ0X\nD1b3TrwMkglfEh0m4viWqOXY5SdbFG22YyfDIBVYKQfCQFGJhFegfA+iJTx3\njhu13BxO/A8/JxEktm3AIxIKyVORRCAvcECLXqJ4FoiOev5kmwKs309CcAVH\nL4GbkDOTZDmLTk6Ec5b0t/pYgD0XQk5SU+ViC8rTvi4h8P/lr4xnOR/w3El2\ngXAO/FGLZoekcmNRhmPKfiRH2WsiHPuESsLotQi26ReyU39OrWIlTNwZZPc+\nlyIL\r\n=7FVc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyy7z+pbZoJnob1gUOWIMgdIvrbGcaP4UyYOevchOWLgIhAJ2SLxEPaqT2IOTIwUu+4B1jGXeYBp6+7dyTotRvmq6O"}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.13.1-alpha-202012220953_1608630781569_0.4535138463240458"},"_hasShrinkwrap":false},"0.14.0":{"name":"symbol-qr-library","version":"0.14.0","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^8.2.1","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"6a7e32d43bf4888a0f0794b95a31d048740ffc09","_id":"symbol-qr-library@0.14.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-X7aDJGQfyya7W1WkK8I0iFLEAVC+U50j61ZzQ4/CkhahHHE0CA3okbBvqYT8q55iowm/R/1oZlyuPDYTjAl0uA==","shasum":"0530b6b576fc9a47824ad56b93e51aa1d0674aa0","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.0.tgz","fileCount":180,"unpackedSize":482787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4cgoCRA9TVsSAnZWagAALE8P/0Xf4hQ8VQUIGNhHa/O2\ntov5ucn6V9CIlHp+EPeIK7J/k7VPS7Pftuz0F5VtxVq3Ao6iFMDThtbcfHTE\nYY2MMwFTKNG8mcXLMmRKg+pVvOY5e+KtW/QjbKcYADwLUo60s8YVQb/3UuaA\nr325y543ifh6oyvuQAJaDDj6KF3OQP/7nfQ0F12IENT8NnYn6iTvWgHH/Whx\nIrdg3WX53jUCjZpWuGPMMrsqdr56VgcwbjvTzKkOC+ePSf28dZUSrObsWNmM\n3waPJ0vQ4KeTrxP0AGgGBOcuGRkIFfGoiyuJv95qDhKHhTZB+MFntMTW/5TE\n8twZGnSCMSltnRQvD83+UDmsc92p1I3Tb1ZqkSLh3BphwQ+UoHUhk2Damrrh\n3JiVwnD72RJZHWQc0zcPF32loe8QDc4fnAo6ymAeoaVpUmdXHr9Y9IDu15b3\nuXe9EYPKoEq8bvdQq3QIMwCij0P7nFOqqaLRl8OVgFuAPbIWi4VvFyHnkjq1\ndv/Ogc8s7o5kFYsskSG0npxuU7gaQB8tseaVAPS4HBBKpy7MhYtboODGljNA\nfpPxfGKryurp7JNpigPvTepQUegq5xKJ1FOk8YD05DjuVBg1z8Bz89Om4418\niM36QUvlVjq7x6px78V56fmmdzCjP4ETC80GFmAvr2B00f1BHqG6i1rBYXB3\nRbBL\r\n=YqDL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDq6qEZYKwXEZRB5kZfP363dUbGO+XALsx+hPfz6fJloAIgdm0dbOACm0QC6A1Hs2o2X6dq6V8faUCdoKFRQQfNf9w="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.0_1608632359923_0.5524247764315848"},"_hasShrinkwrap":false},"0.14.1-alpha-202012221024":{"name":"symbol-qr-library","version":"0.14.1-alpha-202012221024","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^8.2.1","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"5f748d82d18d4639b31580eda1b4a2c645335d2f","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.14.1-alpha-202012221024","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-XL9waKWwtBeTJgYmqsJF11UOoyr70nMzpIZS4DW/XuLW2s70IbxvSk5qSFmHJ0q3Hf/mgr4P0PFafcAM83g6fw==","shasum":"646b3106650e2c78d4d7cb22d3e749630164796d","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.1-alpha-202012221024.tgz","fileCount":180,"unpackedSize":482806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4clcCRA9TVsSAnZWagAAhxIP/1T7cUkms/A8By5qPKZJ\n22qfx3AlVm5GGMTUilZOG8LYxBd7z8vEf3XyD/jtkk1VgTNdzV6pmq4Lxw/z\nhftefYs5cLEwiay//g2R0yj0/bkoSdhScpW8pwDUhBFAACpdaYsAE/N3gu/0\nM32gt11Vy9eQ4XmJWi3vywzMNzSodZqn0oJ8MJE2ivlx/IVhIkQtYbT5y/3N\nagNzpxqOw2MUK6EYyDgns60We1TMH8dpTg2VVwYclrtNKAFoGWfzV8wQLvyp\nxersrTQbnGfQ57zBv4vZk5FaNCE9b4Ii/kDaMzh/0JjA8eEsNAJL2rQ0gJir\nPMYbr8oNkX9bjq/v9FRkWXOv5HMQF8J8T/6qYO56iG6hQwpbuUp9+1ErbFr+\nWzpSwgAPYA3bC8KJBOvHrmsvLLLvQhcHRk2KMAdnRNEXeYXnElxwUvgqbkOB\nAhq3QpuWVf9u+kuyhWPI/gstU07UUkfBPCOV7tomfST68J1kJ6RSzsF+VVJu\nD2LA6TUqoQTCgBFQqUKrpSFI0Mb3LWn+8AOTtdmiZwL/frEMEJqqJKS/xBHl\nd4g1Yoimq4eBWi1e9Bn0q/O6W+uS9QM8h1IR2b/0eKzpBnpqAEu549oIcnU3\neQLTKPnuUsbvoeoq7r8Q5KBqa7xbqFwY6UGM7Ux1GbH9cP0fPnECG6Jt9MY2\n3Wi5\r\n=Srqd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICk4Un7eDShx8R+ckNSgN6kuB3WLu9E5WYZpnEOdepk5AiEA35F1fi44ECAk83Ni6G462bA0OIoyrnxu+xpw/oD97P0="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.1-alpha-202012221024_1608632668264_0.11521949732961789"},"_hasShrinkwrap":false},"0.14.1-alpha-202103081047":{"name":"symbol-qr-library","version":"0.14.1-alpha-202103081047","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.6.1","crypto-js":"^3.3.0","open":"^7.0.2","qrcode":"^1.4.4"},"devDependencies":{"@types/chai":"^4.2.9","@types/mocha":"^5.2.7","@types/node":"^12.12.28","@types/qrcode":"^1.3.4","async":"^3.1.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-plugin-add-module-exports":"^1.0.2","babel-preset-es2015":"^6.24.1","browserify":"^16.5.0","bufferutil":"4.0.1","chai":"^4.1.2","copyfiles":"^2.2.0","coveralls":"^3.0.9","mocha":"^8.2.1","nyc":"^15.0.1","rxjs":"^6.5.4","symbol-hd-wallets":"^0.13.0","symbol-sdk":"^0.21.0","ts-loader":"^6.2.1","ts-node":"^7.0.0","tslint":"^6.0.0","typedoc":"^0.15.0","typemoq":"^2.1.0","typescript":"^3.8.3","uglifyify":"^5.0.2","utf-8-validate":"^5.0.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"1a5cd88e7064a0bbb6522cbbe8aef7df7a0d578d","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/nemtech/symbol-qr-library.svg?branch=main)](https://travis-ci.com/nemtech/symbol-qr-library)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-green.svg)](https://nem2.slack.com/messages/CB0UU89GS//)\n\nLibrary to generate QR codes for Symbol.\n\nThis is a PoC to validate the proposed [NIP 7 QR Library Standard Definition](https://github.com/nemtech/NIP/issues/3). When stable, the repository will be moved to the [nemtech](https://github.com/nemtech) organization.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.MIJIN_TEST\n  ),\n  [new Mosaic(new NamespaceId('cat.currency'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to NEM!'),\n  NetworkType.MIJIN_TEST\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.MIJIN_TEST, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.MIJIN_TEST, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.MIJIN_TEST, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [slack group (#sig-client)][slack] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\nCopyright 2019-present NEM\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/nemtech/symbol-qr-library\n[docs]: https://nemtech.github.io\n[issues]: https://github.com/nemtech/symbol-qr-library/issues\n[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.14.1-alpha-202103081047","_nodeVersion":"12.21.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-pxKw30XP1cYaCH5r0VIsHp0GDJDURFFs7Uvl3bR1lyUJgNN16mp4AhiDt5HogXeaZJvb/7+bNVHRJa4RGFpsJg==","shasum":"854c5c2fe04efba37a27525a16d5b7f732b507ab","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.1-alpha-202103081047.tgz","fileCount":208,"unpackedSize":560324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRgDSCRA9TVsSAnZWagAAZiEQAIU1tYRelsGKGYA51btM\nB4tWPycoKyEN7QuHdec2M2IePATSiQJA5RIbBfgpNwh0Drc0ngIrhYCvd4Wt\nMWpar7lxwExH+6was/CwkeHM4KxDarwAFY3/FDohKGuarX0dWNcAOjR68THH\nFPGIG2SzjTULZoEawpmFXK9ZMFVz1iN48lHlbN1VJH5yUuDRJFm7WGOnrVoT\nEb7uewsng/GjXgXLTK9XgWpgYh6+/rrktlfwxkVHl2yespEGTsoNRPpkVjOl\nkeWmWmYmg/wdwc9bPfWAxE/TzHGwlJxoPofRiIgydWc02GSQunKbW1/GfNxL\n7+jSCPmRsfQ4VJOLDOuQn0p2MLlBOs5Q1jld9ZnBLPHWWFCqibS/2XXPYcdP\nQFsf2OxfntYWUe07pO1fLL0ewyE8xiFmOGjA7Wq2YZhdpMQ0J273dGMT6Ck9\nP6BRwK0dcbwSWxJ3yWL41/HKkFyfnvrKfGbr6w6CM0U3fdLaH+J/tg0dBN+u\nPxCIU/YoLqfVn+cnm1QJ501cNhe8r0dJ9fg2HejJgLtZB7xGLillKp00cOGf\nCsR6MsA4W/Mu0kQuErmZtSD4NO43jt0vCYJuVr3MABej67GAAaxt0F/Mbyq1\nSXXb3iK3G/Dd34lWwDiiBtOPnmTR8kehtdsyT69U8SyLZucloPm1qNRz1Gy8\nYWys\r\n=v5vO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGyQZj8LGbldCcA8i4uWL9j91mqPzTOo1M9w2u9zyL8AiEA2gmcObZ7TaNjTR1jaG09n/HR72MY2oZEcB3/JJdukGA="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.1-alpha-202103081047_1615200466170_0.5257599236598671"},"_hasShrinkwrap":false},"0.14.2-alpha-202201041116":{"name":"symbol-qr-library","version":"0.14.2-alpha-202201041116","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.8.0","crypto-js":"^4.1.1","open":"^8.4.0","qrcode":"^1.5.0"},"devDependencies":{"@types/chai":"^4.3.0","@types/mocha":"^9.0.0","@types/node":"^17.0.5","@types/qrcode":"^1.4.2","async":"^3.2.2","babel-core":"^6.26.3","babel-loader":"^8.2.3","babel-plugin-add-module-exports":"^1.0.4","babel-preset-es2015":"^6.24.1","browserify":"^17.0.0","bufferutil":"4.0.5","chai":"^4.3.4","copyfiles":"^2.4.1","coveralls":"^3.1.1","mocha":"^9.1.3","nyc":"^15.1.0","rxjs":"^7.5.1","symbol-hd-wallets":"^0.14.2","symbol-sdk":"^1.0.3","ts-loader":"^9.2.6","ts-node":"^10.4.0","tslint":"^6.1.3","typedoc":"^0.22.10","typemoq":"^2.1.0","typescript":"^4.5.4","uglifyify":"^5.0.2","utf-8-validate":"^5.0.7","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --entryPointStrategy expand --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"ccbc70dc52b2f2d123ef6641511c58cee166394d","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/symbol/symbol-qr-library.svg?branch=main)](https://travis-ci.com/symbol/symbol-qr-library.svg?branch=main)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-green.svg)](https://discord.com/invite/xymcity)\n\n\nLibrary to generate QR codes for Symbol.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.TEST_NET\n  ),\n  [new Mosaic(new NamespaceId('symbol.xym'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to Symbol!'),\n  NetworkType.TEST_NET\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.TEST_NET, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.TEST_NET, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.TEST_NET, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.TEST_NET, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [discord][discord] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\n(C) Symbol Contributors 2022\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/symbol/symbol-qr-library\n[docs]: https://docs.symbolplatform.com/\n[issues]: https://github.com/symbol/symbol-qr-library/issues\n[discord]: https://discord.com/invite/xymcity\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.14.2-alpha-202201041116","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"integrity":"sha512-EMzbvlAwGaqjhiL2AX4tnqcoMB+zrfCCw764yUoH/AlgjBjxp9gDvEUvewJsXEptTKxJevttSNqF93rO/TYSZg==","shasum":"5fdbb3a733e85d7ea36041ee0a53f70bdbf26fa3","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.2-alpha-202201041116.tgz","fileCount":209,"unpackedSize":3602586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1Cx5CRA9TVsSAnZWagAA9/gP/ilMIjfjzWCerNEiTZe7\nU02ERqwP8JBV7OJOtJwRmIjO3H70afxuWvJgOfo+JaieI6WTaUphp4Zw6DXm\nYotmKXikdzAW4iG5/KbfruM6Yp9gZZuchol++pkfvCwf6LJ9Ly3xY2pRIhGj\nZe0geV0YprFxCgESU7id4PSwiKoRg3mH1UVFmEkY4TpjhnqVoi4EulhUrJyl\nUX5fozGA6b3eEx+uOgtrjEYYJxXFXqfzoDUTdipHPaCg628KEdyiA/1AuvvI\nVN9caYCBwkZQO3XPzf4ixlxXpY1TbppO3b/8rFgqqMb2fBiDLE6nmPQklNnA\nDOpBvcTm/cM5Uz9JPFOd7RAhtrkigaGVt9aVEraHVQDlTyr8a5ZaR2EivnvI\nwfkmtd7V+v43Sbu9kVjXkKwXA8w1OenWIIvbpNH+NxNzjsOaSxdAAEYs6qy/\n4WchPYgB30hlMdw8vUt4nVKVWTCaH5z2IQHxGrqZupXJva9pQegQtFwTahkm\nNsb71+/I1EWO34Vhy5QUecTDNkDP2j9pe/6F9ZTjwJe4jvbYqxsC6fNEv2sg\nRzkN+rXjBHg3BPv8afAea4b++EBKLGDFoBXjLTejSP3tHHTlhdxRU1XwV9/d\ny8i0zHjhFLX7LKG+MO2F9sZKwt+kf91TSGFJo72r90Rb0Ka5VNe4OjOSx9iZ\nOr3p\r\n=C4xZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsFRWiradPE5+jI4qNJNwUQqacEWXUrDgZiDlpeI6JiwIhANXJaM1xEfEGGKGLden7dlx6KCP0LL13u1zrEZv6er4R"}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.2-alpha-202201041116_1641294968959_0.6225741433804723"},"_hasShrinkwrap":false},"0.14.2":{"name":"symbol-qr-library","version":"0.14.2","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.8.0","crypto-js":"^4.1.1","open":"^8.4.0","qrcode":"^1.5.0"},"devDependencies":{"@types/chai":"^4.3.0","@types/mocha":"^9.0.0","@types/node":"^17.0.5","@types/qrcode":"^1.4.2","async":"^3.2.2","babel-core":"^6.26.3","babel-loader":"^8.2.3","babel-plugin-add-module-exports":"^1.0.4","babel-preset-es2015":"^6.24.1","browserify":"^17.0.0","bufferutil":"4.0.5","chai":"^4.3.4","copyfiles":"^2.4.1","coveralls":"^3.1.1","mocha":"^9.1.3","nyc":"^15.1.0","rxjs":"^7.5.1","symbol-hd-wallets":"^0.14.2","symbol-sdk":"^1.0.3","ts-loader":"^9.2.6","ts-node":"^10.4.0","tslint":"^6.1.3","typedoc":"^0.22.10","typemoq":"^2.1.0","typescript":"^4.5.4","uglifyify":"^5.0.2","utf-8-validate":"^5.0.7","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --entryPointStrategy expand --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"ccbc70dc52b2f2d123ef6641511c58cee166394d","_id":"symbol-qr-library@0.14.2","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"integrity":"sha512-+U6oUyD9/cbjyJZl3ldVDe2lL+iFB6842NbA8+/mUiym34kEETuTgfdjgW0eqUMhyqKIDY7Q6Qb9QqDDZiX3Lw==","shasum":"71ac195ae930620fac5294690c79e2526051b06e","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.2.tgz","fileCount":209,"unpackedSize":3602567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1DCECRA9TVsSAnZWagAAWjUP/jpOK7/OeDL5Ox1eT2+W\nqkxsEYqRUaKI4bk51qiGSsko9OY4TrJ0plQ5kYgO5zU3m4mxPaHiq9x6BiGH\neZ/KGJAdLXuejDn3+vZFCu2D6KhoCICrzI800FVYuzW4dObz691gCbqMeDFW\nt+nEbpD8LiJlcQgCWVvDFws5gvgXdVdTRl2vIh9xDMh2GOFgWDq8g+hrsUxo\nP7oitz8pGlsqkepV2Iwi7DVxHt9GHfPfG8rVScLe6GcQRVjuxDgSrUrZJ8GX\nWIAhNBQBb3o/3Mtzbz2IEx8OBfxsDEECakonLQp94WSQuBTjb3w7tdnV+up8\n1HhbiNsdaDXQ1BwiG4sQfGaCJrRlqSmXM0N6a09LRRWoZBXg8L7TFkNjhWva\nj5g8Tg87vYvSz3f+x7DtGhIurSzw8qhA3SmUSaxpVlq5l++HZK4y1lENzajt\nT+tbD6x71CwufzZCkIztN8h8q7w3/FoSFSuGdws7xzUrCCR9e4At1siDGR1Z\ntpPYchBvEN+jkYIyCJ2HyGkpp2defU++QEz1P1R6x2GUqCfPpP3bwhsz9hFU\nC8/YuC2ObOVF0L7NAXfBXNO4yS3mWxpLjwLGGN3W3LeHEnO+ISVYa4X5hb9v\niQr4aw/LUssPYG7Z4lpoNhZVwwcfvdVxkhxX+8cugxXtcS5Y+50Rh3ZGVr1A\nwno1\r\n=M51N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUASBO732Kvc7tB8JaVTTK0izjo63EOGmBNV1+oUsYIAiEAr7aWWQdrZwefezNfygV9e3p+PXIRWU/6CCeYIVPEY8E="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.2_1641296004185_0.1582454548183878"},"_hasShrinkwrap":false},"0.14.3-alpha-202201041139":{"name":"symbol-qr-library","version":"0.14.3-alpha-202201041139","description":"Symbol library to handle QR Codes","main":"dist/index.js","typings":"dist/index.d.ts","directories":{"test":"test"},"dependencies":{"braces":">=2.3.1","canvas":"^2.8.0","crypto-js":"^4.1.1","open":"^8.4.0","qrcode":"^1.5.0"},"devDependencies":{"@types/chai":"^4.3.0","@types/mocha":"^9.0.0","@types/node":"^17.0.5","@types/qrcode":"^1.4.2","async":"^3.2.2","babel-core":"^6.26.3","babel-loader":"^8.2.3","babel-plugin-add-module-exports":"^1.0.4","babel-preset-es2015":"^6.24.1","browserify":"^17.0.0","bufferutil":"4.0.5","chai":"^4.3.4","copyfiles":"^2.4.1","coveralls":"^3.1.1","mocha":"^9.1.3","nyc":"^15.1.0","rxjs":"^7.5.1","symbol-hd-wallets":"^0.14.2","symbol-sdk":"^1.0.3","ts-loader":"^9.2.6","ts-node":"^10.4.0","tslint":"^6.1.3","typedoc":"^0.22.10","typemoq":"^2.1.0","typescript":"^4.5.4","uglifyify":"^5.0.2","utf-8-validate":"^5.0.7","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"scripts":{"pretest":"npm run build","build":"rm -rf dist/ && tsc","build:browser":"npm run build && webpack","lint:all":"tslint --project .","test":"mocha --ui bdd --recursive ./dist/test","test:cov":"nyc --reporter=lcov --reporter=text-summary npm t","test:coveralls":"npm run test:cov | coveralls","coveralls-report":"cat ./coverage/lcov.info | coveralls","version":"echo $npm_package_version","doc":"typedoc --entryPointStrategy expand --out \"ts-docs/$(npm run version --silent)\" src"},"repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"homepage":"https://github.com/nemtech/symbol-qr-library#readme","nyc":{"exclude":["**/*.spec.js"]},"gitHead":"6141b7778976dca42119cc81947c33505f47d66d","readme":"# Symbol QR Library\n\n[![npm version](https://badge.fury.io/js/symbol-qr-library.svg)](https://badge.fury.io/js/symbol-qr-library)\n[![Build Status](https://travis-ci.com/symbol/symbol-qr-library.svg?branch=main)](https://travis-ci.com/symbol/symbol-qr-library.svg?branch=main)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-green.svg)](https://discord.com/invite/xymcity)\n\n\nLibrary to generate QR codes for Symbol.\n\n**NOTE**: The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.\n\n## Features\n\nThe software allows you to create the following QR types:\n\n* **TransactionRequest**: QR to prepare transactions ready to be signed.\n* **Address**: QR to share the account address with others.\n* **Contact**: QR to share the account address and public key with others.\n* **Mnemonic**: QR to generate account mnemonic backups (encrypted | plain).\n* **Account**: QR to generate account private key backups (encrypted | plain).\n* **Object**: QR to export  a custom object.\n\n## Requirements\n\n- Node.js 12 LTS\n\n## Installation\n\n`npm install symbol-qr-library`\n\n\n## Usage\n\n### Generate QRCode for a Transaction Request\n\n```typescript\nimport { QRCodeGenerator, TransactionQR } from 'symbol-qr-library';\nimport { Address, Deadline, Mosaic, NamespaceId, NetworkType, PlainMessage, TransferTransaction, UInt64 } from \"symbol-sdk\";\n\n// (Optional) create transfer transaction (or read from network)\nconst transfer = TransferTransaction.create(\n  Deadline.create(),\n  Address.createFromPublicKey(\n    'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268',\n    NetworkType.TEST_NET\n  ),\n  [new Mosaic(new NamespaceId('symbol.xym'), UInt64.fromUint(10000000))],\n  PlainMessage.create('Welcome to Symbol!'),\n  NetworkType.TEST_NET\n);\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: TransactionQR = QRCodeGenerator.createTransactionRequest(transfer, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate AddressQR code\n\n```typescript\nimport { QRCodeGenerator, AddressQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-address-1';\nconst contactAddress = 'TA6QZTYPOIYQYR5NRY4WQ2WRQUX2FN5UK2DO6DI'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: AddressQR = QRCodeGenerator.createExportAddress(name, contactAddress, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n### Generate ContactQR code\n\n```typescript\nimport { QRCodeGenerator, ContactQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst name = 'test-contact-1';\nconst accountPublicKey = 'C5C55181284607954E56CD46DE85F4F3EF4CC713CC2B95000FA741998558D268'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ContactQR = QRCodeGenerator.createAddContact(name, accountPublicKey, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n\n```\n\n### Generate QRCode for a Mnemonic data\n\n```typescript\nimport { QRCodeGenerator, MnemonicQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\nimport { MnemonicPassPhrase } from 'symbol-hd-wallets';\n\n// create a mnemonic and password.\nconst mnemonic = MnemonicPassPhrase.createRandom();\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.TEST_NET, generationHash, 'password');\n// or\nconst plainMnemonicQR: MnemonicQR = new MnemonicQR(mnemonic.plain, NetworkType.TEST_NET, generationHash); // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedMnemonicQR.toBase64();\n\n```\n\nThe produced Base64 encoded payload can be used to display the QR Code. An example of display can be done easily with HTML, as follows:\n\n```html\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\" alt=\"Transfer Transaction QR code\" />\n```\n\n### Generate QRCode for an Account Private Key\n\n```typescript\nimport { QRCodeGenerator, AccountQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\nconst accountPrivateKey = 'F97AE23C2A28ECEDE6F8D6C447C0A10B55C92DDE9316CCD36C3177B073906978'\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst encryptedAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.TEST_NET, generationHash, 'password')\nconst plainAccountQR: AccountQR = QRCodeGenerator.createExportAccount(accountPrivateKey, NetworkType.TEST_NET, generationHash) // no password\n\n// get base64 notation for <img> HTML attribute\nconst base64 = encryptedAccountQR.toBase64();\n```\n\n\n### Generate QRCode for a custom object\n\n```typescript\nimport { QRCodeGenerator, ObjectQR } from 'symbol-qr-library';\nimport { NetworkType } from 'symbol-sdk';\n\n// define custom object to suit your application use case.\nconst object = {\"obj\": \"test\"};\n\n// generation hash of the connected network\nconst generationHash = 'ACECD90E7B248E012803228ADB4424F0D966D24149B72E58987D2BF2F2AF03C4'\n\n// create QR Code base64\nconst qrCode: ObjectQR = QRCodeGenerator.createExportObject(object, NetworkType.TEST_NET, generationHash);\n\n// get base64 notation for <img> HTML attribute\nconst base64 = qrCode.toBase64();\n```\n\n## Getting help\n\nUse the following available resources to get help:\n\n- [Symbol Documentation][docs]\n- Join the community [discord][discord] \n- If you found a bug, [open a new issue][issues]\n\n## Contributing\n\nContributions are welcome and appreciated. \nCheck [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.\n\n## License\n\n(C) Symbol Contributors 2022\n\nLicensed under the [Apache License 2.0](LICENSE)\n\n[self]: https://github.com/symbol/symbol-qr-library\n[docs]: https://docs.symbolplatform.com/\n[issues]: https://github.com/symbol/symbol-qr-library/issues\n[discord]: https://discord.com/invite/xymcity\n","readmeFilename":"README.md","_id":"symbol-qr-library@0.14.3-alpha-202201041139","_nodeVersion":"12.22.8","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jd8oZJVzoO6UOKJGrjl4ZiH8kn7DEqo/ZeCLbQyJZvb8mOuQxTeNQsfO0exK9IEsSCV0jv0s4IAMG2T+SfpuRQ==","shasum":"1cef75db970db3a79154edbf41d86e4c36b5972c","tarball":"https://registry.npmjs.org/symbol-qr-library/-/symbol-qr-library-0.14.3-alpha-202201041139.tgz","fileCount":209,"unpackedSize":3602586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1DHeCRA9TVsSAnZWagAASbQP/2Xe5WM7uJJcB8z2rkmN\nxX2ZCCE/8BR0mxk/iSceTi4YUjyLpRWqBZ7U6qV67TSUqiSKDcTXbHhRfIjG\nli0h0fQMcwvq8KVtIltCkiKwfQ5ZK+wQzDMOVN3rl0UpxfMBqUjEwbLeBG6y\nHCpomc9YjhPLzlXsFGpN8hp/s3mYBOT5i4s1hQBfW0quWmIbgXHWXQy2Kkpa\ncqONYglYPAnxsZTwkQ28qs6hwpRCkVVoxsx5BoC8Etnzkb3oY/B4m2xznXuN\nPJENynW8g97ekcv2NEhcJBFMtb4SPFNbn3fJtuP6AQaHTX47p9rN9yiY1TSM\nM+7UIBNYMc6OiesLWmDc4PQFYA8X6WJrpAx4L4+uaeNnYn4MydO8oahEv211\nX4K09w5/E9cmA+9PClKvJbhA5KnO5NrW/nYwet0ohuAaVj27UQ/X3g1sJT7V\ncYimyPQtbTi7mBg7cFzY65qF0PWaOYISrpcfKnMy11dfEtQYqbor6P6htV2y\nHWutpFldel9dx815ugKoLIhzOwHiqGgRxT4xQQo9yiXrMngKlSUuw2Gz8t0w\n8Gurc9NH1hoAXW6XfWNh3Dxep7pSNejAy/xt8OgbKeIgT0JpUtXQ3rqreHmA\n4lokixvTNBzg+9vZDrR8ex+aulqt0b6l0vmN011gy4hzrZ7uZbduXIONyNj+\nMI72\r\n=9Ur7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMhGi2tBPRg6F1NRofkKhons7aGOp2gDdgfE4gXMJMzAiAIVFYA/eEOuGuvmuEw5RyTr30DkcOizDFHfoZGZ5hFVw=="}]},"_npmUser":{"name":"nemfoundation","email":"system@nem.software"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/symbol-qr-library_0.14.3-alpha-202201041139_1641296349957_0.11940215006499955"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-03T16:20:13.322Z","0.9.0":"2020-03-03T16:20:13.623Z","modified":"2022-05-19T05:57:05.984Z","0.9.1-alpha-202004161009":"2020-04-16T10:09:44.726Z","0.9.1-alpha-202004161309":"2020-04-16T13:09:47.610Z","0.9.1":"2020-04-16T14:01:08.114Z","0.9.2-alpha-202004161420":"2020-04-16T14:20:27.994Z","0.10.0-alpha-202004271705":"2020-04-27T17:05:22.879Z","0.10.0":"2020-04-27T17:05:36.919Z","0.10.1-alpha-202004271707":"2020-04-27T17:07:49.397Z","0.11.0-alpha-202005251421":"2020-05-25T14:21:49.862Z","0.11.0":"2020-05-25T14:25:37.341Z","0.11.1-alpha-202005251427":"2020-05-25T14:27:40.988Z","0.11.1-alpha-202007132144":"2020-07-13T21:44:43.976Z","0.11.1":"2020-07-13T21:46:17.040Z","0.11.2-alpha-202007132148":"2020-07-13T21:48:23.570Z","0.12.0-alpha-202007132152":"2020-07-13T21:52:18.604Z","0.12.0":"2020-07-13T21:52:31.747Z","0.12.1-alpha-202007132154":"2020-07-13T21:54:38.422Z","0.12.1-alpha-202007281456":"2020-07-28T14:56:49.126Z","0.12.1":"2020-09-24T23:37:40.356Z","0.12.1-alpha-202009291327":"2020-09-29T13:27:35.437Z","0.13.0-alpha-202009291346":"2020-09-29T13:46:04.784Z","0.13.0":"2020-09-29T13:46:59.985Z","0.13.1-alpha-202010221121":"2020-10-22T11:21:42.582Z","0.13.1-alpha-202010221122":"2020-10-22T11:22:28.802Z","0.13.1-alpha-202010231204":"2020-10-23T12:04:53.586Z","0.13.1-alpha-202010241730":"2020-10-24T17:30:31.830Z","0.13.1-alpha-202011091256":"2020-11-09T12:56:15.968Z","0.13.1-alpha-202011121108":"2020-11-12T11:08:02.796Z","0.13.1-alpha-202012151037":"2020-12-15T10:37:37.696Z","0.13.1-alpha-202012161038":"2020-12-16T10:38:10.869Z","0.13.1-alpha-202012220953":"2020-12-22T09:53:01.773Z","0.14.0":"2020-12-22T10:19:20.311Z","0.14.1-alpha-202012221024":"2020-12-22T10:24:28.388Z","0.14.1-alpha-202103081047":"2021-03-08T10:47:46.351Z","0.14.2-alpha-202201041116":"2022-01-04T11:16:09.247Z","0.14.2":"2022-01-04T11:33:24.452Z","0.14.3-alpha-202201041139":"2022-01-04T11:39:10.194Z"},"maintainers":[{"name":"evias.be","email":"greg@evias.be"},{"name":"nemfoundation","email":"system@nem.software"}],"description":"Symbol library to handle QR Codes","homepage":"https://github.com/nemtech/symbol-qr-library#readme","repository":{"type":"git","url":"git+https://github.com/nemtech/symbol-qr-library.git"},"author":{"name":"Grégory Saive from Using Blockchain Ltd","email":"greg@ubc.digital"},"bugs":{"url":"https://github.com/nemtech/symbol-qr-library/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}