You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+142-1Lines changed: 142 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,9 @@ By default, Libp2p connections are established through Functionland's libp2p rel
44
44
| --- | --- |
45
45
|[blox](blox)| Blox provides the backend to receive the DAG created by fulamobile and store it |
46
46
|[mobile](mobile)| Initiates a libp2p instance and interacts with WNFS (as its datastore) to encrypt the data and Send and receive files in a browser or an Android or iOS app. Available for [React-Native here](https://github.com/functionland/react-native-fula) and for [Android here](https://github.com/functionland/fula-build-aar)|
47
-
|[exchange](exchange)| Fula exchange protocol is responsible for the ctual transfer of data |
47
+
|[exchange](exchange)| Fula exchange protocol is responsible for the actual transfer of data |
48
+
|[blockchain](blockchain)| On-chain interactions for pool management, manifests, and account operations |
49
+
|[wap](wap)| Wireless Access Point server — provides HTTP endpoints (`/properties`, `/readiness`, `/wifi/*`, `/peer/*`) on port 3500 and mDNS service discovery |
48
50
49
51
## Other related libraries
50
52
@@ -53,6 +55,145 @@ By default, Libp2p connections are established through Functionland's libp2p rel
53
55
|[WNFS for Android](https://github.com/functionland/wnfs-android)| Android build for WNFS rust version |
54
56
|[WNFS for iOS](https://github.com/functionland/wnfs-ios)| iOS build for WNFS rust version |
55
57
58
+
## PeerID Architecture
59
+
60
+
Blox devices maintain two separate libp2p identities:
61
+
62
+
-**Kubo peerID** — Derived via HMAC-SHA256 (domain `"fula-kubo-identity-v1"`) from the main identity key. Used by the embedded IPFS (kubo) node. Always available.
63
+
-**ipfs-cluster peerID** — The original identity from `config.yaml`. Used by ipfs-cluster when installed.
64
+
65
+
Kubo is always running on the device; ipfs-cluster may not be installed. The `wifi.GetKuboPeerID()` utility function provides reliable access to the kubo peerID (via config file or kubo API fallback) without depending on ipfs-cluster.
66
+
67
+
### Getting ipfs-cluster and kubo PeerIDs
68
+
69
+
There are several ways to retrieve peerIDs depending on which part of the system you are working with.
70
+
71
+
#### 1. WAP HTTP Endpoints (port 3500)
72
+
73
+
These endpoints are served by the WAP server on the device. Mobile apps connect to them over the local network.
74
+
75
+
**GET `/properties`**
76
+
77
+
Returns device properties including the kubo peerID.
If the config file is missing or identity derivation fails, `bloxPeerIdString` falls back to reading from kubo's config file via `GetKuboPeerID()`. Fields default to `"NA"` when unavailable.
177
+
178
+
#### 5. Go Code (`wifi.GetKuboPeerID()`)
179
+
180
+
For internal Go code that needs the kubo peerID, use the standalone utility function:
0 commit comments