-
Notifications
You must be signed in to change notification settings - Fork 6
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
Where Ipfs: https://github.com/cretz/webrtc-ipfs-signaling/blob/master/browser.js#L15 comes from? #4
Comments
You have to remember you're looking at a really old POC, so you have to get the versions right. The HTML references 0.34.4, so that is https://github.com/ipfs/js-ipfs/blob/v0.34.4/src/core/index.js#L62 |
Hi @cretz ! But using the 'create' function as follows in browser.js:
Leads to this error, when calling newIPFS function within Offer.vue :
Pointing to this line in Offer.vue : And to this line in browser.js : I haven't found the equivalent of ipfs.on in core-api: https://github.com/ipfs/js-ipfs/tree/master/docs/core-api . What is the purpose of function newIPFS https://github.com/cretz/webrtc-ipfs-signaling/blob/master/browser.js#L14 ? I'm trying to understand how to "convert" it to the latest version of js-ipfs |
I'm not sure you should try to convert my code exactly here...rather, you should instead understand what is needed if you were to write it from scratch yourself (posting offers and answers to the same readable space). Re-reading the code again (this is proof-of-concept toy code from over a year ago), the purpose of that call is to return a promise w/ the IPFS object. |
May be I'm oversimplifying, but based on what is stated here: https://www.html5rocks.com/en/tutorials/webrtc/infrastructure/ what constitutes a signaling service is a messaging service to exchange session metadata and application data. |
You have linked to a server-side nodejs example, this POC is all in-browser |
Sorry for the mistake. Tomorrow morning I'm going to dive into libp2p and PubSub in order to try to use them together as messaging service to exchange session metadata and application data between peers. |
I'm trying to use your excellent work as starting base for webrtc-signaling,
but, in order to understand and correctly use the function newIPFS, I need to understand where Ipfs: https://github.com/cretz/webrtc-ipfs-signaling/blob/master/browser.js#L15 comes from.
I didn't find it in the current core API: https://github.com/ipfs/js-ipfs/tree/master/docs/core-api
The text was updated successfully, but these errors were encountered: