refactor: async identify and identify push (#473)

* chore: add missing dep

* feat: import from identify push branch

https://github.com/libp2p/js-libp2p-identify/tree/feat/identify-push

* feat: add the connection to stream handlers

* refactor: identify to async/await

* chore: fix lint

* test: add identify tests

* refactor: add identify to the dialer flow

* feat: connect identify to the registrar

* fix: resolve review feedback

* fix: perform identify push when our protocols change
This commit is contained in:
Jacob Heun
2019-11-07 12:11:50 +01:00
parent 9d52b80c45
commit c7a54f34f7
15 changed files with 674 additions and 174 deletions

6
src/identify/consts.js Normal file
View File

@ -0,0 +1,6 @@
'use strict'
module.exports.PROTOCOL_VERSION = 'ipfs/0.1.0'
module.exports.AGENT_VERSION = 'js-libp2p/0.1.0'
module.exports.MULTICODEC_IDENTIFY = '/ipfs/id/1.0.0'
module.exports.MULTICODEC_IDENTIFY_PUSH = '/ipfs/id/push/1.0.0'