nx_iot_hub_tenant.nx
buildroot/runtime/nx_iot_hub_tenant.nx
about
nx_iot_hub_tenant.nx -- per-HOUSE IoT sharding built ON THE NISHI HR SPINE (killer-feature rung 4).
Operator 2026-06-23: "make sure on the tenant and all that this is why we were building into a
nishi hr." So the multi-tenancy is NOT a bespoke IoT store -- it composes NISHI HR (the access
SSOT). Each HOUSE = an HR REALM; realm isolation is BY CONSTRUCTION (cred_id = sha256(realm|||
handle), so the same handle in another house derives a DIFFERENT cred = level 0 here). A viewer's
HR level drives their IoT access tier (deny-by-default, exactly like torrent/gallery via HR):
level 0 (unknown/suspended) -> DENY (no devices, no controls)
level 1 (family) -> FAMILY (see + on/off)
level 3 (owner/operator) -> OWNER (+ manage/adopt)
Reuses nx_iot_dashboard (zero-JS cards) + nx_hr (hr_cred_id / hr_resolve_level). One running hub
serves the right house's dashboard to the right HR-authenticated viewer; sharding is the realm.
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_hr.nxnx_iot_dashboard.nx
imported by: nx_iot_hub_serve_realm.nxnx_iot_hub_tenant_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const IOT_MAGIC_262144: i64 = 262144 |
| 19 | const IOT_DENY: i64 = 0 |
| 20 | const IOT_FAMILY: i64 = 1 |
| 21 | const IOT_OWNER: i64 = 2 |
functions
| 23 | func iot_access_from_level(level: i64) -> i64 |
| 32 | func iot_hub_viewer_access(hr_store: *u8, realm: *u8, realm_n: i64, handle: *u8, hn: i64) -> i64 |
| 42 | func iot_tenant_render(h: *u8, house_label: *u8, access: i64) -> i64 |
| 69 | func main() -> i64 |