Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get current peerID #57

Open
zrg-team opened this issue Sep 4, 2018 · 1 comment
Open

Get current peerID #57

zrg-team opened this issue Sep 4, 2018 · 1 comment

Comments

@zrg-team
Copy link

zrg-team commented Sep 4, 2018

can i get current peer id ? after

room.on('subscribed', () => {
    console.log('Now connected!')
})
@WesleyDRobinson
Copy link

The peer id (ipfs node id) is available after the 'ready' event.

node1 = new IPFS(options)
node1.once('ready', () => {
node1.id((err, info) => {
expect(err).to.not.exist()
id1 = info.id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants