This repository was archived by the owner on Feb 5, 2023. It is now read-only.
generated from fission-codes/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Normalized connectΒ #4
Copy link
Copy link
Open
Labels
π©βπ»π¨βπ» DXDeveloper experienceDeveloper experienceπ enhancementNew feature or requestNew feature or request
Description
Summary
Problem
Different daemons can only connect to certain addresses. Local daemons need tcp or ws, in-browser daemons need wss or webRTC (when over https).
Impact
When doing a swarm.connect, you first need to figure what context the node comes from and then connect to an address that fits that context
Solution
- Add an additional property to the returned ipfs object that gives it's source.
ie:
ipfs.source = 'local' | 'browser'
- Add an additonal method that takes multiple address types and connects to the proper one depending on the source. Param can be similar to the peers passed on instantiation
ie:
ipfs.normalized.swarm.connect({
peers: [],
localPeers: [],
browserPeers: []
})
Metadata
Metadata
Assignees
Labels
π©βπ»π¨βπ» DXDeveloper experienceDeveloper experienceπ enhancementNew feature or requestNew feature or request