{"_id":"@alepop/lisk-musig","_rev":"3-c7dbeca81c6549830b1928b9112b9961","name":"@alepop/lisk-musig","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@alepop/lisk-musig","version":"0.1.0","description":"Lisk muSig","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"jest"},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"testRegex":"(/spec/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js"],"globals":{"window":{},"ts-jest":{"tsConfig":"./tsconfig.json"}}},"keywords":["ed25519","muSig","lisk","crypto"],"author":{"name":"Aleksey Popov"},"repository":{"type":"git","url":"git+https://github.com/alepop/lisk-musig.git"},"bugs":{"url":"https://github.com/alepop/lisk-musig.git/issues"},"homepage":"https://github.com/alepop/lisk-musig.git","license":"MIT","devDependencies":{"@types/jest":"^25.1.2","jest":"^25.1.0","ts-jest":"^25.2.0","typescript":"^3.7.5"},"dependencies":{"@futuretense/ed25519-musig":"^0.0.5","@liskhq/lisk-cryptography":"^2.4.2","@liskhq/lisk-transactions":"^3.0.2"},"gitHead":"e9b554c224ba200f1ba81ab8b64762aea6c4c0a8","_id":"@alepop/lisk-musig@0.1.0","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-oQrTT0bN2wNbqWoE8YbfwY9/pda7rBS/pDh9VtlVvzz70Be8x8YAB0g4dZ7RBMx4hqVm20JjVIWFyquAvdoLsw==","shasum":"fff5fa8e129c1b7798b5315576dbca2fca0457bd","tarball":"https://registry.npmjs.org/@alepop/lisk-musig/-/lisk-musig-0.1.0.tgz","fileCount":4,"unpackedSize":4613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRcK9CRA9TVsSAnZWagAAkw0P/jaox1/+15X6b4VrJBxC\nNG/Mi9X+Tjaql3haVAM3JOwJr0YhJHkof9ItqdA6H3/KPqtgJaFcb6tcsmiu\nDzqSLBINMRbN5J97r52NY94dUnJVFIZe2xe+eIqHvCSrDwZ4f2HyzpeM1xsK\nA1WDvAxR2VNRnnwjAUMJnneDvCJdtd33s17ozW4/MfWtr1JS4f/MwwcTIzOj\nbNt88u3ixflAIXLcFwpOTB7YhKW9dLHaS61Foht6MzsB64QObDxge1w+zLDZ\nZ4LdiylFwaSqGTqG1dGXab+jIsUq6fKxH1VX3bikvSGbmQ4wYrBeglua1BmH\nij0xkkAvJvfcdoXQ5raoNJoz0yHQbbkVhFVksrBUL3c2MgkT6vP7FVOPy49A\nChfZROOXH8zZpa2YfdtS7oYSxYGo+kR9UvVJ6hF3y29TMTWb9XZ/Dznww8bR\nquwF+vyMyAslpNwz0ra0cyYxR7GxWBZPmEEDKpVqKFIftQteMekQlnUH/ypA\nOR7olQn76gQ6yV2O3Bnv/qRpcwyWuATtDdlQiCK30y8RZSJ3JayrrZEDMvfz\ncocEd0NmY2i6ArltBYtCLZXXqxHO8hJmkYI4AP8qh825BGXaZmRQ0qoyWDQE\nI/VZsBsthqGMAIfI67BDtrUAtLlWe5DH5HIJNGA1YgDeSloQIdTEdqNI1PMe\nvFzD\r\n=W3fF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoJfwBvsu+jLGI2LENRdVHzWBaL7qOqw9HafNZAiZ5egIhAI4vzBiCuY+sMpWar4rZ9yT0frq6/MesWHTgBgRx4nLN"}]},"maintainers":[{"name":"alepop","email":"alepooop@gmail.com"}],"_npmUser":{"name":"alepop","email":"alepooop@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lisk-musig_0.1.0_1581630140597_0.12871960694351037"},"_hasShrinkwrap":false},"0.1.1":{"name":"@alepop/lisk-musig","version":"0.1.1","description":"Lisk muSig","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"jest"},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"testRegex":"(/spec/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js"],"globals":{"window":{},"ts-jest":{"tsConfig":"./tsconfig.json"}}},"keywords":["ed25519","muSig","lisk","crypto"],"author":{"name":"Aleksey Popov"},"repository":{"type":"git","url":"git+https://github.com/alepop/lisk-musig.git"},"bugs":{"url":"https://github.com/alepop/lisk-musig.git/issues"},"homepage":"https://github.com/alepop/lisk-musig.git","license":"MIT","devDependencies":{"@types/jest":"^25.1.2","jest":"^25.1.0","ts-jest":"^25.2.0","typescript":"^3.7.5"},"dependencies":{"@futuretense/ed25519-musig":"^0.0.5","@liskhq/lisk-cryptography":"^2.4.2","@liskhq/lisk-transactions":"^3.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2020 alepop\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FORA PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n \n","_id":"@alepop/lisk-musig@0.1.1","dist":{"shasum":"1c93a9a4872fa40f94364a9a7d1d2511a96d9968","integrity":"sha512-qw8JqEri8bC9y4ssKsTdBGBlmFa2ifYvPDvspWre7I3vCABfyr6ZX5eBtxwpOkdENUmWqObVIpGyS6OPifQFFA==","tarball":"https://registry.npmjs.org/@alepop/lisk-musig/-/lisk-musig-0.1.1.tgz","fileCount":7,"unpackedSize":5678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRcPYCRA9TVsSAnZWagAAYTsP/AkWrv3GK4dRAfNIMqMa\n/pSQSGFO9FqF0akKLryVj3kVo8Kat85BHkV/SZNhGxdXD3yB5mx6fZplIFz7\n1vJu5nEjmu1X4xXsnSptKt0EllhOGswWYkctlPUzyO4fqbY8J6BIiZO5AvKu\nurbVkGRIFKSiN3peepjOsXAD1TH2pmGEtxXbGwnQcKIT4UW1NrSphnhQYtj8\n1a7wuh6AeaAUrVH9Oxs8Y7x/LKPcR0dy+aFNrcWCZy2T9i++hBvv9EMUj8S0\nboqmBkkvMQOcy5pizyMCxMsTCYNYg6j9ulkMaSFtOQ6zvY20SlNOH8W73cIy\nSwDGBFBmHgB2u06mgDoGHccNFsFo6wz/hOO2dfqtMZ9r4Za/BZZp2VwjbP2D\n5klu9YN5PizJES/R+QsCxwHJPWY/7KXmL0ETEUP7ksHi4QlKG6AgRXEMnqzj\nH9OaBREX3cNvf1aaa/vlfT/1LcW362KSnROLilbiTDb5paKBYdnpONWewaOo\niQG+ijLOofGO8+gbIcJ10Vlao3pC1+3V54FUN9zDYOBq7DJjl4LJTFwX4A+i\nOX2JkLNAl6csuZCrhRDcnNTuZAtRrebXpf7lCQ3nJKYPZpY5oiAJ6C7k7JQZ\nlCAO66fb6bQYxqBwIGLGEco1kApUNLj8AntjPNkmQSJDh0SLuImeetblIMSm\nf2iI\r\n=rH3J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBW56kwBRnS18YdWMvOHaV+xoGIW92+zrhk64oo9JfBvAiBYi1ELlbVc+DlcwF4ys37GedfpTZZ7pEcfafiPW4u5gQ=="}]},"maintainers":[{"name":"alepop","email":"alepooop@gmail.com"}],"_npmUser":{"name":"alepop","email":"alepooop@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lisk-musig_0.1.1_1581630424056_0.18875745955051926"},"_hasShrinkwrap":false},"0.1.2":{"name":"@alepop/lisk-musig","version":"0.1.2","description":"Three round m-of-m key aggregation for Lisk using the MuSig signature scheme","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"jest"},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"testRegex":"(/spec/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js"],"globals":{"window":{},"ts-jest":{"tsConfig":"./tsconfig.json"}}},"keywords":["ed25519","muSig","lisk","crypto"],"author":{"name":"Aleksey Popov"},"repository":{"type":"git","url":"git+https://github.com/alepop/lisk-musig.git"},"bugs":{"url":"https://github.com/alepop/lisk-musig.git/issues"},"homepage":"https://github.com/alepop/lisk-musig.git","license":"MIT","devDependencies":{"@types/jest":"^25.1.2","jest":"^25.1.0","ts-jest":"^25.2.0","typescript":"^3.7.5"},"dependencies":{"@futuretense/ed25519-musig":"^0.0.5","@liskhq/lisk-cryptography":"^2.4.2","@liskhq/lisk-transactions":"^3.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2020 alepop\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FORA PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n \n","_id":"@alepop/lisk-musig@0.1.2","dist":{"shasum":"f48ace6e8db3b0cedf24e0f10cad617c8c295a39","integrity":"sha512-QKqZ1cgz7pOcm3JpRdCYmG3kTBAlpyoIYi50y59qMrjgMq7AeadUEiNqQ3IMAXqFDDLhoeAm+A28nTY2rDlWlg==","tarball":"https://registry.npmjs.org/@alepop/lisk-musig/-/lisk-musig-0.1.2.tgz","fileCount":7,"unpackedSize":5744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRcR0CRA9TVsSAnZWagAAHyEP/jc9w7DzntI6lLijit8o\nISV4T5J+Hku+mbtiTq10StjzXDQ9qMH14/ezGmvWJ/zzt9sMm8umFJvQOPrK\nIjVNH20QyClsjE9FAh+5X+8wJyXp5loYo6s3iOpG58XD0SWhZKQSL+iwmJjF\nobR+MqkqPaTw1HiSOqU2vrmEetQfG4MTI2igQLPBarBz6M2VYzMpqqBQVb9Q\n++lmUq9pXHFinQxjfDYAaAluJlboWDU6tyD9VyetP9zNr3lnz2PhHSScg5eF\ngjJm1LgKsh2ZOoENkmjxO4npGvvFnJFHEzgB/WW+zocLiXDbGUBm3jRlRtV/\n+H9MG5/Qn5u+S5MRcsj8VyAaZoa9RLbgqb557v66v+5gjZsqumqr42JiGdZJ\nof3ykOwGp4i+bxXFiUoVC/bbIKiXJMy4snr/a/N2PX9b5JSiXHyz4feQd9ou\ntytHAptFuHpuYF6U3ant084vxsLniHXfK/pCSIxSDNaSjYfMQad4a9n3yJtS\n7Faq0No/Q9caCbg5xhi7EvNtRZUTsSdncwsFT0ywUWxZtrk89nlb1zNdPF+z\nz15I9yKeI8u/EXDBBGP+w/8hvN+Kkgh9ML8aWWRfnyfL8Ve3oWItqNEXgg9/\naROW6m5xf/uh+HtiwkO/LCnbSe6sXF/QUhRqMWaQjt65FgV+MVBT6co2Gzat\nTjHX\r\n=p9Lc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBe73Qvbf9l3uhpmOhhD4O29YLMY1z2wlMEbdkl1QkrIAiEAkgeYXV0BoHUgJBC4hnkFHwxoeE8Jx8wAOBq0D9Am/+I="}]},"maintainers":[{"name":"alepop","email":"alepooop@gmail.com"}],"_npmUser":{"name":"alepop","email":"alepooop@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lisk-musig_0.1.2_1581630580257_0.4239732295075651"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-13T21:42:20.569Z","0.1.0":"2020-02-13T21:42:20.741Z","modified":"2022-04-04T12:37:36.288Z","0.1.1":"2020-02-13T21:47:04.191Z","0.1.2":"2020-02-13T21:49:40.398Z"},"maintainers":[{"name":"alepop","email":"alepooop@gmail.com"}],"description":"Three round m-of-m key aggregation for Lisk using the MuSig signature scheme","homepage":"https://github.com/alepop/lisk-musig.git","keywords":["ed25519","muSig","lisk","crypto"],"repository":{"type":"git","url":"git+https://github.com/alepop/lisk-musig.git"},"author":{"name":"Aleksey Popov"},"bugs":{"url":"https://github.com/alepop/lisk-musig.git/issues"},"license":"MIT","readme":"# @alepop/lisk-musig\n\nThree round m-of-m key aggregation for Lisk using the MuSig signature scheme\n\n## Installation\n\n`npm install @alepop/lisk-musig`\n\n## Usage\n\n```javascript\nimport * as musig from \"@alepop/lisk-musig\";\nimport { TransferTransaction } from \"@liskhq/lisk-transactions\";\nimport { verifyData, bufferToHex } from \"@liskhq/lisk-cryptography\";\n\nconst keys1 = musig.generateKeyPairFromPassphrase(/* mnemonica */);\nconst keys2 = musig.generateKeyPairFromPassphrase(/* mnemonica */);\n\nconst config = new musig.Config([keys1.publicKey, keys2.publicKey]);\n\nconst aggregatePublicKey = config.publicKey;\n\nconst tx = new TransferTransaction({\n  recipientId: \"18160565574430594874L\",\n  amount: \"1000\",\n  networkIdentifier:\n    \"e48feb88db5b5cf5ad71d93cdcd1d879b6d5ed187a36b0002cc34e0ef9883255\",\n  senderPublicKey: aggregatePublicKey\n});\n\nconst session1 = new musig.Session(config, keys1, tx);\nconst session2 = new musig.Session(config, keys2, tx);\n\n/* round 1 */\nconst c1 = session1.getLocalCommitment();\nconst c2 = session2.getLocalCommitment();\nsession1.setRemoteCommitment(...c2);\nsession2.setRemoteCommitment(...c1);\n\n/* roun 2 */\nconst n1 = session1.getLocalNonce();\nconst n2 = session2.getLocalNonce();\nsession1.setRemoteNonce(...n2);\nsession2.setRemoteNonce(...n1);\n\n/* round 3 */\nconst s1 = session1.getLocalSignature();\nconst s2 = session2.getLocalSignature();\nsession1.setRemoteSignature(...s2);\nsession2.setRemoteSignature(...s1);\n\n/* Verify the signature */\nconst signature = session1.aggregateSignature;\nconst isValid = verifyData(\n  tx.getBytes(),\n  bufferToHex(signature),\n  aggregatePublicKey\n);\n```\n\n## References\n\n[@futuretense/ed25519-musig](https://github.com/future-tense/ed25519-musig)\n","readmeFilename":"README.md"}