{"_id":"@coboxcoop/key-exchange","_rev":"4-34470cb14a211d2b2425623e9c6420b0","name":"@coboxcoop/key-exchange","dist-tags":{"latest":"1.0.3-alpha.1"},"versions":{"1.0.0-alpha.1":{"name":"@coboxcoop/key-exchange","version":"1.0.0-alpha.1","description":"key exchange and invite code generation","main":"index.js","author":{"name":"Magma collective"},"license":"AGPL-3.0-or-later","scripts":{"test":"tape test/**/*.test.js | tap-spec"},"dependencies":{"@coboxcoop/crypto":"^1.0.0-alpha.1","hypercore":"^8.3.0","hyperswarm":"^2.11.2","pump":"^3.0.0","random-access-memory":"^3.1.1"},"devDependencies":{"tap-spec":"^5.0.0","tape":"^4.11.0","tape-plus":"^1.0.0"},"keywords":["cobox","invitations","invites","invite-code","authorization"],"repository":{"type":"git","url":"git+https://gitlab.com/coboxcoop/cobox-key-exchange.git"},"bugs":{"url":"https://gitlab.com/coboxcoop/cobox-key-exchange/issues"},"homepage":"https://cobox.cloud","_id":"@coboxcoop/key-exchange@1.0.0-alpha.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-yRYubeanS5CGhmdKGBSLJ8J5ZCs+3NlUgulzrxEnlFMTVxBV1R9vtrwGM65QPIPUxDv9zGQJaVUkCNSQ6dCusQ==","shasum":"3f084f280beb348ce0eabd2cfe64a3be66358d59","tarball":"https://registry.npmjs.org/@coboxcoop/key-exchange/-/key-exchange-1.0.0-alpha.1.tgz","fileCount":6,"unpackedSize":44025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIbBbCRA9TVsSAnZWagAAe3gP/3LUyKsMoeT19jWD+08D\n7TSB2CU7xEbRagq0ki21zj54E1CGso8qv9xW6Uj91wuDqPlW/klogAJ5Nh4j\nUMUwlZLJEon+3vAfd2Rb23Z5ZCT+5iy/ok3ANQiM+Eda9abmJEE5CYsl7uv+\nWyzTsW736YrKR1cBQa+vPEid5AwOEemKNRr4GAMTDB1isyAHJP3p4mkyfEVh\nh0XFPwhSvEwPOQEaSDFeydOFaelfy30u9O1RxaAKGj9FQVMpH1tnoj4nDwPS\nxf/y7Ih7IAgG39W/LgpphEWq6dtwt9j+oQEay9EWLZk4FvCgiDqFpiMY0jaQ\nXoBq1YXB7vHiKVQzYziSuRUw1wr0RLvMvTfOW3JCucahy3OTkSm/OdCGZMDP\nBi4SC6dZK29G3CnZ17Fl0xbSTK6SYkV3YcmRWKXX1nPpDfyz0g/RDgqm8/B2\nxQytZyiSoOXtmU5qTniRVwtsYzkf+3Zk6tQZh4EJWadd1GIh/NgzkCeGtzwA\nx9UR0/dtgiSe2RgKg4zz4CeQcnCcpRd7TzBwWr4Y4uYVeSRwHN0om+dvIbeX\nKj1SY26kG4JDHlxDQDiLlyOVfkG1r1gIxbHLsLXhktmt79c3z8wrnr0Nn8XA\niaIX5K7uSDX4P8dkoGZwrXVOXQfeEikkjAEn3jOkSAZEJ/+aQyRqkG0hzaki\nQF9k\r\n=ZDcL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGRYHl/wSYwJgeGQ5Ymlfq4hcoxylmATa9fxxkpL6ZIFAiAEXtTBfqw5JqFjaHdj0cHNBlXZp1aiMkVJx9j2EHRqlQ=="}]},"maintainers":[{"name":"ameba23","email":"ameba23@systemli.org"},{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"}],"_npmUser":{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/key-exchange_1.0.0-alpha.1_1596043354802_0.8656198057120235"},"_hasShrinkwrap":false},"1.0.1-alpha.1":{"name":"@coboxcoop/key-exchange","version":"1.0.1-alpha.1","description":"key exchange and invite code generation","main":"index.js","author":{"name":"Magma collective"},"license":"AGPL-3.0-or-later","scripts":{"test":"tape test/**/*.test.js | tap-spec"},"dependencies":{"@coboxcoop/crypto":"^1.0.1-alpha.1","hypercore":"^8.3.0","hyperswarm":"^2.11.2","pump":"^3.0.0","random-access-memory":"^3.1.1"},"devDependencies":{"tap-spec":"^5.0.0","tape":"^4.11.0","tape-plus":"^1.0.0"},"keywords":["cobox","invitations","invites","invite-code","authorization"],"repository":{"type":"git","url":"git+https://gitlab.com/coboxcoop/cobox-key-exchange.git"},"bugs":{"url":"https://gitlab.com/coboxcoop/cobox-key-exchange/issues"},"homepage":"https://cobox.cloud","_id":"@coboxcoop/key-exchange@1.0.1-alpha.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-gEIP9kZMLjqmEdWTga0Da0jum40/F5r9xwsmmnTZ/7ACusE8ZQIEO058/oaRQr6Q/c0gIImH8ErQ15+B0OR/3w==","shasum":"9399725c371d18f14d5dc5573da18643cbc11f46","tarball":"https://registry.npmjs.org/@coboxcoop/key-exchange/-/key-exchange-1.0.1-alpha.1.tgz","fileCount":6,"unpackedSize":44025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIbf0CRA9TVsSAnZWagAANe8P/15yZR8RvrDfzS/G4WK2\n8LOspFy80O91uKGXrJD1GYi4AYnRkGjctMTYp5VSBPy9m6GXwD+srB7AzJOX\nnxPHq1ApmHhqUT3xp1qWWUbewIkxqOhhB3p88qnc2LmvNCV8H/W2jgV+M8Kj\ndFBQbYVe1JG0LbpYv6R48F0fKzQ+kFOwFVEyIFiRTr+dnMUuj1YKidBkgRHc\nx/riFMG/SfkMMYD6CCH/FV8Nrdhog9zmAjUeiGrjFvbAVlcYlssb1X32R+lV\nLM1PL4beEyW+eMglzRPe+EUkVA3JhioJzqVjWWF2YNQ1bHHzSSK6q3SZTkkG\nmWIWIPVjAu3sedJgOvHcS6WTaXzxgdu4TdzWyauQqOSUdwYD69buDXREcyy0\nATVBTgmVNOoHkHFCYsjkAVRMxdD+JsMOzzQERRlVKIPi5TrQckZoRgqdaXVs\nJ385WIQcRhHwLHDijyXUlCZxX69HzDKbVIAB6JfHArPjSav2GpHGGF8Zkivy\nfh8nImdNwYVbMQgV1cCuSBGl3eGZ9K3EpwsE8xtrsldSpHcL8Ndi1a3QzNZh\nzIJeE5kq4u3Sua5FYbl4gVcyU88XGcxVfMD7OoXIACx1y8D5pdhCinf26xca\nFmj8ZnAV9FNsZzcXxy8/PXb3BwRiWTmO27bwO9sbntto6mn7CogWxOYwdUXE\nEnES\r\n=iz/k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICYq9HtsFjbb9sxOfCtdsWyff1S5QTjcON6C5b5KsMxgAiEA2XytiinxQ3pC6NG8IH7AiN+IcD2vQLKvYcObIdI9kvQ="}]},"maintainers":[{"name":"ameba23","email":"ameba23@systemli.org"},{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"}],"_npmUser":{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/key-exchange_1.0.1-alpha.1_1596045299793_0.7501299411330988"},"_hasShrinkwrap":false},"1.0.2-alpha.1":{"name":"@coboxcoop/key-exchange","version":"1.0.2-alpha.1","description":"key exchange and invite code generation","main":"index.js","author":{"name":"Magma collective"},"license":"AGPL-3.0-or-later","scripts":{"test":"tape test/**/*.test.js | tap-spec"},"dependencies":{"@coboxcoop/crypto":"^1.0.2-alpha.1","hypercore":"^8.3.0","hyperswarm":"^2.11.2","pump":"^3.0.0","random-access-memory":"^3.1.1"},"devDependencies":{"tap-spec":"^5.0.0","tape":"^4.11.0","tape-plus":"^1.0.0"},"keywords":["cobox","invitations","invites","invite-code","authorization"],"repository":{"type":"git","url":"git+https://gitlab.com/coboxcoop/cobox-key-exchange.git"},"bugs":{"url":"https://gitlab.com/coboxcoop/cobox-key-exchange/issues"},"homepage":"https://cobox.cloud","_id":"@coboxcoop/key-exchange@1.0.2-alpha.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-KB1WezqSg4zSoAXVClLynXe8zje6qtmYl1Mm6GuhWvcAhAaVkZPHWaQ2yDpbDkkP2usbGRyTRAw6xPsbnC1Q0A==","shasum":"c7e88cc3d74c843fe87c5384dc33944005fa991f","tarball":"https://registry.npmjs.org/@coboxcoop/key-exchange/-/key-exchange-1.0.2-alpha.1.tgz","fileCount":6,"unpackedSize":44025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIc7/CRA9TVsSAnZWagAABS0P/jwg8oyYgTka3QmLRuL8\n0zcPWTxLDNozMckUC3HdWfIVSLJOpBPgYlKjA5iW7yshCXhXb6AK9b1JINYy\nBJNHzCX5qnwrMdrmLpKOXNZ0PE/qe9FpcdZA5zoq7gXcwuWdhwlNFAkX3cNd\nrRaWzDEl+tx7nm9I+xX6YZdLUnBGa6kH/9BK7zR2pmtsjhRXvZi2HT5ZWINo\nPJU8zL+0KJbEA8htS9hIcR+13Pg6FO+kF2+l5xh45B4rRwvGCLbXOY5YJcXN\naDGiuI9UYAv9EuHbJ1l4kTQOx3zZ1E9pUROpuZDuBML0jieZTOUKSx8AoGZJ\nQz/poa87Y+uO+0d0soAPqU5IICH5GZIneajy7xmfG7ounCQ1zYmmRkd6SrFz\nogGQF2YXjxGYpJMTuMcdLOwnsrO3f7xCFe5PHM9xTYlqVkh4KShzdPxhL5ew\nPZEoBtQnRtBz23O31ryPOTFTr1jo0qFrLKW5TmpEdfZHVF8oxoPFOoR2For5\n216I7v+VDAaF/b1Gr+6hMA0EfoQwh1Xc71rLlCwu1ZdYrcuagZSujJ6I62Ys\nhE/cowNizlz93+Q019m3f3MJAZIF9maBYPtkZ9Nv6A9ovKBegolTnx/ZyGXG\nBnPOuH3rMJBI1Eh8oOsTHOaKKE5VZAsfKZi9MeWg2PkoadYn0AKewbX7mVs+\nY5OL\r\n=phm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkAbO3SiHaQQ+sngxsEj1RmKon1vPKMzBihyDuCFinUAIhAMviPP48Gjv3kT9Tq/G81qy0+GLZbWZglhO5FisP2Gxl"}]},"maintainers":[{"name":"ameba23","email":"ameba23@systemli.org"},{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"}],"_npmUser":{"name":"kyphae","email":"kieran@tenthousandthings.org.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/key-exchange_1.0.2-alpha.1_1596051198627_0.14203442402315214"},"_hasShrinkwrap":false},"1.0.3-alpha.1":{"name":"@coboxcoop/key-exchange","version":"1.0.3-alpha.1","description":"key exchange and invite code generation","main":"index.js","author":{"name":"Magma collective"},"license":"AGPL-3.0-or-later","scripts":{"test":"tape test/**/*.test.js | tap-spec"},"dependencies":{"@coboxcoop/crypto":"^1.0.2-alpha.1","hypercore":"^8.3.0","hyperswarm":"^2.11.2","pump":"^3.0.0","random-access-memory":"^3.1.1"},"devDependencies":{"tap-spec":"^5.0.0","tape":"^4.11.0","tape-plus":"^1.0.0"},"keywords":["cobox","invitations","invites","invite-code","authorization"],"repository":{"type":"git","url":"git+https://gitlab.com/coboxcoop/cobox-key-exchange.git"},"bugs":{"url":"https://gitlab.com/coboxcoop/cobox-key-exchange/issues"},"homepage":"https://cobox.cloud","_id":"@coboxcoop/key-exchange@1.0.3-alpha.1","_nodeVersion":"12.17.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-knI7oDlRyzGRFCFE6tm6Y1SyTmSDvwMZdZ2D75ORpy4fzEyrRknYoqt3xPMsEpWKc55E/xJvSNuU0doScmklfw==","shasum":"85bfec2ebac0ff054cf152c00e4a83efcd8ecd8e","tarball":"https://registry.npmjs.org/@coboxcoop/key-exchange/-/key-exchange-1.0.3-alpha.1.tgz","fileCount":6,"unpackedSize":44106,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuW6fyjRtQCcRj3iIFqijjgvkshokRFD6TMxucVpEQMQIgZU0bHOM95MmE2FukdJTl/y9/gy85xw7EeomULp9MekM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTsbfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKgg/8DEeagDzV/0VMmccw/3U1CsG2PKL9IblWFshL8Si8KdeginZf\r\nf/4ez+/MmUKdo2caBs7WWalWNhljSKEZyq1kAD5nvVgOBzBt5DmdSb0KvILZ\r\ns/UbdiOZBmm39Jcp9VYGeuhNPIKXjgUAusQKGZ0I61xN+d6yktQxTlK+5GYy\r\nWYQD8NN4PaJbQAmRGiMbjnSioyJS20UFjofZuOP7EeVADXYvJet3CzVGpcLB\r\nxgNaScfjr29eNnz9emft8fSJoX89qNc/dqqOQcqfDrz5IBC5EgpoiY/GjaHX\r\n9fDpgDqNFM0jWToyhNcwp09Qlz9O0dBORLdlQHA0j92xRD16sP/LvpKgRWay\r\nfzldQbj6+qk/xJxYZmUpyVSWpMO6dmSnUbmFpzk2gIpOTMnFYV3ahhQTl1PN\r\ncwGO75DD4hxHCPIAZiwvbqsW54lLr4od+ONbAonCfcQRpBzDbNWuO3OYcw5z\r\nh7X+iL2XWJpmD38LbndQh4iOYtrVy1oCLAjQP5oj0xsN1kaKkZZYL3i3RTwl\r\nudx2an/gh7MuzpJQVrPJ0bIL3H6lDDHygXXGbGldt5z0WJ+nI7wBUgaoVhSy\r\n9mtfz4nCmCWIqZNCapben8szEKhkKbVaaPr+s/IDK6v58QVMek8NjJxe93TB\r\nlKQYraSy6m5nHs2HwCN21PZuexUAN8wHKdA=\r\n=3Yc4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kyphae","email":"kg@magmacollective.org"},"directories":{},"maintainers":[{"name":"kyphae","email":"kg@magmacollective.org"},{"name":"ameba23","email":"ameba23@systemli.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/key-exchange_1.0.3-alpha.1_1649329887120_0.6266869847848913"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-29T17:22:34.231Z","1.0.0-alpha.1":"2020-07-29T17:22:34.903Z","modified":"2022-04-07T11:11:27.355Z","1.0.1-alpha.1":"2020-07-29T17:54:59.964Z","1.0.2-alpha.1":"2020-07-29T19:33:18.842Z","1.0.3-alpha.1":"2022-04-07T11:11:27.267Z"},"maintainers":[{"name":"kyphae","email":"kg@magmacollective.org"},{"name":"ameba23","email":"ameba23@systemli.org"}],"description":"key exchange and invite code generation","homepage":"https://cobox.cloud","keywords":["cobox","invitations","invites","invite-code","authorization"],"repository":{"type":"git","url":"git+https://gitlab.com/coboxcoop/cobox-key-exchange.git"},"author":{"name":"Magma collective"},"bugs":{"url":"https://gitlab.com/coboxcoop/cobox-key-exchange/issues"},"license":"AGPL-3.0-or-later","readme":"# key-exchange\n\n<div align=\"center\">\n  <img src=\"https://cobox.cloud/src/svg/logo.svg\">\n</div>\n\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n## Table of Contents\n\n  - [About](#about)\n  - [Install](#install)\n  - [Usage](#usage)\n  - [API](#api)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## About\n**CoBox** is an encrypted p2p file system and distributed back-up tool. [README](https://gitlab.com/coboxcoop/readme) provides a map of the project.\n\n`key-exchange` provides the key exchange operations for CoBox.\n\n## Install \n```\nnpm i -g @coboxcoop/key-exchange\n```\n\n## Usage\n`const invite = require('cobox-key-exchange')`\n\n### `const inviteCode = create(opts)`\n\n`opts = { publicKey, address, [encryptionKey], [name] }`\n\nCreates an invite code.  Returns a buffer.\n- `publicKey` - the public encryption key to whom the invite will be encrypted.  Must be a buffer or hex encoded string.\n- `address` - the address of the space to be included in the invite.  Must be a buffer or hex encoded string.\n- Optional: `encryptionKey` - the encryption key to whom the invite will be encrypted.  Must be a buffer or hex encoded string.\n- Optional: `name` - a name for the space.  Must be a string \n\n### `{ address, encryptionKey, name } = open(opts)`\n\n`opts = { invite, keypair }`\n\nDecrypts and unpacks an invite code.\n- `inviteCode` should be a buffer.\n- keypair should be an object of the form `{ publicKey, secretKey }` both of which must be buffers or hex encoded strings.\n\n### `send(recipientKey, inviteCode, opts = {}, callback)`\n- `recipientKey` - the public encryption key of the intended recipient of the invite. Must be a buffer or hex encoded string.\n- `inviteCode` an invite code which should be a buffer\n- `callback` a function which will be called when the invite has been transmitted. This may take some time depending on whether they are currently online.\n- `opts` is an optional object which may include\n  - `swarm` - a custom swarm function, which behaves similarly to `cobox-swarm`\n\n### `receive(publicKey, opts = {}, callback)` \n- `publicKey` - the public encryption key of the recipient of the invite. Must be a buffer or hex encoded string.\n- `callback(err, inviteCode)` a function which will be called when the invite has been received.\n  - `inviteCode` an invite code which will be a buffer\n- `opts` is an optional object which may include\n  - `swarm` - a custom swarm function, which behaves similarly to `cobox-swarm`\n\n## API\nSee swagger documentation... (we won't have this for a while).\n\n## Contributing\n\nPRs accepted.\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n# License\n\n[`AGPL-3.0-or-later`](./LICENSE)\n","readmeFilename":"README.md"}