{"_id":"@libp2p/interface-pubsub","_rev":"29-688f62cab8e4f4011256f1b423c74a73","name":"@libp2p/interface-pubsub","dist-tags":{"latest":"4.0.1","next":"4.0.1-d853d124"},"versions":{"0.0.0":{"name":"@libp2p/interface-pubsub","version":"0.0.0","description":"Interfaces for JS Libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"import":"./dist/src/index.js","types":"./dist/src/index.d.ts"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-peer-id":"^0.0.0","it-pushable":"^2.0.2","@libp2p/interfaces":"^2.0.3","@libp2p/interface-connection":"^0.0.0"},"devDependencies":{"aegir":"^37.0.7"},"gitHead":"96a4bcc79da19fd63171b90f81abbb7cead6e9ce","_id":"@libp2p/interface-pubsub@0.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-fpzAeje2z1FiI+wD1+zchon67c1rMG2EJK83kp1wbaRl+w6gBY6/RhIYMFt6GqSB3ZCSgPS4G6yozcvHt5mrSQ==","shasum":"f21881bf4141157335ed82ab023121bcc14229a8","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-0.0.0.tgz","fileCount":4,"unpackedSize":16140,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEaihnkZ23kAQ750M7/s3P+Ix1uA8OkmHi5uHX1o+wXTAiEA4UXj/o1ULefQ7DDi1LsZ+QS6l97saCya/HSuS3vCbVM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiov9zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6QBAAogxlMksxLFTmzIcjBd1S/ZhkJb0mGUa2TA719NCPEVSrI9Sw\r\nyLe6oa3kLLtrR6n8DfnXBFZ94MIZBApy/P8blkwsW2SG9G58MnBt6eJSVLAl\r\nNPTBAa4gyHIPbSCV1ArSh2TNQ9gxng+7KMzfvfSbPNB1gnXwun7d8ICt8eDA\r\nqmWYUZc85zjKD6cwgJu0zZI8onNWSh4LiV6vdKUHtZV3gGRqE+pbAGhwZHGP\r\n6rcQbkyOFWgYbXfy0xHHbcbutk2NeBp10bSi4BYny3SeNUJN/IkTRdxNahKb\r\nabXg1/BWLUeBnzOsCAIXYiTYXfzO6RYPOYlgYV5zmzZPKrt2Gi7EtrOc/iut\r\nHgo7CrJsxSObYK2Ou3d173bSuTIOc+AfSMk3jlewm0d9t0Ya3kbzJeKExAXk\r\nusHEUiEvrPnPpYq2f9EnbKnkEUomZx2RyZAadYw50bOxSLlB0881/+s9b+vL\r\ndiiHqAvdBiKYy9v7afv/cTuQd1gBhKdDubejmaS90l3Zsoag6nkqmBq+xX/r\r\nZJFIbNAqudedsm/kM5Wk8QoZUX/eiHfBYB4JJzyeMvpOKCdE7fbU5QzLEIsx\r\n2/orLj8hPLfUDVSlNThcGapu/9nJokRsY65MuBgta5xRAidfA18Ra9vUk6pD\r\nsZJzXViZVvuQw0HRiHRv+jTRlAnhpk/kUbE=\r\n=1s48\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_0.0.0_1654849395437_0.5613800301536287"},"_hasShrinkwrap":false},"1.0.0":{"name":"@libp2p/interface-pubsub","version":"1.0.0","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^1.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^2.0.2"},"devDependencies":{"aegir":"^37.2.0"},"gitHead":"c4db50e6e801d314946d72e96ebae350f152ed4e","_id":"@libp2p/interface-pubsub@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-k6niqBKDnujEqDKFvZCmkN4k0glR+DwypqFZphGUmnuGx6C94iZtdaUQuEFXpE4R6VY9cp2quFaKnlHB/azscw==","shasum":"dfd609188e8d64ba1cd912adfc9c816a1c584148","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-1.0.0.tgz","fileCount":8,"unpackedSize":27287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgmzLuPFRpHYJOKJgsIUnxSwAZPWQCfVt6OMoYqrVCsgIgQ6TUGVdt8MCrmV3MzO2OvpOjovlwK79ZT2/VU3yZEXk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqKMpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDQg//aPyeInvY6JU3cQ6JJ3hSHTU9RjXp/V9Fr4rWjlqZVdhQpFoj\r\nfPB3rbgkhxjWCB9TCxAZJ3OcEiMNGl+CQcDByQ6lL8ZE5kbd42NInEqBPpPV\r\nMbp7xQduXnC+hRX08SbxhZW+Rz16ysPiABfNkJuht6dF9N6BZgmsce2Bq7Wr\r\nROBF9Nfb31VD4yVFz8kKDe3+MTthwYhLuQiAOua7CmEj8CYTDoCj1VMEEMmz\r\nzWNn5x/NrI4u/zfKexgT4gXLogzOOZANwn1Y8ZlnqbcGPbCENVn0GdoF+dRm\r\n6D/k4iaMUwcvdS11GLfbo5uqGPW0it+gVjZ1PBhsQGVz6OZoBV9Fdyhxao9V\r\nK0BFG6QonSjwNPP6zZNiYdLsUtckzTZoE1HB1Vnqg7H94dxrrFqEEH4E6rRL\r\n7uWiU5jJ/WAetptjy9u1Rt/u8Lo3xboVYb4NH7N1bTdYHZpMWpHepj+gqeWE\r\n5yL5ODNvUmHzaA5NEcheI2jUGlhAPMJVlQTMmEN5gxcourS5QVKnD4hvWSpc\r\n13An0PN/EA9CZyC/KaCvZ54O1t4xEjswgWPLNoaKcWk+UGsIsRqSC0qGv02e\r\n5RtEwIlwGTgW+t0FTeKE6Rj9onj8U7hjdctpJBiV4+F0Ky6avrXFnSkipp7L\r\nBndIvjjJgXQBiDg3oIjaRfoNHq1t4vbz7SY=\r\n=3v5r\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_1.0.0_1655218985096_0.47769656884626754"},"_hasShrinkwrap":false},"1.0.1":{"name":"@libp2p/interface-pubsub","version":"1.0.1","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^1.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0"},"devDependencies":{"aegir":"^37.2.0"},"gitHead":"2bdca9af63ccbe1e78a946c3f2b6c702af28aade","_id":"@libp2p/interface-pubsub@1.0.1","_nodeVersion":"16.15.1","_npmVersion":"8.12.1","dist":{"integrity":"sha512-fpVy3MxD8N18zbKLgyhX23DIfS7245DTMZ/D9oPNwxvNvUjdyPEpvZ+Bss+oACx0Zks8McWNa4NqfIs3mewvcg==","shasum":"deaf49e11fcc69b7abcde5e97f2e7274256eb9ed","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-1.0.1.tgz","fileCount":8,"unpackedSize":27287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHwbVIjZuB4nYPE3aviJsHgmSvxzpKKNvLAMo84+IE9AiEAzTLqhntBEpYncP4c6iIvmK82cCx572Mzji9IDo/STlw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqMiWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9jg/6A3Bk1XO+zg8/dEHSryLsc22TSDD+3pP2/gszVPT5U3NAKvZ3\r\nO0Ut8mo6mdQkrxK5jGHXQsxSbx54gk9Wb6+y8Lz+XNg+1g1rFU5klx61NYrh\r\nVNhG3v4OcJomU2w9gWUn8IlSyeOUiQsYupfGs7Hw1tf2FCwCT+UwtpERX70/\r\nbPzSMg1DZrTq+DdF6ZSUM+GAywlJhXlwofqg9omM2nEDw2GC+IO66ApyUwBC\r\nASLEIFQG7EpVV/eAmCgLrsIpZY6GiPc/FOzVGj9/WiGQ+svsphxpalVA1cCw\r\ng7L//2Ifyo+WkqAmdapXlPU2JySZ0n3taV2LxxEpObFQRZVi6XnB/58T325i\r\nSwsoVfIErDGEkj+qmS34uGsq8QB7IuK0S3v9SdazyDJS8ubAGKeIBBG9wdfV\r\nXcnRug5i7Nu+IXlMSmFEdgWhTEJeizd3CrkuNttrvrpkBg0nCiE4Faf1xeBj\r\n0Wn0QL853xSGrdsWvKY3Gjlqq9zVl914wbKcn4SzTA6jPQxc53qQ1E5bAegy\r\nxggiDYMdoK1NRovogzobjjOjh/oh+PL+KJgQor8kXe8cbrhHQAhslbEO5zdU\r\niOz8b76Qt8v+GyHGnDTsMuwgngtCNcjbqdg/hJheRRtF3XitRQkqLk1b5CDp\r\nXqj+U38FdVK9HpYlgvPxCPeVoRzR9bvAEXM=\r\n=YG84\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_1.0.1_1655228566371_0.2119810654787888"},"_hasShrinkwrap":false},"1.0.2":{"name":"@libp2p/interface-pubsub","version":"1.0.2","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^2.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0"},"devDependencies":{"aegir":"^37.2.0"},"gitHead":"e3b063d46801bdcf7b6ce3040d94c8da83cf3fff","_id":"@libp2p/interface-pubsub@1.0.2","_nodeVersion":"16.15.1","_npmVersion":"8.12.2","dist":{"integrity":"sha512-lWVRkhsE46YIm4Gujb++IQyj9U70l/CgrYOWTjhQqVQjXdjtqVRy4Q9OncQGvjyukDDg5p9cEgzg2E9YAKzp1w==","shasum":"9a2773fae3b24a2923579c59beb86b382d74a3c1","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-1.0.2.tgz","fileCount":8,"unpackedSize":27287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9oizWDfEUdOm3Z+wGBnY6+aiwrK5n+M70dMon7VtjrAIhAM88754ioYdcc/DII7nnCvDskPHDgGM/2YK9mrOuAIwL"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiq2e7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0wRAAkYq2okNexddpRadH13kcbajdTSZy4CMU65uwGX0dx5NPHXAN\r\nHs8oT1riSMqAqGci4hhuqXtxubFuKd3iE8enh2LqH8NGhFEXQFPmSXRdRnBd\r\nbdinc9DgACoOL4c21h+HAj00xAjzPIIXaB6syWEohvkePvnGL9zl/FjwOx1+\r\nFK1B+yTaMnPPbKWZiq+WVs6XER+sLjXONIEkK4qmfqH/2BI4ppbkwdgKXFSi\r\nsAxywYqgA90u05yONCpVPZqAn2UKhTDbdMbmn1kc0L7sUwPzuQYwtqorESr0\r\nbOY+BSagc6+d1rM41KzAv9rlnltx0b6JgA3/Am13Spk3WyDz0+OJy2TT+pX2\r\nEVAF88eOm+n+tqzDcuFWkaCwz9T5qQsUGhk9c3dMv6pXxIgIHD3xXO7RaIGj\r\ncHA3g73ZIxiB5v4kqI34HswOSTndM/loa+58LB9O2LLvwmTYXjPsMYX89Bj7\r\nOG3IGpb1DTeT50RijcBoprrKnBh5sRCCIYjP8NyUj/ecMQvogO/t/HzzxNKT\r\nremj3uD4rluXF3wZIEXjKt0fqS7GzjuOE22x1IQwusy4AlezY7czgNOtj967\r\n8Ok0F6Q33ijAXkX/sS/T84xxrheGkXezYm2iNmZvK8lWQU8SojUIXlVOwjBj\r\nyLyRHG0231eBQvmunRZUjpOr2eE51uyTPao=\r\n=ITxc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_1.0.2_1655400379358_0.9301844499243683"},"_hasShrinkwrap":false},"1.0.3":{"name":"@libp2p/interface-pubsub","version":"1.0.3","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^2.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0"},"devDependencies":{"aegir":"^37.2.0"},"gitHead":"a040ee815af331efbe88bd2c6ad77ddd54c03d6a","_id":"@libp2p/interface-pubsub@1.0.3","_nodeVersion":"16.15.1","_npmVersion":"8.12.2","dist":{"integrity":"sha512-xgzAhj7wzWBXS/YQyaTQq40I2VQB1laXJw3Cqz7HloVyF/kgyu7NOnKa8ubu6UkhbKpnIoJYnX13CccEiD9vlw==","shasum":"8b5425b2f79043cf258dcfe38c8bc3cb6ad6c03d","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-1.0.3.tgz","fileCount":8,"unpackedSize":27909,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKRTDuSZDx0LZswgo9L3ZKA/3583BfVsCoCdgEeMUvGgIhAJ7vJNUNwarwbQ7N5CVi42z2JwBF14l5tiwUoyan6f/z"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirC+gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5tg/9Ht2fKyQoGEynVHHf2mPrcO6Bb3i5jXlKSZECDAM5yOEg7N5K\r\nPjD05TQoy8su6cETeKDexdZvRgmovT+REcxs7FjdXDfaKvau1fNxITzWkpTl\r\na1PNO0ouybtQLxP1K3oj0uFzu2OrRLFj3RZ8CPuAFEjB9HeBXGzgbqJEW1lP\r\nw38Tu6PTbJIX0YS7CfaInO/hbxTXlHbLxnH5lf92j7ka0ozuU7mDCMcQhrLS\r\nZkXyTf0+SANRg/r3MkJgdK65KHYJd22JXPXLcuRU5tYJ05w1d9ghxZTPXW3N\r\nHTvqxAgqUli0SMt8xMLYp0JeR5EEparDaNWdFSes7n6nHZNvYH+w+caQ4lN8\r\ntcRqX1GvNCn5dhH1Q3GpJqXH7wZPx/AyVCIiuz2YQ9R8eQ2+LctzjxayZqOE\r\nRf18FlyldQrQ02Mm26GkXBod8/RsjedtADMJNJzyczD/hLKuUjXzVVvCPGbp\r\nXxsRn+8xhihf2gVxGrtnyAyfoR2ByxuA9P5MIEH1FlhU+E8/1ub9Ia0zPPDh\r\n2AoZsH8QWDdHQ9U3yTmkRzod9zhDm4VfacLUVK8Osb6RwcmoIXuxFwdzuWyZ\r\nGjLYo7OYh3yytlvM/WhIpdPgdMvsWYJXTUVE3KDCS7Rzl1MxGuSVD0vu/LXS\r\n85TxIfr75xSrFWukvGpdoZu33FYmqCOeDCQ=\r\n=wj5W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_1.0.3_1655451551944_0.9883530083444141"},"_hasShrinkwrap":false},"1.0.4":{"name":"@libp2p/interface-pubsub","version":"1.0.4","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"chore","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Trivial Changes"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^2.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"5e30d704d1e88ac2342dba0d238760e2e1d57aca","_id":"@libp2p/interface-pubsub@1.0.4","_nodeVersion":"16.15.1","_npmVersion":"8.13.1","dist":{"integrity":"sha512-BSkt0h4fbBBHcr3LCF7fTtAoCdQBjKbTGxCa4tIJpI3m5suxC5h6OrLC2rmrexOxR9aZRkr9da4VShRyOfRLag==","shasum":"2a1a7d5032cad7d0737161de26878626e7900407","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-1.0.4.tgz","fileCount":8,"unpackedSize":27909,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDnFjPFneP07pcPz588773WY8XftZVGOR7fXXOWOSC2AIgQewzRHDGpAeAVGfh002hbY2vhNEbQoZj6fLqUx5+C3I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiueXSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTTA//cM6VfJ5gn4PitTog6Uzm+FFWYaDhk5oCsDYZm8KKMbYyaiDO\r\nfxm5jTY2xqEI4csIS2N5oae0Ilzi8H4J2Bpx53wObTp8HQnk8nM/9f3xJeoO\r\neVNwWjWlNoZ7qIMsfovIPnkPawXipsWtygQsS4AThRMOsA9ffCg6enSSeXak\r\nJ4T0xtk2JoJEEpZ3bGa0M77l9Fm0bFmFMijFwXW/tyiKV11Z4meBzLzlGxS4\r\n4zKzW4jfnBPF90iUUPsKENrfLwE8eoAuXS2VOCSxeMeO+koNhmZUpzQhYdrP\r\nTFAHwuEwlXyuHrMoFTn1fs/M6uNvKCvXEU9aGbK6QvvZlh32jAONOkpqzoKA\r\nLatoXZqm7vyTfekNDsXo2ot2g/17IaDOPPLFJjpBNQFxSwK/cBoyI7FkuDtU\r\ngtCDay+9dJ0Ic3SZrqBGi1KvYhyP5tQ/nDnaL2dk3UbggSNiaIcImw69s+nM\r\n11ngF/DrnXuuV0iTHBBmLbM8okqp83Ug2J1TAiMeAVCEJAZfftI7syLWvowj\r\nhL+EuGyYMl/+EbQU+ieUyh1aXJAXvCqrPsRbpqu4H3iheo9v9CWu5oack7+4\r\n21KzhFcfw5xX7UvzsaXwtoIPqnsG7QWvXBlyGBVGpQmLszTMvQffkOZ2mvD8\r\nnrEP174y9hs5VtbgkQW+Hb9UKyCoTn3Y5Pc=\r\n=GCJm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_1.0.4_1656350162303_0.23288406484492907"},"_hasShrinkwrap":false},"2.0.0":{"name":"@libp2p/interface-pubsub","version":"2.0.0","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^2.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.0.0"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"3a871c9400c558a6ee604a0d99c842525ddcd1ac","_id":"@libp2p/interface-pubsub@2.0.0","_nodeVersion":"16.16.0","_npmVersion":"8.15.1","dist":{"integrity":"sha512-32Eo/GG3/sitqfOrNoIc+V8aTaNrVUk6zLb8++t1tr0p8opCQfXnbJwDe/TNxhwVkfHCEJxI8NuXMHZqGZWUgA==","shasum":"5493a56fc9d56af6c0087f752a92c89d740bfe2b","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-2.0.0.tgz","fileCount":8,"unpackedSize":28784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIg/ROuZuWJ+xDzW0ZbC/1RRbgTfk+tXfWRFC5AeujTAiAw4e4mGcX0GtDF1rzxBF4W43fA4l2d+M58V3frCxvA2g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5lFvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTPw//X7mfknSNL8wLY8sFKzbM18rCFVGO/KFDrgCGGkn/VCcObFBY\r\nruKUSd0w1i8tsrV9DvvexnPG/38yR+rEI4TtJBXglwyQxnjhQwDQ5WrrMDiX\r\nqs77lbUc/fPne7r3pBrfMaDFe2qXXl89mYXBi1Nrg0dBRr8l/aUDdhh1dpQi\r\n/tHjQDRTQvcdE1q9FzjaL9R9DBDAVw1vJGivfWFuvakobEQO424glTV3w2EC\r\n18LDFVHFJzteW0XKAMxWuOan6tg/4QrqLY6QD6HraTHSn1gxDz87V7ejW30W\r\ncmnyBmJ3gBGBnFY503EuiQflK/W91qOUq1Vk2Q+G/RYgLt/QcyhNyrVbRsn2\r\nY0CeT//jy55LQBO7qKwfpH9GxHGZmkSh+sCqZ0jUis3cAupyxFi9N4uaZIJU\r\nIxAMgdsr92EhSj8Pr+twYADl5Q7VsoMBkx7HReWfGEa6gZvvSfTWp2OaegXe\r\n4v4qcjVCsEQ5FrouhRJHboHqd85xcsOT1wL5jm7WTaVFDNv/35TmVEjAjq8W\r\nj/bqaX/QeJH4cy247B5du3WFMLi10LeytzkdmTvmz2tMsto3j+iJXJ1R2LPe\r\n2NYz+k45opDT4g7NVEBriRGjI8jPmH5XpSHiIpzcvZytS1nOjEyv74aB7LMQ\r\nSJQgYD7U2WrZIQfmtPamPj99E3BVAouVOUo=\r\n=M9f2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_2.0.0_1659261295094_0.40801553434004556"},"_hasShrinkwrap":false},"2.0.1":{"name":"@libp2p/interface-pubsub","version":"2.0.1","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.0.0"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"14303f510d75aac5c88750518a5c32a1254b79de","_id":"@libp2p/interface-pubsub@2.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-j6XSYz5Ir5yJH6KCtYMUGYlbBFfDGx/vPfFe1X3UFIC6qZ9N+IMkde6C5DCQ8calhCyM1pB2K5StAlztsZV2BQ==","shasum":"cc13f5f6ee8a8ef92066bc534b93680ad80ffc55","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-2.0.1.tgz","fileCount":8,"unpackedSize":28784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVPxbtgFHc7grcRMp11/csyrQG/blvWPWhDjiqnaq9VQIhAICK0F+8z0LTLbyHLHcHySAbhZSJlci62UOOzTnAaKiN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi78xUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpe/BAAnoRMXlai+x4zCp5jElaOLMRwiE19VbFHTJSbzdo5BkQojho3\r\nyF9ULV0H24C+FV231LYKtLdQMqDQLNPMWYVU8BgfNbWZcEooMgk6cnPCXENt\r\nRY1AM6kietCKpf+L1GrTHovb0//2AlSxC6VK6k1385BDxjDyxhOPba0dMabr\r\nbdX5sMgYhoBTxXGhuCR916tBj3emW7+d/jInusAU4T3iE0/qZtIk1KkbAQ8Z\r\nGzoNY18Wt6Q6JMnkjvWNq3LbCKkBvswFwa9mb3N4OvVtkpGZapKEnZjLCiw3\r\n0e9t63w8A/9nyyfsyuKpjsIfMvU+GQAb8Bwkyk7BnknJ1loZ/JiYlYY77esy\r\n92sGxakC4sA9wiKL+BfVZ/koYcQ75lCLsTzzFn6F1WDIWRVxyOaoEI0QC8ed\r\nUkM6E4zAZMD93tV3e/nuUxy82UicvKe84qxzjXkZKhy8KM8UethDSIqhRYfY\r\nQxXvBW69v86Eg2owlmIbl6ykOYUbyQtF6ArrH3l+Eo0l5gS/W+HvYI78T3ui\r\n1iuXofV6vn54RZ0/H6lQgSImwRoZOOa9y3hLV38beVjvCuT50U68UloQPC9S\r\nDdoW2BBaMXItis97oilMZCe3wtMeXNnCkDIKIGNstAAMM9WF6AMJfru2aLl8\r\nu2DoeIL6QbYr/zutI2L58DXfHlqdWqp8gco=\r\n=FBx1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_2.0.1_1659882580207_0.5057768338524891"},"_hasShrinkwrap":false},"2.1.0":{"name":"@libp2p/interface-pubsub","version":"2.1.0","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.0.0"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"5866e967cb081d476cdf77de751d85e33c456b66","_id":"@libp2p/interface-pubsub@2.1.0","_nodeVersion":"16.17.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-X+SIqzfeCO8ZDGrFTzH9EMwMf8ojW5nk20rxv3h1sCXEdfvyJCARZ51r9UlwJcnucnHqvFChfkbubAkrr3R4Cw==","shasum":"bf98d51c371018cd3d7d165dbc8e95f7cc1537d2","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-2.1.0.tgz","fileCount":8,"unpackedSize":28897,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZlS1Nhdr9dc5IQZeDjjnppgoOHOmkD+4rZahygKdXEAiAz24xIr+/PPQtCdXcZENUTSBJAWe5PZ8In6L3e7nc+eg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG1caACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrF2BAAjQAGZ/F9z3hEJO1bs4prj/nMBEfhx+NNGXkvGGFoN7xnQE8b\r\npvaeLAuQp6P+nx8MHba715P33RUCdkByZdoRlGHZ/EFXnLRuq8zXbjFT/DTj\r\n2iPdexMMkhdmfWq2S0xRuYGSbZHJXLzuUcVumLFqAFUgVdURkexvL8OhBXFX\r\n7Hu4+qT5PPcqqXwKhNeDyYgUiJcUUG10YvxYa15ZcXsKEqqj3HIdWeV+D/nL\r\narx8XMYYFxXjdxSZk3wn15ISr8Nams95YvSUmvwZQLHQdG4zjQs9+hISSbDC\r\nOg7ZooF8hFTrGs0gfxUCqyDdR7zg11iOCFbsEfyyfNIexYir39um3ffO9mZY\r\noQZCPcV+AJjwNtutlJpc81F1fNtSYxgZ3Lw37+k9XN0RF+zBATRJWYHa7zKB\r\npzUWWQT9bc98+vhOCMcN192BcDZOm7WNGYO3e1v+/po5fMROrGc4pnKbFgKB\r\nAaP0THcJz6eYhaQUpdqQg1IeW5LfwRRLSF4RaHU5nhWYvfkVrzYap+/M+77r\r\nRwIoirs5m1v0pW1TjklPrK7iwHK69W6E/16LgsqMsu9egodHF/yyLgSqU1i3\r\nGsmnzRw4uDJB7jAvgUlqhIwKr3vwgWzGGZEFlTBuDA7o5WbDFL4Oi/fHfHVe\r\nTEpdsK9SLBd54YMSwPBbqk1f1GJNYcd4Hss=\r\n=7Prt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_2.1.0_1662736154571_0.5566939655468772"},"_hasShrinkwrap":false},"3.0.0":{"name":"@libp2p/interface-pubsub","version":"3.0.0","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.0.0"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"e074f10944bdb1056b2bbc6d909989d6af8f3bb2","_id":"@libp2p/interface-pubsub@3.0.0","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-3ziZ/mNdCRlfdzSetu38nNbQU6u/rtpQtgI4S4iaSW7MTyivKscWDEPCo5DkF9Uck25hNCbYHhOyKDBoIMdr6Q==","shasum":"c25683178dd1ed7f7c07b2e59c0c8cbf36af83f5","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.0.tgz","fileCount":8,"unpackedSize":31010,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVVibsyWXqPHqgpvapB5B6PHf5ze2HTjj0EmaeiF+duAiEA7UkmASpazm1c/BP2FOOqOwg1RXLMhXLyLgnA7o/TuCg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRXB9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNNQ/7Bddlk/I3CpHwe2s9bInSEDv2W2oAh03clVlNZs1FcZHbPF2y\r\nJiHnqyJu/ROqxLM+nh8AHCcOGF91Bsoy6dsWqrHiuYqcdNhJkOkVwmUP7cAI\r\nvezQEQjKRqWAYj6x/8kHaXGSHka53d4hhBmESlQCalNn+aFvHWepyrjWqshB\r\nXXy0lgT/mYNxm149sJuC3PN2Mws4px0EFdHdFeXN0b5KYjOkiebKW7ML4ls3\r\nHTptf+UEjEbl5iR68K10PvHwnKnTXZOOb9qoGkn2ZuMcpxWfBhFGMmT/5yN/\r\n2k/XSlvnBuBhrctXF+aqXEIxmdsFCusjXxlnSAyzHTgo8x47USu+HR+F8KLw\r\n5ZeYMLvxdzh5Gbg5lLZyp4gWdhjUnVDJ/BwOg9nNhKuKEkYr3VFdCUKH231d\r\n4rKon+Kdbn4V+rMB2Zx0n5nzL7qfDPA5iRK7EDv7kfrWWr0fKN6CZW9LEciq\r\nwprtzluFBe2ooUbC+gJNG+dthIZVlV/I0bZdus4gcK7ik0TiyYUa4NTEqphC\r\n6yx9uEKYEJZjIJeV/nzOUqIly+dJIsR2zkUEbQ0/4Hi1Epkc0X2pZSG5oStL\r\n3Sc+TfOjSrfXDRvmY3VFjBfvBec02mfFWOh6YgHdRh2rPtiSE04bBK2M9C8k\r\nCgHDpljG8mXf9e67fPEavzL6VBYaywEJUuE=\r\n=xgDD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.0_1665495165405_0.11376262507062451"},"_hasShrinkwrap":false},"3.0.1":{"name":"@libp2p/interface-pubsub","version":"3.0.1","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^37.4.0"},"gitHead":"bc2744517c278e560d6a96e4ff6277667e7d58f8","_id":"@libp2p/interface-pubsub@3.0.1","_nodeVersion":"18.12.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-VLMr6Mn8e2m2moda3dGNbsAkWjPoENBebJIzFV7QDd9NOKwNiAs59vIoNi2n+y5XzUBmgBeKeFB8G03/m0NOdA==","shasum":"6146f03a2fc803cccacb331f674f2ba05af8038f","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.1.tgz","fileCount":8,"unpackedSize":30868,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhcQLELaXUP19PO/wGLXJ85BBfI+jiRp9bWtfSUWbKtAiEAprtaGtb8zvL7z6uF/Mj0ewoUw2iq6TB2PAwuf+CkY/w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZqrhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6fBAAobbNCLld7b4graGy28w5Obm7Lx5PD/Sle47heM7z8/CysJDr\r\nVolO6Ui9N/27eGOa5Le2dUuvXkj4Ks4wc1sq/1OHrk0pcRBZRbxJXXcOEtkS\r\n6d77fbdpmRgPSgVFH0ddG6hzexu6k1ZzfpWBrOQCxr+BxqN8unA3IsgZ1/OG\r\nrwgDpq8v/BMlS8PpZODh67Im/gtF4H+JdT9A0ah3KjdOX5SVsR4MTRixJUAo\r\ndCMvtqX44VeFjgjC1MAHJVAkkYj+Nr8B8MQZS6oSBlijG4DOFiyganw6m4UV\r\nJFhmEPCSLK22CnFYfyFuUFAlZ2906AMhfz1y+FTiaNi4/csUUNj9Er0mKyso\r\nAuyGmLIpWNhstoDM07YFdmpUj3zKnH143AlHlxhrvNsk/tA5d5tadOJ9X8MI\r\nnqYea+aCRqgaw4PrciB5iIL7HKoE/nx+jKxt71F1XhVXvHLz2+xEtaNVJf1Y\r\ncER8c+IK/xLTy/KtdjLiZvJHGUzr0qMXI/ak0Gs7tQqZow9oSrj9qQgNy/DP\r\nPoYDHbbjVO755qI3RmxP73mrKTw5Dt2XaNWag8uKEwswMv/t7qMEl9a8lLVH\r\n9ER0n28v8suJ3JaEkJrxV6VmlXzLEe4wCeOQBLm7vyn75gjO9TARgqYoEFPl\r\n0R/PlI7dP5+Aa3xVSgP9+0BghD4tSPZYOyc=\r\n=FUtJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.1_1667672801730_0.2677458287736654"},"_hasShrinkwrap":false},"3.0.2":{"name":"@libp2p/interface-pubsub","version":"3.0.2","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^37.7.3"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"1ce57e89eab6e09a797c065c68ec2be2b394f348","_id":"@libp2p/interface-pubsub@3.0.2","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ZcW1cycNcDBcNptmlVBj4DYoBpixp//xrT60ULI3HqwtNmUXlW2gFq5qR21HbPthcK2wqloDKQDk2dmy8azcSg==","shasum":"f671129f8289c1c7cc68f6233894d5a0cb5f1f36","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.2.tgz","fileCount":10,"unpackedSize":33995,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEx5nE4Wi3X0699K01CbuFFdsOqXo0ORgVE0sVBzmraAAiEA+2GyNpezPCBHi4u9K44y/Q7WICEpRWabWBcwEAgUgPY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmhk2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF0g/+OXS4uQB+CEqLjUjU/IvvZanKL9/SnfWlqr2eoo64kcsN6Fu4\r\ntg204ivat8eyEii4AEsfsStL51q7ft8UN/XSGc98BFlra+297qtBDa5t/c0w\r\nDDatPqUJFEBx3ZuOyFnJlUZK6XBhMn8HoGAqMGaLwt5KtJ4NpIehv78PxS6V\r\ngxEVzK91JP+4eXPrkFIprKKCZhLRs/x8FEHI8XrKYXCTZ5JnSFc36J+VYYAN\r\nsG73TyGIekoZenTup2JdM/WDptpdgOHWNTA7LO78gEU+kXt7lMUwzbLx0M3S\r\nUKYprwwJoZf4v5QXNyPDjuYbhOWRh0sBV0W6WKH5E3zL7dldvi7RFHNhy+GL\r\nsGZgbCor7+b0n2OwUqCObxD8wtoXn81S9AeG6ovuvc/HuNmsD+joScoH5oV+\r\n1dSRg5UYSpN6D8Q9FqrHiGtJ5IbYL/J/0BWyWyG0PH+N+5MSe8w1N/K7FKLo\r\nOYtAhrd6oSCVPKmEdghASItJcdZdKO01XPAitjpfSt9a6JyS8pvAcyF3c3z1\r\nAZLAFWdVAwJyCikMYdcb02QwqTUYgYpZorzP7eULFbhPkZrKHtnoG2NqHMVl\r\nTecGxNu4F5pXtxbuRlcr40swul2BaeTHboNkVfALZAfghwvsBjcxvlhoeNtq\r\n9ZR7YIhKD9MiPLubVjvcRrTo9mVR4XjKQ7I=\r\n=/mmz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.2_1671043382025_0.06530275116146078"},"_hasShrinkwrap":false},"3.0.3":{"name":"@libp2p/interface-pubsub","version":"3.0.3","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^37.7.3"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"20835fb3ae1e7ae9787537a029f766f2f26d046f","_id":"@libp2p/interface-pubsub@3.0.3","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-SzWE55UCjR7MVsUcf1e2y+tn/6HQyvs8GUg9hRXQIAZVbtJgoXvfHq2HkerRlEks4tsuoHwkMGTiERuODI8HUQ==","shasum":"5c90c7a72ede795c8b1ab3646a2105b2eab4c048","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.3.tgz","fileCount":10,"unpackedSize":34068,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBNijmGHepNNFbqFDlcUliMt2Of3R6fd3CSYiKzeWM9AiAw5Hb/M9SqB/dGwuMIKsdMos8I9bg0HxsjM1XuOB34DQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnEFxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmonew/+ONDtW0VQTav+hDgbZ8Lb8oyGmLJNv+tRgoAcPr4VM4yuQvgP\r\nwtgneHk2IxhQb0LxI8CQTIBoMZzlOg/2bVDe8cxJW4R2pOSk+GGkAtgtIapu\r\nyEGNVmhnfgj+s3d/5452+vYEQj1rvTyzow5SeaHr1q0QgperhA8s9mVDSq9A\r\nGEqoKm77AomI1xds63DKr/wuOINr6HgNN1d/sxUzSBsH//jZim17S2Ud2bx8\r\nUeQQF+abBdrgOBolzXI26rdWCArgIxAxqmb8LnUtu+8/hTPGCSNDTlez9ENX\r\nX6gaj923EQd6p2P3Qbipz8IY2XgbBMAULVMAoU9Do1uH4qCnfa/U2RE6i8+4\r\n0hHekWMh3+igZAUcWHXveC8ddvNJ/iR2805P5z4rHEHY6+kfgNhOPE6cafEY\r\neVqf06yERL3H748fXfZFc/rexMt988VvMoHWtlRK1IWUoW2TyaDhzsOxNA5T\r\nFzcwfifiYQ0APd0X1e/uxbiehGrq19y+lvvH9Yn5hreO8lX5JxlEAYuvE38U\r\nBn8rKihd2uPcLkJgGz70mT0mEPjXQ5GDXqKVENh+UDPDAg7u3ShbOFBPhVli\r\naKjefAA1cLkYl7KkpZ4XorwWkL6AlAhfUB7vhPg2sxxbc3+kiPgU/EqPmgtN\r\nFO/lyTOOVf0VopLJXgIbyYf71tG0+zXlU8s=\r\n=zkDz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.3_1671184753769_0.8353553617880041"},"_hasShrinkwrap":false},"3.0.4":{"name":"@libp2p/interface-pubsub","version":"3.0.4","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^1.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^37.7.3"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"b6618996e264b36770bb605a07d5094216084970","_id":"@libp2p/interface-pubsub@3.0.4","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-eiTQ8KBohKzfuBEckgSjr16/WOg38UsLcdUt9HUwQeqrinyUmBrB0NoFvAFsRZeZcv7FCGpi0SuOocjn+q31QQ==","shasum":"b3c99107e0c860ecbf30af565e54a3822b6fc1c4","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.4.tgz","fileCount":10,"unpackedSize":38651,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLzqlI2vjvUscZJRDE3cwVXd9zrdxZoSezoxk2GFlv+QIhAKlfkTrmKDQ+PNxlDohn6Qjc6GDOy8tUZbIqjTzg490/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoDyGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplHg/+PWUSU4Htr7EriNbFTrGkHrC744DhFbFoxWOR4Wzmz28QtlS9\r\nxlVjLaAdGV0spQV8zpJYMvCnwbHqYuuyalBHaQ1zBXAo6q33FelaCPVyJ2tN\r\n+o9YJz2Fvdj8jeaahaAVXmYGDBvvEBRIkh9NAil5Ec9jKKuiDxbE8YrHZ7PU\r\nHHifxYcW9R2kz9x8BnucJCASpiHnw95O1qToWoCR/UkQRU0lck05plrHXs7y\r\n2sU28w7Ryzc54odRfEd7RTLP0YOh3YMn8gNnDrhz9s5sJShe6wklm8MgPoBB\r\npCxmlvOHwWqofdNhqPOmRamQY9ZdB9NJRKywSxuQUL6rt1qjZtrLirnc/bkU\r\n7WLgeiZZhW9xB6NrZZLq2sOx/HGE/seEukYWNLlryNXdn4vV11GIhNSBAxrX\r\nw/vPY3zjC9elgPKdnjMjpbyp72TJ05+Li4JWCzG6MagWcVr9s84puBDYxJ4m\r\ncchHDX4DjUEgX2AoKBs9JCX13TmA1+j4DiREpSD3IEZ5ldagFdJ2fJslgUXU\r\nvLhgetb/gRjg0TJPy0aBQFaODR33A8c6uuBvcFvASDxMbYxBabcpw+ckJp06\r\nCMtroBymxBsSFQ4feVkPdtsV+wAEkFxyy2fYO64Jmm/li/YbxFe/du5iItqG\r\n9QGGNQm2Ltjv/tVJB9xcXatT9jghrdcZNDg=\r\n=iMLh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.4_1671445637906_0.7090678168210947"},"_hasShrinkwrap":false},"3.0.5":{"name":"@libp2p/interface-pubsub","version":"3.0.5","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^2.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^37.7.3"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"8a65c08c404ea31871ee95a050fae3a814627077","_id":"@libp2p/interface-pubsub@3.0.5","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-+DsqrkDeYBuokMCuqLvlsdq4D/Tcs9bwSHeNUw1V88ffZE+pqmMIYntyIpFoI4SCLOxqB8U1B5yAlF/OBuJFSw==","shasum":"f0c5af114aa0d26fc20ac0d32d24c2fb1f237523","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.5.tgz","fileCount":10,"unpackedSize":38871,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsDry7SG4RxlEU/m0GkenSWmWQbpUWybIGiShOGGPx0gIgXeBNRN0rK/uibeoN/NnUkCs+DN58VSqbR7UW0qDr9G4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuA8JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7fg/7BOINcH6oz1O0Wo+Ltz3BKVJ9MR5yZ3Xjn+ebjawicC8mWUET\r\n/izc0ySkQnQ2qNzEz3/3a//lzztLuBVI8ArsNxu8Jw3/+UaEuo9hxzeIj0c8\r\nQIDZFNWIltj/+yeYftnoEIxEcZiSoC3H8mvTH2gHI6saoCDNij09/zcR+5so\r\neskfkFq3JYok+2P8CaATYMt3oHfXkTHAcLIzkSd03dN8gsxivevWwCtNp1FI\r\nPAeESmkwW2dvEA3ctgQqSiK8ZrlAhScYEf+GRxyd630lK+E+Hm7P5P9RRREV\r\nOC9X166XX2RkYbjIdADc+OvzjH78YledxoEq8mlU1mWAgL2X+5XzJGsviaH+\r\n1rwG7Rl0r/FPK32o22M23HcxB16i7YvaK8/bgUC2sAeyCZJ8mWfj9Ym57uAi\r\n0upOcMtVCtc7zI9H4YCjIkQdPGOMWDaG5GYpGHF7iS3wUjk6uvhL7rFQpMhR\r\nRPaNTsYoIlvf1mON4BBpeSs113RKup1tzRmCXTuMp6/dR5ZTaOzz0vTtVt/D\r\nXs3oWuENlaljfGEHK+g64uhCMXjGIq8faEkqR7TpFDEYBzi9SBZFaVPBsReG\r\neNBHRlV18DqRn2vBovffEF3HCmctvz1aft+pOvbxW44fPeIadgDuyVxLW4hh\r\nRBrjGxTFMPumzqxfmj4scP+5WDaMHhyoDdY=\r\n=ZjqS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.5_1673006857175_0.6733700077951164"},"_hasShrinkwrap":false},"3.0.6":{"name":"@libp2p/interface-pubsub","version":"3.0.6","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^3.0.0","@libp2p/interface-peer-id":"^2.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^38.1.0"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"5b5c45dfb5a7711a6dfb413122d132459e6eccd8","_id":"@libp2p/interface-pubsub@3.0.6","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-c1aVHAhxmEh9IpLBgJyCsMscVDl7YUeP1Iq6ILEQoWiPJhNpQqdfmqyk7ZfrzuBU19VFe1EqH0bLuLDbtfysTQ==","shasum":"416f52d44ebc7e62e6b5caf086aff3e429e4a950","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.6.tgz","fileCount":10,"unpackedSize":38998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmHMqgnqgPkEzLaQjvuP5i7vrSDbPHTwOCCtBGN3xMEgIhAP+I5HTQaw4bT2SdIx9upkpyntq/tMl27mj185yPjA20"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx/tAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVRA/+ML2/J2Eg5E5CvaHI4UI/P+uezdF0crk7229Q4KbeAsmzqOEb\r\n1sLumjbiJqrZlWRAUIidKjjKfSBf9Gk+/ExzkhWZg5b6cZMr64jvIJ7YAOFQ\r\nMUwUy6NonYNupCzWMg5V4zQUwYUxSZd4lQC5AzWqJ0zKPKXD9N1EKHoFyYuJ\r\n7GnQYojC2NPoPHkM6gymAf//aWqtOl5YLYG89T5Gv/lk/XJ+uO24196fU6TQ\r\nW3Y7BCoUg/7xqK4ilOYw83woZE42EgpklZvU17NUZGSioEZiswQ0X/BXxGiR\r\nQBPSJMlzG+POlKqEUmKuyHN9ILkM395gpJjUXBmvSdwPbpecoQulM5I69zJ4\r\n8N2/tBoBlhpa6uOTQvZ2ZcDcdhNXSMAbnQJL8PwzK2VJG9FYHsd4iPTxBkWi\r\nQcOAGZG6pBkTFqoUR1O0nev08SjVNJLgBrqoLekfEpIq2rANVHhzSmqseu0f\r\nrjHq4SvVyfZxFTCBKvcNdmhkcNN4qMVsr5UvvjuK2TRX7TUQYItzq1kTRdt1\r\nf0ftdR3uBlXW/nbtjsT/OMZWBWjKtqUQND/hpeb+uTqt+NNaxeHywwy4Osun\r\n40nYi0XU89ymMOT5fP4pkDgD2Bup6b/fDF0fkTtgmWgzhmP3gJSzI/ZktPMj\r\nMnugLThA7h+JVemVsrM0qkRmkr0vGZQm4OA=\r\n=ly4R\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.6_1674050368767_0.06116738947673017"},"_hasShrinkwrap":false},"3.0.7":{"name":"@libp2p/interface-pubsub","version":"3.0.7","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^4.0.0","@libp2p/interface-peer-id":"^2.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.0.0","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^38.1.0"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"6ddeed94f74bd9a0e6f6424d62201e09ea2a7a96","_id":"@libp2p/interface-pubsub@3.0.7","_nodeVersion":"18.15.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-+c74EVUBTfw2sx1GE/z/IjsYO6dhur+ukF0knAppeZsRQ1Kgg6K5R3eECtT28fC6dBWLjFpAvW/7QGfiDAL4RA==","shasum":"cc1c7c47c883daddd2b84d83d719b3826943be3b","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.7.tgz","fileCount":10,"unpackedSize":38998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtE7opKkmforIoXL0dH13VW0+gwpoHZQkdYClHkIQugAiBh4wa/4Yk3H3TvqzRA6C8grLnK2u4iajcNVJ8l0cYH/g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNXZWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroHg/+Kx/sQ1i/cFn1mn2Lk0gNdcjVyOG4qvJlA8xiHlmwKZOovGgi\r\nF86N51Z0khupgsG0Hd/7+qPgrKv3dnI6v68WmweX9wOwyAOjbMKLnhw+x+hy\r\n3JpKuVWLYY5hia7UhZ0xUy1taQ5HUbdDVGxVigIR7BcSVSraybKOePLZqFpG\r\nO/PCuJIktSShkH8iL9h2djt/BcBOXJt9hIxmVji8v7tYZxbqQ9nK5QIcmIZ7\r\neI78VvuWgBDIFfixubwhuGfgQgAJiHcnHWVMRpgqus7tfowXmzGA2/5xzAa6\r\na9oPWe9nuu+vh03ZToFlG/wqQ1NvQaRuM1fgIMtSv49LBRXRSlgUf7G3+swJ\r\njYWPGZvX2kMoN3+1cmxof/Kad2nBiyRXb916265WZX+vq7NSBldA7tDvOiv9\r\njh8crgBFt1R7HiO377HTZz0CBzjZ75pHOSPd9xu7ArUoGpMnnSFqk+Q+k5qo\r\nYS9nI0DhfWmJCQOxpJb1/QVMwj7cbOVavlC5X73K9r9PLRK/wl17xszO5iuP\r\nHdi9mO0yBwHtRN2Y2vH8k0WxdDD+QavPu9n0g/dElq5Ec4jXS3kcXn7Oq7ME\r\nxEnU9OcPJPNQ9PiRycdPSJKuzDLmBmdSUEmtoV4SIWssG1Bu2444pIEdmo4l\r\nhrrf65zFf+ABjQ1L63zSmqRuFYIZlyBz+d4=\r\n=IcvA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_3.0.7_1681225302098_0.31254034499698613"},"_hasShrinkwrap":false},"4.0.0":{"name":"@libp2p/interface-pubsub","version":"4.0.0","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^5.0.0","@libp2p/interface-peer-id":"^2.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.1.3","uint8arraylist":"^2.1.2"},"devDependencies":{"aegir":"^38.1.0"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"b0054a2899129fad185dca8bebfe6a03d6ffc99d","_id":"@libp2p/interface-pubsub@4.0.0","_nodeVersion":"18.15.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-BvyQv1v6OZhKb+U/xpWz278Qsq+KDh4iMzIOq8HQr9lABrRDQWz0pTgeg5qCnChg+5eJW7K5BYFAgcpAf5zo4g==","shasum":"cf7edaec505989b1423ca0fd4d06bbe3d0aab9af","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.0.tgz","fileCount":10,"unpackedSize":38998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEcnmFyYrkUrjKmel67ibScrTo23VsYGEoR0ih4J0UwNAiEA6Fk4wLNEDXgWu/jrWPhCvh37vp5FkZJ/Tuu3bYxO9g4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPsYjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFiw/5AMDAfOZrIcIxMwi8H4aF5HFkccFCuDFX3kjPUDzc8aZOi5BR\r\nZ1kOLEthss4uv8tqYdmaY8mXl52JHm9PF1IGVmN5Gebzk2mT2Gvpn1zv+Z+a\r\nsLUBaBog8gtnBAy7z5L+zofvPmr6ZaFMOtGSTQBwRKEii0RZYj/cLbdeBZ+Z\r\npdf5MA8emVOiVwA5ckbP+YO+Lg8NRqLjkZJ1G0WkF5KvwF4BFsBmuHY7bOBK\r\nNR1Q1/6bhIFCl/D8iW3RbTYx/SojcJ0pqadYKNMWecjKHnI0qiYPJZGByGjR\r\nct2MPjG+Cn7wV/oLFZiq5oxHh+U5BtGjxDl5TOguulnVgWtfRVaAdfDn/6yd\r\nuj4Hu8Z3WNSWL+RG1Td5DaqcTPP/vQViv2vVn+QiTRpFb2rx45W2SAzZBIFo\r\nqo57YCL1Pc35pZAc/En7W2fjmvwZwcflocfyG2h13T/g+PcgeKavOpuNZF77\r\ngagqaHGU7YYRRzKYboFxILfYxyFwj6vKsYktkgolQHPj4IHiFX3vobVD4VuQ\r\nhT1O9GqHi+TjmzKV07A6QbIK3lTzRKrrVifXPXnF+EsaaAzULuOEBVGjuyYZ\r\nCRDwq2H12UAFR9stfptqsu5PQl3iabg4ab11LasQPGrwylHIQhyRQf6dTfxL\r\nYQZCMjeiSsidx5YEW02FoQskAlcGmNIdE00=\r\n=oJDl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.0_1681835555468_0.24028090187011997"},"_hasShrinkwrap":false},"4.0.1":{"name":"@libp2p/interface-pubsub","version":"4.0.1","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"keywords":["interface","libp2p"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"^5.0.0","@libp2p/interface-peer-id":"^2.0.0","@libp2p/interfaces":"^3.0.0","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"gitHead":"f70eb42273e34e8bc7d49ebbc027305d63d8d99f","_id":"@libp2p/interface-pubsub@4.0.1","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-PIc5V/J98Yr1ZTHh8lQshP7GdVUh+pKNIqj6wGaDmXs8oQLB40qKCjcpHQNlAnv2e1Bh9mEH2GXv5sGZOA651A==","shasum":"27f85b43ced13cf3382629a38f309f7fc7b45bec","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1.tgz","fileCount":10,"unpackedSize":38988,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEt8660q6cSUcDPsameSDaxzO3RuS1RFcBPYMV+WstvWAiEAlrmpsphe9XHw6ebf29AdqnyCE7jaQnk/uikLDHKNbs0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU+cEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJKxAAjenYjLcLws4l1Bz3iuCbolGRXb+UWi2TZ+IwiwIa5vfGpaNB\r\n5xj7c5xBa8KO2jlScnLoqQLUMZKPqjnvdGohQLDGHLE1MiJnQmVOj1NbUd5Z\r\nFqRMmFMBO1MaNrV2fHFs5GOnBSbFYcf0MLVun7OpjnA2k3SQBpslfgk5AUsI\r\ndTQxEDXAe3areivShjhR9j+5+wkhtDOfG+fY5FUMcxBnQPgU1+ufF6RoSwT7\r\nJDZnEhflP+f6fNaasFtyruzP5Z3Z/QUYHwHH/UIO+Bkuuny2ZZlYpNMvLe2U\r\nS+axgfFprcXl3RU7yYPWJb6wqGjmQZdxEa2owSwojBtivctFis3pCHFY7Vpx\r\ne1+n44N8p0h67JNs6mDxcBH1u8gDGvVf2blesQHeNHCvicFmnkc6i0wv8T6g\r\nETOxmT3j9SpvmFh1Q4+TwQbUyivutJWf25SlnVjuRayba2noNeRUmfrGvyuv\r\nXKlxkteegSw1JjsgEQ3aIcWL1cLfo4sc1JAes1MqE4eAFv68LxML597Ys597\r\nPm9la9puptj/u930TGCNo3j715ffXOMT0JJ7pbpWsqRONELO3S9L6gVMxG9G\r\nPCXNp2q4E0eMieOv1U5nf5gnjXfGx420Sp6w+tT6rJe06+oBJxs2zHSV5HbQ\r\nss7E+q6c5OJkXvErCyDIsq60S7x3a6+M014=\r\n=8HBr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1_1683220228228_0.9227847155416773"},"_hasShrinkwrap":false},"4.0.1-1c6702c8":{"name":"@libp2p/interface-pubsub","version":"4.0.1-1c6702c8","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","release":"aegir release"},"dependencies":{"@libp2p/interface-connection":"5.1.1-1c6702c8","@libp2p/interface-peer-id":"2.0.2-1c6702c8","@libp2p/interfaces":"3.3.2-1c6702c8","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"1c6702c8a48a25e97910c0821f748802edf9ac42","_id":"@libp2p/interface-pubsub@4.0.1-1c6702c8","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OfKa4Y1ngoB2HeBfGuSc1RemzWk7MGCuq/MfFLB3/s0mNVHvUgUDSFFKwSHqYyt+fQJUYCBC72Bc9aKnpdegjw==","shasum":"dbfaf8d95e9c65009324adacd7c4340f2a660233","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-1c6702c8.tgz","fileCount":9,"unpackedSize":36398,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9Dg5RZ+UF1rA5UU4S+Z0h6/HS7zcjLH2NfWL+Syqm4AiEA2xAIJ+at/fUVuSiIRpES1r88M5Ft0zVVSjuK/KYfckg="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-1c6702c8_1686816653580_0.8839993703842364"},"_hasShrinkwrap":false},"4.0.1-883082ca":{"name":"@libp2p/interface-pubsub","version":"4.0.1-883082ca","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-883082ca","@libp2p/interface-peer-id":"2.0.2-883082ca","@libp2p/interfaces":"3.3.2-883082ca","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"883082ca284b346cd5c232236356773d97b78d8b","_id":"@libp2p/interface-pubsub@4.0.1-883082ca","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-L2YOV8JQijN5GL27FF982L5wq5w+ejU0UEiiAjlFRL3MSR29xg233jFMS2sPZc3/8BTvcNysVHU5/J+AbgTKxA==","shasum":"f6383a21fdb226aa8d735b7dd2d742c73d915908","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-883082ca.tgz","fileCount":9,"unpackedSize":36366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyJ0QPagQajsB6SQu5m1DhOVtcm52eRc+FAvicpp14GAIgTE+2sAdAQaszbeAgL/Oqt65Op0bX+lu2/02iFLyNKkc="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-883082ca_1686821812368_0.9775247355503505"},"_hasShrinkwrap":false},"4.0.1-5a9fb4d6":{"name":"@libp2p/interface-pubsub","version":"4.0.1-5a9fb4d6","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-5a9fb4d6","@libp2p/interface-peer-id":"2.0.2-5a9fb4d6","@libp2p/interfaces":"3.3.2-5a9fb4d6","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"5a9fb4d6855b24a4bd63c6b94a5c13d03d7e7ce9","_id":"@libp2p/interface-pubsub@4.0.1-5a9fb4d6","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-me7o8oThym1ZMnc/T1EAKUeorMf1oqwl9mfUz2sA5CGLqUUQczmt+1O9sL2gcs3rQXylZ32rDIEZh9zvrqnlBA==","shasum":"216ff70f65416513bb164494a2aff58636c7167f","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-5a9fb4d6.tgz","fileCount":9,"unpackedSize":36366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcW3TSfmaC88uPVFyCx6Us6a9xypb3+TqLO/tQ3O9CLwIgbYetLxOFlKMmQFsQhoNti4VrbTQHBe23yT4H/GhRVyc="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-5a9fb4d6_1686825305829_0.9766394727099084"},"_hasShrinkwrap":false},"4.0.1-d2f1eff4":{"name":"@libp2p/interface-pubsub","version":"4.0.1-d2f1eff4","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-d2f1eff4","@libp2p/interface-peer-id":"2.0.2-d2f1eff4","@libp2p/interfaces":"3.3.2-d2f1eff4","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"d2f1eff45ca2dd30c98497bb5dcbc3fb33496b6d","_id":"@libp2p/interface-pubsub@4.0.1-d2f1eff4","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-mck634K5lLWHu6vLpykNysczk/KJioThdU6iP0YOX9BRIoI+fIKbS0LHparEGjhujbYulVoHSaZvEQkfZIIoFg==","shasum":"a678ba9b59f2b05ed941065219ed76c5e76a9136","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-d2f1eff4.tgz","fileCount":9,"unpackedSize":36366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEKs7WVZmbGvS5zciidWgQwG5pz0cWERyZj8ZeR7weKAIgQa1VvMYgN32fJ0UlHLs1fHnJB8ExWoFd3u/cc3jiS1I="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-d2f1eff4_1686830971433_0.6243156821693381"},"_hasShrinkwrap":false},"4.0.1-8c6b6d24":{"name":"@libp2p/interface-pubsub","version":"4.0.1-8c6b6d24","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-8c6b6d24","@libp2p/interface-peer-id":"2.0.2-8c6b6d24","@libp2p/interfaces":"3.3.2-8c6b6d24","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.5"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"8c6b6d2404d403104d244628def748397733dcd4","_id":"@libp2p/interface-pubsub@4.0.1-8c6b6d24","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-bPPfvBDdw/HFzh1deygwPPOsU+y08BRyoVNhUTqJHbwS7lvsj0MJ9wuPdVQub/L768z3ggKQwmUoUKjjqDBj/Q==","shasum":"aa3716cd0226f85cb5610aefc7ffabe36a3b112d","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-8c6b6d24.tgz","fileCount":9,"unpackedSize":36366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQAD0InWbxDsh0iYtE+Zd4cAy2RaCgnfR8dh2+F8/A9AiEA/kArr+60OQ0ncsTL/WQMeky6m6UDaw3o2nYlXsHdlBg="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-8c6b6d24_1686832607582_0.3827206736510267"},"_hasShrinkwrap":false},"4.0.1-3dfc236e":{"name":"@libp2p/interface-pubsub","version":"4.0.1-3dfc236e","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-3dfc236e","@libp2p/interface-peer-id":"2.0.2-3dfc236e","@libp2p/interfaces":"3.3.2-3dfc236e","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.10"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"3dfc236e1789fb5c1e9d96189483a71124ad1bf4","_id":"@libp2p/interface-pubsub@4.0.1-3dfc236e","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-xUvd5hjV0lbBrGpaMK+jqAXSoMYZcmPDQsVPyvNVMsztbi5TPZEkrVvE34U+1DgYuGfti+SSK+tHFg7j8hRA+w==","shasum":"aebaf563ac529cbbc3bb6396db22fcc8fba28924","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-3dfc236e.tgz","fileCount":9,"unpackedSize":34405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfon/zuSdrfMTyT+AcmuHGW82lgsYbYaF+L1n3Yf6AkAiBNfL+zoFvdd5sNZ5uaO8Gfol/Rx6c5ojrdJLcd0dnsdQ=="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-3dfc236e_1686922990740_0.9542919090682385"},"_hasShrinkwrap":false},"4.0.1-ab0e3980":{"name":"@libp2p/interface-pubsub","version":"4.0.1-ab0e3980","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-ab0e3980","@libp2p/interface-peer-id":"2.0.2-ab0e3980","@libp2p/interfaces":"3.3.2-ab0e3980","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.10"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"ab0e3980160dcbacf00825cfc4c6ba1d0c07a20c","_id":"@libp2p/interface-pubsub@4.0.1-ab0e3980","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-MblMC1pi71QuE8xXB70FCLAstmyo5y87pQ8iS3K5qppPdurHHMbdDIDzNjiqm77VVqYWFAxRlU187UuCjWTKBQ==","shasum":"fc3197cc4be9050191959141f57aecd7ec794a4b","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-ab0e3980.tgz","fileCount":9,"unpackedSize":34405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuiL9ptDzl5u05N+QaqlK3XMUQjhFaPzuRdop5YSPN3gIgYAcxl2qipoPAnC09kdoVmbp5BchIwFxb5nHXpibFrOE="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-ab0e3980_1687168990678_0.6877783442622956"},"_hasShrinkwrap":false},"4.0.1-ea8a0637":{"name":"@libp2p/interface-pubsub","version":"4.0.1-ea8a0637","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-ea8a0637","@libp2p/interface-peer-id":"2.0.2-ea8a0637","@libp2p/interfaces":"3.3.2-ea8a0637","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.10"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"ea8a06378d6733c0bcac28bed3aa3baef1e30ead","_id":"@libp2p/interface-pubsub@4.0.1-ea8a0637","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-z6BtacuH8Y+unuA0u+7Xyi+gNnlwqy2mbgJYFs4imRwgB4t7356UbZyndMYuf2FsAQQeqFyVONMjzaubowTDDg==","shasum":"979af83970ce33678865e23f8478af06b811a611","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-ea8a0637.tgz","fileCount":9,"unpackedSize":34405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDjXM/Jd07KeMfKSHZ8pEMtK5xVf7NPxneydPPlpRZqAiBI4tQm9mR1yOSLpiZQ1y9Gt0ckwhq4JSllD3vd4XASTA=="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-ea8a0637_1687170462545_0.08961926209824655"},"_hasShrinkwrap":false},"4.0.1-d853d124":{"name":"@libp2p/interface-pubsub","version":"4.0.1-d853d124","description":"PubSub interface for libp2p","license":"Apache-2.0 OR MIT","homepage":"https://github.com/libp2p/js-libp2p/tree/master/packages/interface-pubsub#readme","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"keywords":["interface","libp2p"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build"},"dependencies":{"@libp2p/interface-connection":"5.1.1-d853d124","@libp2p/interface-peer-id":"2.0.2-d853d124","@libp2p/interfaces":"3.3.2-d853d124","it-pushable":"^3.1.3","uint8arraylist":"^2.4.3"},"devDependencies":{"aegir":"^39.0.10"},"typedoc":{"entryPoint":"./src/index.ts"},"readme":"# @libp2p/interface-pubsub <!-- omit in toc -->\n\n[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)\n[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)\n[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)\n\n> PubSub interface for libp2p\n\n## Table of contents <!-- omit in toc -->\n\n- - [Install](#install)\n- [Table of Contents <!-- omit in toc -->](#table-of-contents----omit-in-toc---)\n  - [Implementations using this interface](#implementations-using-this-interface)\n  - [Interface usage](#interface-usage)\n    - [Extend interface](#extend-interface)\n    - [Example](#example)\n  - [API](#api)\n    - [Constructor](#constructor)\n      - [`new Pubsub({options})`](#new-pubsuboptions)\n        - [Parameters](#parameters)\n    - [Start](#start)\n      - [`pubsub.start()`](#pubsubstart)\n    - [Stop](#stop)\n      - [`pubsub.stop()`](#pubsubstop)\n    - [Publish](#publish)\n      - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n        - [Parameters](#parameters-1)\n        - [Returns](#returns)\n    - [Subscribe](#subscribe)\n      - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n        - [Parameters](#parameters-2)\n    - [Unsubscribe](#unsubscribe)\n      - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n        - [Parameters](#parameters-3)\n    - [Get Topics](#get-topics)\n      - [`pubsub.getTopics()`](#pubsubgettopics)\n        - [Returns](#returns-1)\n    - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n      - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n        - [Parameters](#parameters-4)\n        - [Returns](#returns-2)\n    - [Validate](#validate)\n      - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n        - [Parameters](#parameters-5)\n      - [Returns](#returns-3)\n  - [Test suite usage](#test-suite-usage)\n  - [API Docs](#api-docs)\n  - [License](#license)\n  - [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @libp2p/interface-pubsub\n```\n\nThe `interface-pubsub` contains the base implementation for a libp2p pubsub router implementation. This interface should be used to implement a pubsub router compatible with libp2p. It includes a test suite that pubsub routers should run, in order to ensure compatibility with libp2p.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Implementations using this interface](#implementations-using-this-interface)\n- [Interface usage](#interface-usage)\n  - [Extend interface](#extend-interface)\n  - [Example](#example)\n- [API](#api)\n  - [Constructor](#constructor)\n    - [`new Pubsub({options})`](#new-pubsuboptions)\n      - [Parameters](#parameters)\n  - [Start](#start)\n    - [`pubsub.start()`](#pubsubstart)\n  - [Stop](#stop)\n    - [`pubsub.stop()`](#pubsubstop)\n  - [Publish](#publish)\n    - [`pubsub.publish(topic, message)`](#pubsubpublishtopic-message)\n      - [Parameters](#parameters-1)\n      - [Returns](#returns)\n  - [Subscribe](#subscribe)\n    - [`pubsub.subscribe(topic)`](#pubsubsubscribetopic)\n      - [Parameters](#parameters-2)\n  - [Unsubscribe](#unsubscribe)\n    - [`pubsub.unsubscribe(topic)`](#pubsubunsubscribetopic)\n      - [Parameters](#parameters-3)\n  - [Get Topics](#get-topics)\n    - [`pubsub.getTopics()`](#pubsubgettopics)\n      - [Returns](#returns-1)\n  - [Get Peers Subscribed to a topic](#get-peers-subscribed-to-a-topic)\n    - [`pubsub.getSubscribers(topic)`](#pubsubgetsubscriberstopic)\n      - [Parameters](#parameters-4)\n      - [Returns](#returns-2)\n  - [Validate](#validate)\n    - [`pubsub.validate(message)`](#pubsubvalidatemessage)\n      - [Parameters](#parameters-5)\n    - [Returns](#returns-3)\n- [Test suite usage](#test-suite-usage)\n- [License](#license)\n  - [Contribution](#contribution)\n\n## Implementations using this interface\n\nYou can check the following implementations as examples for building your own pubsub router.\n\n- [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub)\n- [ChainSafe/js-libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub)\n\n## Interface usage\n\n`interface-pubsub` abstracts the implementation protocol registration within `libp2p` and takes care of all the protocol connections and streams, as well as the subscription management and the features describe in the libp2p [pubsub specs](https://github.com/libp2p/specs/tree/master/pubsub). This way, a pubsub implementation can focus on its message routing algorithm, instead of also needing to create the setup for it.\n\n### Extend interface\n\nA pubsub router implementation should start by extending the `interface-pubsub` class and **MUST** override the `_publish` function, according to the router algorithms. This function is responsible for forwarding publish messages to other peers, as well as forwarding received messages if the router provides the `canRelayMessage` option to the base implementation.\n\nOther functions, such as `start`, `stop`, `subscribe`, `unsubscribe`, `_encodeRpc`, `_decodeRpc`, `_processRpcMessage`, `_addPeer` and `_removePeer` may be overwritten if the pubsub implementation needs to customize their logic. Implementations overriding these functions **MUST** call `super`.\n\nThe `start` and `stop` functions are responsible for the registration of the pubsub protocol with libp2p. The `stop` function also guarantees that the open streams in the protocol are properly closed.\n\nThe `subscribe` and `unsubscribe` functions take care of the subscription management and its inherent message propagation.\n\nWhen using a custom protobuf definition for message marshalling, you should override `_encodeRpc` and `_decodeRpc` to use the new protobuf instead of the default one.\n\n`_processRpcMessage` is responsible for handling messages received from other peers. This should be extended if further operations/validations are needed by the router.\n\nThe `_addPeer` and `_removePeer` functions are called when new peers running the pubsub router protocol establish a connection with the peer. They are used for tracking the open streams between the peers.\n\nAll the remaining functions **MUST NOT** be overwritten.\n\n### Example\n\nThe following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic.\n\n```JavaScript\nconst Pubsub = require('libp2p-interfaces/src/pubsub')\n\nclass PubsubImplementation extends Pubsub {\n  constructor({ libp2p, options })\n    super({\n      debugName: 'libp2p:pubsub',\n      multicodecs: '/pubsub-implementation/1.0.0',\n      libp2p,\n      globalSigningPolicy: options.globalSigningPolicy\n    })\n  }\n\n  _publish (message) {\n    // Required to be implemented by the subclass\n    // Routing logic for the message\n  }\n}\n```\n\n## API\n\nThe interface aims to specify a common interface that all pubsub router implementation should follow. A pubsub router implementation should extend the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). When peers receive pubsub messages, these messages will be emitted by the event emitter where the `eventName` will be the `topic` associated with the message.\n\n### Constructor\n\nThe base class constructor configures the pubsub instance for use with a libp2p instance. It includes settings for logging, signature policies, etc.\n\n#### `new Pubsub({options})`\n\n##### Parameters\n\n| Name                          | Type                             | Description                                     | Default              |\n| ----------------------------- | -------------------------------- | ----------------------------------------------- | -------------------- |\n| options.libp2p                | `Libp2p`                         | libp2p instance                                 | required, no default |\n| options.debugName             | `string`                         | log namespace                                   | required, no default |\n| options.multicodecs           | `string \\| Array<string>`        | protocol identifier(s)                          | required, no default |\n| options.globalSignaturePolicy | `'StrictSign' \\| 'StrictNoSign'` | signature policy to be globally applied         | `'StrictSign'`       |\n| options.canRelayMessage       | `boolean`                        | if can relay messages if not subscribed         | `false`              |\n| options.emitSelf              | `boolean`                        | if `publish` should emit to self, if subscribed | `false`              |\n\n### Start\n\nStarts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.\n\n#### `pubsub.start()`\n\n### Stop\n\nStops the pubsub subsystem. The protocol will be unregistered from `libp2p`, which will remove all listeners for the protocol and the established connections will be closed.\n\n#### `pubsub.stop()`\n\n### Publish\n\nPublish data message to pubsub topics.\n\n#### `pubsub.publish(topic, message)`\n\n##### Parameters\n\n| Name    | Type         | Description        |\n| ------- | ------------ | ------------------ |\n| topic   | `string`     | pubsub topic       |\n| message | `Uint8Array` | message to publish |\n\n##### Returns\n\n| Type            | Description                                           |\n| --------------- | ----------------------------------------------------- |\n| `Promise<void>` | resolves once the message is published to the network |\n\n### Subscribe\n\nSubscribe to the given topic.\n\n#### `pubsub.subscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Unsubscribe\n\nUnsubscribe from the given topic.\n\n#### `pubsub.unsubscribe(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n### Get Topics\n\nGet the list of topics which the peer is subscribed to.\n\n#### `pubsub.getTopics()`\n\n##### Returns\n\n| Type            | Description                |\n| --------------- | -------------------------- |\n| `Array<String>` | Array of subscribed topics |\n\n### Get Peers Subscribed to a topic\n\nGet a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.\n\n#### `pubsub.getSubscribers(topic)`\n\n##### Parameters\n\n| Name  | Type     | Description  |\n| ----- | -------- | ------------ |\n| topic | `string` | pubsub topic |\n\n##### Returns\n\n| Type            | Description               |\n| --------------- | ------------------------- |\n| `Array<string>` | Array of base-58 PeerId's |\n\n### Validate\n\nValidates a message according to the signature policy and topic-specific validation function.\n\n#### `pubsub.validate(message)`\n\n##### Parameters\n\n| Name    | Type      | Description      |\n| ------- | --------- | ---------------- |\n| message | `Message` | a pubsub message |\n\n#### Returns\n\n| Type            | Description                      |\n| --------------- | -------------------------------- |\n| `Promise<void>` | resolves if the message is valid |\n\n## Test suite usage\n\n```js\n'use strict'\n\nconst tests = require('libp2p-interfaces-compliance-tests/pubsub')\nconst YourPubsubRouter = require('../src')\n\ndescribe('compliance', () => {\n  let peers\n  let pubsubNodes = []\n\n  tests({\n    async setup (number = 1, options = {}) {\n      // Create number pubsub nodes with libp2p\n      peers = await createPeers({ number })\n\n      peers.forEach((peer) => {\n        const ps = new YourPubsubRouter(peer, options)\n\n        pubsubNodes.push(ps)\n      })\n\n      return pubsubNodes\n    },\n    async teardown () {\n      // Clean up any resources created by setup()\n      await Promise.all(pubsubNodes.map(ps => ps.stop()))\n      peers.length && await Promise.all(peers.map(peer => peer.stop()))\n    }\n  })\n})\n```\n\n## API Docs\n\n- <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_pubsub.html>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","gitHead":"d853d1247f90317966bc95bd56f56dac0e9fee88","_id":"@libp2p/interface-pubsub@4.0.1-d853d124","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-pLuap+OEmocaDuXlmzkCOoTPziAE1XWlE2Rv4YeTSX8oqXq+7ggbX78Usy/iXaGkIm+29l5tn9OLxclO07qzbA==","shasum":"834e41c756fdec31a19106444d97bfcdf77aa80c","tarball":"https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-4.0.1-d853d124.tgz","fileCount":9,"unpackedSize":34405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDut0viQ0UTwZyfiAr2nj7z4hGQpIQRWR1Ap3v5vBztIwIgCKw3uU1boKAtao7cDUBYxnybPfVzDyXMDeS0S7VpgvI="}]},"_npmUser":{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/interface-pubsub_4.0.1-d853d124_1687182512102_0.9587726781822232"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-10T08:23:15.393Z","0.0.0":"2022-06-10T08:23:15.613Z","modified":"2023-06-19T13:48:32.397Z","1.0.0":"2022-06-14T15:03:05.285Z","1.0.1":"2022-06-14T17:42:46.532Z","1.0.2":"2022-06-16T17:26:19.579Z","1.0.3":"2022-06-17T07:39:12.103Z","1.0.4":"2022-06-27T17:16:02.562Z","2.0.0":"2022-07-31T09:54:55.267Z","2.0.1":"2022-08-07T14:29:40.366Z","2.1.0":"2022-09-09T15:09:14.723Z","3.0.0":"2022-10-11T13:32:45.614Z","3.0.1":"2022-11-05T18:26:41.900Z","3.0.2":"2022-12-14T18:43:02.261Z","3.0.3":"2022-12-16T09:59:13.925Z","3.0.4":"2022-12-19T10:27:18.045Z","3.0.5":"2023-01-06T12:07:37.343Z","3.0.6":"2023-01-18T13:59:28.948Z","3.0.7":"2023-04-11T15:01:42.291Z","4.0.0":"2023-04-18T16:32:35.659Z","4.0.1":"2023-05-04T17:10:28.401Z","4.0.1-1c6702c8":"2023-06-15T08:10:53.756Z","4.0.1-883082ca":"2023-06-15T09:36:52.562Z","4.0.1-5a9fb4d6":"2023-06-15T10:35:06.038Z","4.0.1-d2f1eff4":"2023-06-15T12:09:31.817Z","4.0.1-8c6b6d24":"2023-06-15T12:36:47.752Z","4.0.1-3dfc236e":"2023-06-16T13:43:10.985Z","4.0.1-ab0e3980":"2023-06-19T10:03:10.891Z","4.0.1-ea8a0637":"2023-06-19T10:27:42.757Z","4.0.1-d853d124":"2023-06-19T13:48:32.239Z"},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"},{"name":"npm-service-account-libp2p","email":"npm-service-account+libp2p@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"daviddias","email":"mail@daviddias.me"}],"description":"PubSub interface for libp2p","homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-pubsub#readme","keywords":["interface","libp2p"],"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"license":"Apache-2.0 OR MIT","readme":"","readmeFilename":""}