-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
701 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * as fula from './protocols/fula'; | ||
export * as blox from './protocols/blox'; | ||
export * as blockchain from './protocols/blockchain'; | ||
export * as chainApi from './protocols/chain-api'; | ||
export * as chainApi from './protocols/chain-api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Fula from '../interfaces/fulaNativeModule'; | ||
|
||
/** | ||
* listFoundPeers uses mdns discovery mechanism to find libp2p peers that are in the same LAN (only backnd nodes). | ||
// this function. | ||
* @returns array | ||
*/ | ||
export const listFoundPeers = async(): Promise<string[]> => { | ||
let peers:string[] = []; | ||
try { | ||
let foundPeers:string = await Fula.listFoundPeers(); | ||
if (foundPeers != "") { | ||
peers = foundPeers.split(","); | ||
} | ||
} catch (e) { | ||
|
||
} | ||
return peers; | ||
}; |
Oops, something went wrong.