holosphere 2.0.0-alpha7 → 2.0.0-alpha9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/CHANGELOG.md +446 -0
  2. package/FEATURES.md +431 -0
  3. package/LICENSE +29 -166
  4. package/LICENSE-AGPL.md +180 -0
  5. package/dist/cdn/holosphere.min.js +55 -0
  6. package/dist/cdn/holosphere.min.js.map +1 -0
  7. package/dist/cjs/holosphere.cjs +1 -1
  8. package/dist/esm/holosphere.js +1 -1
  9. package/dist/{index-C-IlLYlk.cjs → index-DDGt_V9o.cjs} +2 -2
  10. package/dist/{index-C-IlLYlk.cjs.map → index-DDGt_V9o.cjs.map} +1 -1
  11. package/dist/{index-d6f4RJBM.js → index-DJXftyvB.js} +2253 -387
  12. package/dist/index-DJXftyvB.js.map +1 -0
  13. package/dist/index-DMbdcMtK.cjs +18 -0
  14. package/dist/index-DMbdcMtK.cjs.map +1 -0
  15. package/dist/{index-jmTHEbR2.js → index-DeZ1xz_s.js} +2 -2
  16. package/dist/{index-jmTHEbR2.js.map → index-DeZ1xz_s.js.map} +1 -1
  17. package/dist/{indexeddb-storage-D8kOl0oK.js → indexeddb-storage-BFt6hMeF.js} +48 -4
  18. package/dist/indexeddb-storage-BFt6hMeF.js.map +1 -0
  19. package/dist/{indexeddb-storage-a8GipaDr.cjs → indexeddb-storage-BK5tv4Sh.cjs} +2 -2
  20. package/dist/indexeddb-storage-BK5tv4Sh.cjs.map +1 -0
  21. package/dist/{memory-storage-DBQK622V.js → memory-storage-C9HuoL2E.js} +44 -4
  22. package/dist/memory-storage-C9HuoL2E.js.map +1 -0
  23. package/dist/{memory-storage-gfRovk2O.cjs → memory-storage-Dao7jfYG.cjs} +2 -2
  24. package/dist/memory-storage-Dao7jfYG.cjs.map +1 -0
  25. package/dist/{secp256k1-BCAPF45D.cjs → secp256k1-BbKzbLtD.cjs} +2 -2
  26. package/dist/{secp256k1-BCAPF45D.cjs.map → secp256k1-BbKzbLtD.cjs.map} +1 -1
  27. package/dist/{secp256k1-DYm_CMqW.js → secp256k1-CreY7Pcl.js} +2 -2
  28. package/dist/{secp256k1-DYm_CMqW.js.map → secp256k1-CreY7Pcl.js.map} +1 -1
  29. package/docs/api/ai_aggregation.js.html +333 -0
  30. package/docs/api/ai_breakdown.js.html +524 -0
  31. package/docs/api/ai_classifier.js.html +231 -0
  32. package/docs/api/ai_council.js.html +246 -0
  33. package/docs/api/ai_embeddings.js.html +304 -0
  34. package/docs/api/ai_federation-ai.js.html +338 -0
  35. package/docs/api/ai_h3-ai.js.html +970 -0
  36. package/docs/api/ai_index.js.html +124 -0
  37. package/docs/api/ai_json-ops.js.html +241 -0
  38. package/docs/api/ai_llm-service.js.html +239 -0
  39. package/docs/api/ai_nl-query.js.html +236 -0
  40. package/docs/api/ai_relationships.js.html +367 -0
  41. package/docs/api/ai_schema-extractor.js.html +235 -0
  42. package/docs/api/ai_spatial.js.html +307 -0
  43. package/docs/api/ai_tts.js.html +214 -0
  44. package/docs/api/content_social-protocols.js.html +180 -0
  45. package/docs/api/core_holosphere.js.html +757 -0
  46. package/docs/api/crypto_nostr-utils.js.html +306 -0
  47. package/docs/api/crypto_secp256k1.js.html +267 -0
  48. package/docs/api/data/search.json +1 -0
  49. package/docs/api/federation_discovery.js.html +337 -0
  50. package/docs/api/federation_handshake.js.html +478 -0
  51. package/docs/api/federation_hologram.js.html +1053 -0
  52. package/docs/api/federation_registry.js.html +389 -0
  53. package/docs/api/fonts/Inconsolata-Regular.ttf +0 -0
  54. package/docs/api/fonts/OpenSans-Regular.ttf +0 -0
  55. package/docs/api/fonts/WorkSans-Bold.ttf +0 -0
  56. package/docs/api/global.html +3 -0
  57. package/docs/api/hierarchical_upcast.js.html +128 -0
  58. package/docs/api/index.html +265 -0
  59. package/docs/api/index.js.html +1868 -0
  60. package/docs/api/lib_ai-methods.js.html +660 -0
  61. package/docs/api/lib_contract-methods.js.html +445 -0
  62. package/docs/api/lib_errors.js.html +56 -0
  63. package/docs/api/lib_federation-methods.js.html +348 -0
  64. package/docs/api/lib_index.js.html +33 -0
  65. package/docs/api/module-ai.html +5 -0
  66. package/docs/api/module-ai_aggregation-SmartAggregation.html +6 -0
  67. package/docs/api/module-ai_aggregation.SmartAggregation.html +3 -0
  68. package/docs/api/module-ai_aggregation.html +3 -0
  69. package/docs/api/module-ai_breakdown-TaskBreakdown.html +5 -0
  70. package/docs/api/module-ai_breakdown.TaskBreakdown.html +3 -0
  71. package/docs/api/module-ai_breakdown.html +3 -0
  72. package/docs/api/module-ai_classifier-Classifier.html +6 -0
  73. package/docs/api/module-ai_classifier.Classifier.html +3 -0
  74. package/docs/api/module-ai_classifier.html +3 -0
  75. package/docs/api/module-ai_council-Council.html +6 -0
  76. package/docs/api/module-ai_council.Council.html +3 -0
  77. package/docs/api/module-ai_council.html +3 -0
  78. package/docs/api/module-ai_embeddings-Embeddings.html +5 -0
  79. package/docs/api/module-ai_embeddings.Embeddings.html +3 -0
  80. package/docs/api/module-ai_embeddings.html +3 -0
  81. package/docs/api/module-ai_federation-ai-FederationAdvisor.html +6 -0
  82. package/docs/api/module-ai_federation-ai.FederationAdvisor.html +3 -0
  83. package/docs/api/module-ai_federation-ai.html +3 -0
  84. package/docs/api/module-ai_h3-ai-H3AI.html +6 -0
  85. package/docs/api/module-ai_h3-ai.H3AI.html +3 -0
  86. package/docs/api/module-ai_h3-ai.html +3 -0
  87. package/docs/api/module-ai_json-ops-JSONOps.html +5 -0
  88. package/docs/api/module-ai_json-ops.JSONOps.html +3 -0
  89. package/docs/api/module-ai_json-ops.html +3 -0
  90. package/docs/api/module-ai_llm-service-LLMService.html +5 -0
  91. package/docs/api/module-ai_llm-service.LLMService.html +3 -0
  92. package/docs/api/module-ai_llm-service.html +3 -0
  93. package/docs/api/module-ai_nl-query-NLQuery.html +5 -0
  94. package/docs/api/module-ai_nl-query.NLQuery.html +3 -0
  95. package/docs/api/module-ai_nl-query.html +3 -0
  96. package/docs/api/module-ai_relationships-RelationshipDiscovery.html +6 -0
  97. package/docs/api/module-ai_relationships.RelationshipDiscovery.html +3 -0
  98. package/docs/api/module-ai_relationships.html +3 -0
  99. package/docs/api/module-ai_schema-extractor-SchemaExtractor.html +5 -0
  100. package/docs/api/module-ai_schema-extractor.SchemaExtractor.html +3 -0
  101. package/docs/api/module-ai_schema-extractor.html +3 -0
  102. package/docs/api/module-ai_spatial-SpatialAnalysis.html +6 -0
  103. package/docs/api/module-ai_spatial.SpatialAnalysis.html +3 -0
  104. package/docs/api/module-ai_spatial.html +3 -0
  105. package/docs/api/module-ai_tts-TTS.html +5 -0
  106. package/docs/api/module-ai_tts.TTS.html +3 -0
  107. package/docs/api/module-ai_tts.html +3 -0
  108. package/docs/api/module-content_social-protocols.html +3 -0
  109. package/docs/api/module-core_holosphere-HoloSphere.html +6 -0
  110. package/docs/api/module-core_holosphere.HoloSphere.html +3 -0
  111. package/docs/api/module-core_holosphere.html +3 -0
  112. package/docs/api/module-crypto_nostr-utils.html +3 -0
  113. package/docs/api/module-crypto_secp256k1.html +3 -0
  114. package/docs/api/module-federation_hologram.html +3 -0
  115. package/docs/api/module-hierarchical_upcast.html +3 -0
  116. package/docs/api/module-holosphere-HoloSphereBase.html +3 -0
  117. package/docs/api/module-holosphere.html +3 -0
  118. package/docs/api/module-lib_ai-methods.html +3 -0
  119. package/docs/api/module-lib_contract-methods.html +3 -0
  120. package/docs/api/module-lib_errors-AuthorizationError.html +3 -0
  121. package/docs/api/module-lib_errors-ValidationError.html +3 -0
  122. package/docs/api/module-lib_errors.AuthorizationError.html +3 -0
  123. package/docs/api/module-lib_errors.ValidationError.html +3 -0
  124. package/docs/api/module-lib_errors.html +3 -0
  125. package/docs/api/module-lib_federation-methods.html +3 -0
  126. package/docs/api/module-lib_index.html +3 -0
  127. package/docs/api/module-schema_validator-ValidationError.html +3 -0
  128. package/docs/api/module-schema_validator.ValidationError.html +3 -0
  129. package/docs/api/module-schema_validator.html +3 -0
  130. package/docs/api/module-spatial_h3-operations.html +4 -0
  131. package/docs/api/module-storage_backend-factory.BackendFactory.html +3 -0
  132. package/docs/api/module-storage_backend-factory.html +3 -0
  133. package/docs/api/module-storage_backend-interface-StorageBackend.html +3 -0
  134. package/docs/api/module-storage_backend-interface.StorageBackend.html +3 -0
  135. package/docs/api/module-storage_backend-interface.html +3 -0
  136. package/docs/api/module-storage_backends_activitypub-backend-ActivityPubBackend.html +7 -0
  137. package/docs/api/module-storage_backends_activitypub-backend.ActivityPubBackend.html +3 -0
  138. package/docs/api/module-storage_backends_activitypub-backend.html +3 -0
  139. package/docs/api/module-storage_backends_activitypub_server-ActivityPubServer.html +8 -0
  140. package/docs/api/module-storage_backends_activitypub_server.ActivityPubServer.html +3 -0
  141. package/docs/api/module-storage_backends_activitypub_server.html +3 -0
  142. package/docs/api/module-storage_backends_gundb-backend-GunDBBackend.html +7 -0
  143. package/docs/api/module-storage_backends_gundb-backend.GunDBBackend.html +3 -0
  144. package/docs/api/module-storage_backends_gundb-backend.html +3 -0
  145. package/docs/api/module-storage_backends_nostr-backend-NostrBackend.html +8 -0
  146. package/docs/api/module-storage_backends_nostr-backend.NostrBackend.html +3 -0
  147. package/docs/api/module-storage_backends_nostr-backend.html +3 -0
  148. package/docs/api/module-storage_filesystem-storage-FileSystemStorage.html +5 -0
  149. package/docs/api/module-storage_filesystem-storage-browser-FileSystemStorage.html +3 -0
  150. package/docs/api/module-storage_filesystem-storage-browser.FileSystemStorage.html +3 -0
  151. package/docs/api/module-storage_filesystem-storage-browser.html +3 -0
  152. package/docs/api/module-storage_filesystem-storage.FileSystemStorage.html +3 -0
  153. package/docs/api/module-storage_filesystem-storage.html +3 -0
  154. package/docs/api/module-storage_global-tables.html +3 -0
  155. package/docs/api/module-storage_gun-async.html +3 -0
  156. package/docs/api/module-storage_gun-auth-GunAuth.html +5 -0
  157. package/docs/api/module-storage_gun-auth.GunAuth.html +3 -0
  158. package/docs/api/module-storage_gun-auth.html +3 -0
  159. package/docs/api/module-storage_gun-federation.html +3 -0
  160. package/docs/api/module-storage_gun-references-GunReferenceHandler.html +5 -0
  161. package/docs/api/module-storage_gun-references.GunReferenceHandler.html +3 -0
  162. package/docs/api/module-storage_gun-references.html +3 -0
  163. package/docs/api/module-storage_gun-schema-GunSchemaValidator.html +5 -0
  164. package/docs/api/module-storage_gun-schema.GunSchemaValidator.html +3 -0
  165. package/docs/api/module-storage_gun-schema.html +3 -0
  166. package/docs/api/module-storage_gun-wrapper.html +11 -0
  167. package/docs/api/module-storage_indexeddb-storage-IndexedDBStorage.html +5 -0
  168. package/docs/api/module-storage_indexeddb-storage.IndexedDBStorage.html +3 -0
  169. package/docs/api/module-storage_indexeddb-storage.html +3 -0
  170. package/docs/api/module-storage_key-storage-simple.html +3 -0
  171. package/docs/api/module-storage_key-storage.html +4 -0
  172. package/docs/api/module-storage_memory-storage-MemoryStorage.html +5 -0
  173. package/docs/api/module-storage_memory-storage.MemoryStorage.html +3 -0
  174. package/docs/api/module-storage_memory-storage.html +3 -0
  175. package/docs/api/module-storage_migration-MigrationTool.html +6 -0
  176. package/docs/api/module-storage_migration.MigrationTool.html +3 -0
  177. package/docs/api/module-storage_migration.html +3 -0
  178. package/docs/api/module-storage_nostr-async.html +18 -0
  179. package/docs/api/module-storage_nostr-client-LRUCache.html +3 -0
  180. package/docs/api/module-storage_nostr-client-NostrClient.html +7 -0
  181. package/docs/api/module-storage_nostr-client.NostrClient.html +15 -0
  182. package/docs/api/module-storage_nostr-client.html +6 -0
  183. package/docs/api/module-storage_nostr-wrapper.html +3 -0
  184. package/docs/api/module-storage_outbox-queue-OutboxQueue.html +4 -0
  185. package/docs/api/module-storage_outbox-queue.OutboxQueue.html +3 -0
  186. package/docs/api/module-storage_outbox-queue.html +3 -0
  187. package/docs/api/module-storage_persistent-storage-PersistentStorage.html +3 -0
  188. package/docs/api/module-storage_persistent-storage.html +4 -0
  189. package/docs/api/module-storage_sync-service-SyncService.html +5 -0
  190. package/docs/api/module-storage_sync-service.SyncService.html +3 -0
  191. package/docs/api/module-storage_sync-service.html +3 -0
  192. package/docs/api/module-storage_unified-storage.html +3 -0
  193. package/docs/api/module-subscriptions_manager.SubscriptionRegistry.html +3 -0
  194. package/docs/api/module-subscriptions_manager.html +3 -0
  195. package/docs/api/schema_validator.js.html +113 -0
  196. package/docs/api/scripts/core.js +726 -0
  197. package/docs/api/scripts/core.min.js +23 -0
  198. package/docs/api/scripts/resize.js +90 -0
  199. package/docs/api/scripts/search.js +265 -0
  200. package/docs/api/scripts/search.min.js +6 -0
  201. package/docs/api/scripts/third-party/Apache-License-2.0.txt +202 -0
  202. package/docs/api/scripts/third-party/fuse.js +9 -0
  203. package/docs/api/scripts/third-party/hljs-line-num-original.js +369 -0
  204. package/docs/api/scripts/third-party/hljs-line-num.js +1 -0
  205. package/docs/api/scripts/third-party/hljs-original.js +5171 -0
  206. package/docs/api/scripts/third-party/hljs.js +1 -0
  207. package/docs/api/scripts/third-party/popper.js +5 -0
  208. package/docs/api/scripts/third-party/tippy.js +1 -0
  209. package/docs/api/scripts/third-party/tocbot.js +672 -0
  210. package/docs/api/scripts/third-party/tocbot.min.js +1 -0
  211. package/docs/api/spatial_h3-operations.js.html +129 -0
  212. package/docs/api/storage_backend-factory.js.html +133 -0
  213. package/docs/api/storage_backend-interface.js.html +164 -0
  214. package/docs/api/storage_backends_activitypub-backend.js.html +298 -0
  215. package/docs/api/storage_backends_activitypub_server.js.html +678 -0
  216. package/docs/api/storage_backends_gundb-backend.js.html +878 -0
  217. package/docs/api/storage_backends_nostr-backend.js.html +254 -0
  218. package/docs/api/storage_filesystem-storage-browser.js.html +83 -0
  219. package/docs/api/storage_filesystem-storage.js.html +207 -0
  220. package/docs/api/storage_global-tables.js.html +116 -0
  221. package/docs/api/storage_gun-async.js.html +344 -0
  222. package/docs/api/storage_gun-auth.js.html +376 -0
  223. package/docs/api/storage_gun-federation.js.html +788 -0
  224. package/docs/api/storage_gun-references.js.html +212 -0
  225. package/docs/api/storage_gun-schema.js.html +309 -0
  226. package/docs/api/storage_gun-wrapper.js.html +645 -0
  227. package/docs/api/storage_indexeddb-storage.js.html +224 -0
  228. package/docs/api/storage_key-storage-simple.js.html +102 -0
  229. package/docs/api/storage_key-storage.js.html +171 -0
  230. package/docs/api/storage_memory-storage.js.html +128 -0
  231. package/docs/api/storage_migration.js.html +354 -0
  232. package/docs/api/storage_nostr-async.js.html +1076 -0
  233. package/docs/api/storage_nostr-client.js.html +1598 -0
  234. package/docs/api/storage_nostr-wrapper.js.html +218 -0
  235. package/docs/api/storage_outbox-queue.js.html +248 -0
  236. package/docs/api/storage_persistent-storage.js.html +160 -0
  237. package/docs/api/storage_sync-service.js.html +201 -0
  238. package/docs/api/storage_unified-storage.js.html +157 -0
  239. package/docs/api/styles/clean-jsdoc-theme-base.css +1159 -0
  240. package/docs/api/styles/clean-jsdoc-theme-dark.css +412 -0
  241. package/docs/api/styles/clean-jsdoc-theme-light.css +482 -0
  242. package/docs/api/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  243. package/docs/api/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  244. package/docs/api/styles/clean-jsdoc-theme.min.css +1 -0
  245. package/docs/api/subscriptions_manager.js.html +162 -0
  246. package/examples/holosphere-widget.js +1242 -0
  247. package/examples/widget-demo.html +274 -0
  248. package/examples/widget.html +703 -0
  249. package/jsdoc.json +26 -0
  250. package/package.json +16 -3
  251. package/src/ai/aggregation.js +13 -2
  252. package/src/ai/breakdown.js +12 -2
  253. package/src/ai/classifier.js +14 -3
  254. package/src/ai/council.js +22 -7
  255. package/src/ai/embeddings.js +37 -15
  256. package/src/ai/federation-ai.js +13 -2
  257. package/src/ai/h3-ai.js +14 -2
  258. package/src/ai/index.js +16 -7
  259. package/src/ai/json-ops.js +18 -5
  260. package/src/ai/llm-service.js +62 -31
  261. package/src/ai/nl-query.js +12 -2
  262. package/src/ai/relationships.js +13 -2
  263. package/src/ai/schema-extractor.js +24 -10
  264. package/src/ai/spatial.js +13 -2
  265. package/src/ai/tts.js +25 -8
  266. package/src/cdn-entry.js +22 -0
  267. package/src/content/social-protocols.js +34 -25
  268. package/src/contracts/chain-manager.js +68 -40
  269. package/src/contracts/deployer.js +70 -42
  270. package/src/contracts/event-listener.js +61 -29
  271. package/src/contracts/holon-contracts.js +46 -31
  272. package/src/contracts/index.js +5 -6
  273. package/src/contracts/networks.js +19 -14
  274. package/src/contracts/operations.js +58 -41
  275. package/src/contracts/queries.js +70 -21
  276. package/src/core/holosphere.js +37 -8
  277. package/src/crypto/nostr-utils.js +105 -65
  278. package/src/crypto/secp256k1.js +7 -2
  279. package/src/federation/handshake.js +23 -11
  280. package/src/federation/hologram.js +9 -1
  281. package/src/hierarchical/upcast.js +34 -20
  282. package/src/index.js +671 -7
  283. package/src/lib/ai-methods.js +352 -3
  284. package/src/lib/contract-methods.js +152 -3
  285. package/src/lib/errors.js +31 -1
  286. package/src/lib/federation-methods.js +110 -3
  287. package/src/lib/index.js +9 -5
  288. package/src/schema/validator.js +22 -3
  289. package/src/spatial/h3-operations.js +17 -1
  290. package/src/storage/backend-factory.js +7 -2
  291. package/src/storage/backend-interface.js +21 -2
  292. package/src/storage/backends/activitypub/server.js +25 -3
  293. package/src/storage/backends/activitypub-backend.js +25 -2
  294. package/src/storage/backends/gundb-backend.js +322 -11
  295. package/src/storage/backends/nostr-backend.js +116 -1
  296. package/src/storage/filesystem-storage-browser.js +42 -2
  297. package/src/storage/filesystem-storage.js +72 -5
  298. package/src/storage/global-tables.js +7 -2
  299. package/src/storage/gun-async.js +20 -11
  300. package/src/storage/gun-auth.js +15 -4
  301. package/src/storage/gun-federation.js +14 -5
  302. package/src/storage/gun-references.js +16 -5
  303. package/src/storage/gun-schema.js +25 -10
  304. package/src/storage/gun-wrapper.js +160 -49
  305. package/src/storage/indexeddb-storage.js +65 -4
  306. package/src/storage/key-storage-simple.js +32 -9
  307. package/src/storage/key-storage.js +45 -13
  308. package/src/storage/memory-storage.js +65 -4
  309. package/src/storage/migration.js +20 -7
  310. package/src/storage/nostr-async.js +195 -90
  311. package/src/storage/nostr-client.js +173 -49
  312. package/src/storage/nostr-wrapper.js +6 -2
  313. package/src/storage/outbox-queue.js +55 -18
  314. package/src/storage/persistent-storage.js +56 -13
  315. package/src/storage/sync-service.js +51 -17
  316. package/src/storage/unified-storage.js +38 -3
  317. package/src/subscriptions/manager.js +33 -16
  318. package/vite.config.cdn.js +60 -0
  319. package/dist/index-Bvwyvd0T.cjs +0 -5
  320. package/dist/index-Bvwyvd0T.cjs.map +0 -1
  321. package/dist/index-d6f4RJBM.js.map +0 -1
  322. package/dist/indexeddb-storage-D8kOl0oK.js.map +0 -1
  323. package/dist/indexeddb-storage-a8GipaDr.cjs.map +0 -1
  324. package/dist/memory-storage-DBQK622V.js.map +0 -1
  325. package/dist/memory-storage-gfRovk2O.cjs.map +0 -1
  326. /package/{cleanup-test-data.js → scripts/cleanup-test-data.js} +0 -0
  327. /package/{test-ai-real-api.js → scripts/test-ai-real-api.js} +0 -0
@@ -1,8 +1,13 @@
1
1
  /**
2
- * Multi-chain network configurations for Holosphere contracts
3
- * Supports Ethereum, Polygon, Arbitrum, Base, Optimism and testnets
2
+ * @fileoverview Multi-chain network configurations for Holosphere contracts.
3
+ * Supports Ethereum, Polygon, Arbitrum, Base, Optimism, and their testnets.
4
+ * @module contracts/networks
4
5
  */
5
6
 
7
+ /**
8
+ * Network configurations for all supported EVM chains.
9
+ * @constant {Object}
10
+ */
6
11
  export const NETWORKS = {
7
12
  // ========== MAINNETS ==========
8
13
  ethereum: {
@@ -152,9 +157,9 @@ export const NETWORKS = {
152
157
  };
153
158
 
154
159
  /**
155
- * Get network configuration by name or chain ID
156
- * @param {string|number} networkOrChainId - Network name or chain ID
157
- * @returns {Object|null} Network configuration or null if not found
160
+ * Get network configuration by name or chain ID.
161
+ * @param {string|number} networkOrChainId - Network name (e.g., 'sepolia') or chain ID (e.g., 11155111)
162
+ * @returns {Object|null} Network configuration object or null if not found
158
163
  */
159
164
  export function getNetwork(networkOrChainId) {
160
165
  if (typeof networkOrChainId === 'string') {
@@ -170,9 +175,9 @@ export function getNetwork(networkOrChainId) {
170
175
  }
171
176
 
172
177
  /**
173
- * Get all networks of a specific type
178
+ * Get all networks of a specific type.
174
179
  * @param {'mainnet'|'testnet'|'local'} type - Network type
175
- * @returns {Object} Networks of the specified type
180
+ * @returns {Object} Map of networks matching the specified type
176
181
  */
177
182
  export function getNetworksByType(type) {
178
183
  return Object.fromEntries(
@@ -181,7 +186,7 @@ export function getNetworksByType(type) {
181
186
  }
182
187
 
183
188
  /**
184
- * List all available network names
189
+ * List all available network names.
185
190
  * @returns {string[]} Array of network names
186
191
  */
187
192
  export function listNetworks() {
@@ -189,19 +194,19 @@ export function listNetworks() {
189
194
  }
190
195
 
191
196
  /**
192
- * Check if a network is supported
197
+ * Check if a network is supported.
193
198
  * @param {string} network - Network name
194
- * @returns {boolean}
199
+ * @returns {boolean} True if network is supported
195
200
  */
196
201
  export function isNetworkSupported(network) {
197
202
  return network in NETWORKS;
198
203
  }
199
204
 
200
205
  /**
201
- * Get explorer URL for a transaction
206
+ * Get block explorer URL for a transaction.
202
207
  * @param {string} network - Network name
203
208
  * @param {string} txHash - Transaction hash
204
- * @returns {string|null} Explorer URL or null
209
+ * @returns {string|null} Explorer URL or null if network has no explorer
205
210
  */
206
211
  export function getTxUrl(network, txHash) {
207
212
  const config = NETWORKS[network];
@@ -210,10 +215,10 @@ export function getTxUrl(network, txHash) {
210
215
  }
211
216
 
212
217
  /**
213
- * Get explorer URL for an address
218
+ * Get block explorer URL for an address.
214
219
  * @param {string} network - Network name
215
220
  * @param {string} address - Contract or wallet address
216
- * @returns {string|null} Explorer URL or null
221
+ * @returns {string|null} Explorer URL or null if network has no explorer
217
222
  */
218
223
  export function getAddressUrl(network, address) {
219
224
  const config = NETWORKS[network];
@@ -1,9 +1,21 @@
1
1
  /**
2
- * ContractOperations - All contract functions exposed with clear parameters
3
- * Provides a unified interface for interacting with all Holosphere contract types
2
+ * @fileoverview Unified operations interface for all Holosphere contract types.
3
+ * Provides a clean API for member management, fund distribution, and contract-specific operations.
4
+ * @module contracts/operations
4
5
  */
5
6
 
7
+ /**
8
+ * Provides a unified interface for interacting with all Holosphere contract types.
9
+ * Wraps contract functions with clear parameters and type checking.
10
+ * @class
11
+ */
6
12
  export class ContractOperations {
13
+ /**
14
+ * Create a new ContractOperations instance.
15
+ * @param {Object} contract - Ethers.js Contract instance
16
+ * @param {string} type - Contract type (Splitter, Managed, Zoned, Appreciative, Bundle)
17
+ * @param {ChainManager} chainManager - Chain manager instance
18
+ */
7
19
  constructor(contract, type, chainManager) {
8
20
  this.contract = contract;
9
21
  this.type = type;
@@ -12,8 +24,9 @@ export class ContractOperations {
12
24
  }
13
25
 
14
26
  /**
15
- * Load ethers dynamically
27
+ * Load ethers.js library dynamically.
16
28
  * @private
29
+ * @returns {Promise<Object>} Ethers.js module
17
30
  */
18
31
  async _loadEthers() {
19
32
  if (!this.ethers) {
@@ -27,9 +40,9 @@ export class ContractOperations {
27
40
  // ========================================================================
28
41
 
29
42
  /**
30
- * Add a single member to the contract
43
+ * Add a single member to the contract.
31
44
  * @param {string} userId - User identifier (string-based, e.g., 'alice', 'telegram_12345')
32
- * @returns {Promise<{txHash, receipt}>}
45
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
33
46
  */
34
47
  async addMember(userId) {
35
48
  const tx = await this.contract.addMember(userId);
@@ -38,9 +51,9 @@ export class ContractOperations {
38
51
  }
39
52
 
40
53
  /**
41
- * Add multiple members at once (batch operation)
54
+ * Add multiple members at once (batch operation).
42
55
  * @param {string[]} userIds - Array of user identifiers
43
- * @returns {Promise<{txHash, receipt}>}
56
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
44
57
  */
45
58
  async addMembers(userIds) {
46
59
  const tx = await this.contract.addMembers(userIds);
@@ -49,8 +62,8 @@ export class ContractOperations {
49
62
  }
50
63
 
51
64
  /**
52
- * Get all member user IDs
53
- * @returns {Promise<string[]>}
65
+ * Get all member user IDs.
66
+ * @returns {Promise<string[]>} Array of user IDs
54
67
  */
55
68
  async getMembers() {
56
69
  const userIds = await this.contract.userIds();
@@ -75,9 +88,9 @@ export class ContractOperations {
75
88
  }
76
89
 
77
90
  /**
78
- * Check if a user is a member
91
+ * Check if a user is a member.
79
92
  * @param {string} userId - User identifier
80
- * @returns {Promise<boolean>}
93
+ * @returns {Promise<boolean>} True if user is a member
81
94
  */
82
95
  async isMember(userId) {
83
96
  try {
@@ -92,7 +105,7 @@ export class ContractOperations {
92
105
  }
93
106
 
94
107
  /**
95
- * Get the address associated with a user ID
108
+ * Get the Ethereum address associated with a user ID.
96
109
  * @param {string} userId - User identifier
97
110
  * @returns {Promise<string>} Ethereum address (or zero address if not set)
98
111
  */
@@ -105,10 +118,10 @@ export class ContractOperations {
105
118
  // ========================================================================
106
119
 
107
120
  /**
108
- * Trigger reward distribution for ERC20 tokens
121
+ * Trigger reward distribution for ERC20 tokens.
109
122
  * @param {string} tokenAddress - ERC20 token contract address
110
123
  * @param {string|bigint} amount - Amount in wei (or token's smallest unit)
111
- * @returns {Promise<{txHash, receipt}>}
124
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
112
125
  */
113
126
  async reward(tokenAddress, amount) {
114
127
  const ethers = await this._loadEthers();
@@ -119,9 +132,9 @@ export class ContractOperations {
119
132
  }
120
133
 
121
134
  /**
122
- * Trigger reward distribution for ETH
135
+ * Trigger reward distribution for ETH.
123
136
  * @param {string} amount - Amount in ETH (e.g., '1.5' for 1.5 ETH)
124
- * @returns {Promise<{txHash, receipt}>}
137
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
125
138
  */
126
139
  async rewardEth(amount) {
127
140
  const ethers = await this._loadEthers();
@@ -136,9 +149,9 @@ export class ContractOperations {
136
149
  }
137
150
 
138
151
  /**
139
- * Send ETH directly to contract (triggers receive/fallback)
152
+ * Send ETH directly to contract (triggers receive/fallback).
140
153
  * @param {string} amount - Amount in ETH
141
- * @returns {Promise<{txHash, receipt}>}
154
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
142
155
  */
143
156
  async sendEth(amount) {
144
157
  const ethers = await this._loadEthers();
@@ -153,10 +166,10 @@ export class ContractOperations {
153
166
  }
154
167
 
155
168
  /**
156
- * Claim accumulated rewards for a user
169
+ * Claim accumulated rewards for a user.
157
170
  * @param {string} userId - User identifier
158
171
  * @param {string} beneficiaryAddress - Ethereum address to receive funds
159
- * @returns {Promise<{txHash, receipt}>}
172
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
160
173
  */
161
174
  async claim(userId, beneficiaryAddress) {
162
175
  const tx = await this.contract.claim(userId, beneficiaryAddress);
@@ -165,9 +178,9 @@ export class ContractOperations {
165
178
  }
166
179
 
167
180
  /**
168
- * Get ETH balance for a user
181
+ * Get ETH balance for a user.
169
182
  * @param {string} userId - User identifier
170
- * @returns {Promise<string>} Balance in ETH
183
+ * @returns {Promise<string>} Balance in ETH as decimal string
171
184
  */
172
185
  async getEthBalance(userId) {
173
186
  const ethers = await this._loadEthers();
@@ -176,10 +189,10 @@ export class ContractOperations {
176
189
  }
177
190
 
178
191
  /**
179
- * Get ERC20 token balance for a user
192
+ * Get ERC20 token balance for a user.
180
193
  * @param {string} userId - User identifier
181
194
  * @param {string} tokenAddress - ERC20 token address
182
- * @returns {Promise<string>} Balance in tokens (18 decimals assumed)
195
+ * @returns {Promise<string>} Balance in tokens (18 decimals assumed) as decimal string
183
196
  */
184
197
  async getTokenBalance(userId, tokenAddress) {
185
198
  const ethers = await this._loadEthers();
@@ -188,18 +201,18 @@ export class ContractOperations {
188
201
  }
189
202
 
190
203
  /**
191
- * Check if user has already claimed
204
+ * Check if user has already claimed rewards.
192
205
  * @param {string} userId - User identifier
193
- * @returns {Promise<boolean>}
206
+ * @returns {Promise<boolean>} True if user has claimed
194
207
  */
195
208
  async hasClaimed(userId) {
196
209
  return this.contract.hasClaimed(userId);
197
210
  }
198
211
 
199
212
  /**
200
- * Get total deposited amount for a token
213
+ * Get total deposited amount for a token.
201
214
  * @param {string} tokenAddress - Token address (use zero address for ETH)
202
- * @returns {Promise<string>}
215
+ * @returns {Promise<string>} Total deposited as decimal string
203
216
  */
204
217
  async getTotalDeposited(tokenAddress) {
205
218
  const ethers = await this._loadEthers();
@@ -212,10 +225,11 @@ export class ContractOperations {
212
225
  // ========================================================================
213
226
 
214
227
  /**
215
- * Set the internal/external split percentages (Splitter only)
228
+ * Set the internal/external split percentages (Splitter only).
216
229
  * @param {number} internalPct - Internal percentage (0-100)
217
230
  * @param {number} externalPct - External percentage (0-100, must sum to 100 with internal)
218
- * @returns {Promise<{txHash, receipt}>}
231
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
232
+ * @throws {Error} If percentages don't sum to 100 or not a Splitter contract
219
233
  */
220
234
  async setContractSplit(internalPct, externalPct) {
221
235
  this._requireType(['Splitter']);
@@ -228,8 +242,9 @@ export class ContractOperations {
228
242
  }
229
243
 
230
244
  /**
231
- * Get current split percentages (Splitter only)
232
- * @returns {Promise<{internal: number, external: number}>}
245
+ * Get current split percentages (Splitter only).
246
+ * @returns {Promise<{internal: number, external: number}>} Split percentages
247
+ * @throws {Error} If not a Splitter contract
233
248
  */
234
249
  async getContractSplit() {
235
250
  this._requireType(['Splitter']);
@@ -627,8 +642,10 @@ export class ContractOperations {
627
642
  // ========================================================================
628
643
 
629
644
  /**
630
- * Require specific contract type(s)
645
+ * Require specific contract type(s).
631
646
  * @private
647
+ * @param {string[]} allowedTypes - Array of allowed contract types
648
+ * @throws {Error} If contract type doesn't match
632
649
  */
633
650
  _requireType(allowedTypes) {
634
651
  if (!allowedTypes.includes(this.type)) {
@@ -637,28 +654,28 @@ export class ContractOperations {
637
654
  }
638
655
 
639
656
  /**
640
- * Get raw contract instance for advanced usage
641
- * @returns {Contract}
657
+ * Get raw contract instance for advanced usage.
658
+ * @returns {Object} Ethers.js Contract instance
642
659
  */
643
660
  getRawContract() {
644
661
  return this.contract;
645
662
  }
646
663
 
647
664
  /**
648
- * Execute a raw contract call
665
+ * Execute a raw contract call.
649
666
  * @param {string} method - Method name
650
- * @param {Array} args - Method arguments
651
- * @returns {Promise<any>}
667
+ * @param {...*} args - Method arguments
668
+ * @returns {Promise<*>} Method return value
652
669
  */
653
670
  async call(method, ...args) {
654
671
  return this.contract[method](...args);
655
672
  }
656
673
 
657
674
  /**
658
- * Execute a raw contract transaction
675
+ * Execute a raw contract transaction.
659
676
  * @param {string} method - Method name
660
- * @param {Array} args - Method arguments
661
- * @returns {Promise<{txHash, receipt}>}
677
+ * @param {...*} args - Method arguments
678
+ * @returns {Promise<{txHash: string, receipt: Object}>} Transaction details
662
679
  */
663
680
  async send(method, ...args) {
664
681
  const tx = await this.contract[method](...args);
@@ -1,43 +1,67 @@
1
1
  /**
2
- * Contract Query Utilities
3
- *
4
- * Utility kit for directly querying contract state:
5
- * zones, splits, appreciation, members, balances, etc.
2
+ * @fileoverview Contract query utilities for reading contract state.
3
+ * Provides read-only queries for zones, splits, appreciation, members, balances, and more.
4
+ * @module contracts/queries
6
5
  */
7
6
 
8
7
  import { ethers } from 'ethers';
9
- import { ContractABIs } from './index.js';
8
+ // Import ABIs directly to avoid circular dependency with index.js
9
+ import SplitterABI from './abis/Splitter.json' with { type: 'json' };
10
+ import ManagedABI from './abis/Managed.json' with { type: 'json' };
11
+ import ZonedABI from './abis/Zoned.json' with { type: 'json' };
12
+ import AppreciativeABI from './abis/Appreciative.json' with { type: 'json' };
13
+ import BundleABI from './abis/Bundle.json' with { type: 'json' };
14
+ import HolonsABI from './abis/Holons.json' with { type: 'json' };
15
+
16
+ const ContractABIs = {
17
+ Splitter: SplitterABI,
18
+ Managed: ManagedABI,
19
+ Zoned: ZonedABI,
20
+ Appreciative: AppreciativeABI,
21
+ Bundle: BundleABI,
22
+ Holons: HolonsABI
23
+ };
10
24
 
11
25
  /**
12
- * Helper to format wei to ETH
26
+ * Helper to format wei to ETH.
27
+ * @private
28
+ * @param {bigint} wei - Wei amount
29
+ * @returns {string} ETH as decimal string
13
30
  */
14
31
  function formatEth(wei) {
15
32
  return ethers.formatEther(wei);
16
33
  }
17
34
 
18
35
  /**
19
- * Helper to format wei to ETH as number
36
+ * Helper to format wei to ETH as number.
37
+ * @private
38
+ * @param {bigint} wei - Wei amount
39
+ * @returns {number} ETH as number
20
40
  */
21
41
  function formatEthNumber(wei) {
22
42
  return Number(ethers.formatEther(wei));
23
43
  }
24
44
 
25
45
  /**
26
- * ContractQueries - Query utilities for all contract types
46
+ * Query utilities for all Holosphere contract types.
47
+ * Provides read-only access to contract state without requiring a signer.
48
+ * @class
27
49
  */
28
50
  export class ContractQueries {
29
51
  /**
30
- * @param {ethers.Provider} provider - ethers.js provider
52
+ * Create a new ContractQueries instance.
53
+ * @param {Object} provider - Ethers.js provider instance
31
54
  */
32
55
  constructor(provider) {
33
56
  this.provider = provider;
34
57
  }
35
58
 
36
59
  /**
37
- * Get a contract instance with the appropriate ABI
60
+ * Get a contract instance with the appropriate ABI.
38
61
  * @param {string} address - Contract address
39
- * @param {string} flavor - Contract flavor (Splitter, Managed, Zoned, Appreciative, Bundle)
40
- * @returns {ethers.Contract}
62
+ * @param {string} flavor - Contract flavor (Splitter, Managed, Zoned, Appreciative, Bundle, Holons)
63
+ * @returns {Object} Ethers.js Contract instance
64
+ * @throws {Error} If unknown contract flavor
41
65
  */
42
66
  getContract(address, flavor) {
43
67
  const abi = ContractABIs[flavor];
@@ -48,9 +72,9 @@ export class ContractQueries {
48
72
  }
49
73
 
50
74
  /**
51
- * Auto-detect contract flavor by calling flavor()
75
+ * Auto-detect contract flavor by calling flavor() method.
52
76
  * @param {string} address - Contract address
53
- * @returns {Promise<string>} Contract flavor
77
+ * @returns {Promise<string>} Contract flavor or 'Unknown'
54
78
  */
55
79
  async detectFlavor(address) {
56
80
  // Try with a minimal ABI that has flavor()
@@ -69,7 +93,10 @@ export class ContractQueries {
69
93
  // ==================== COMMON QUERIES ====================
70
94
 
71
95
  /**
72
- * Get basic contract info
96
+ * Get basic contract information.
97
+ * @param {string} address - Contract address
98
+ * @param {string} flavor - Contract flavor
99
+ * @returns {Promise<{address: string, name: string, flavor: string, version: string, creator: string, memberCount: number}>} Contract info
73
100
  */
74
101
  async getContractInfo(address, flavor) {
75
102
  const contract = this.getContract(address, flavor);
@@ -92,7 +119,10 @@ export class ContractQueries {
92
119
  }
93
120
 
94
121
  /**
95
- * Get all members (userIds)
122
+ * Get all member user IDs.
123
+ * @param {string} address - Contract address
124
+ * @param {string} flavor - Contract flavor
125
+ * @returns {Promise<string[]>} Array of user IDs
96
126
  */
97
127
  async getMembers(address, flavor) {
98
128
  const contract = this.getContract(address, flavor);
@@ -106,7 +136,11 @@ export class ContractQueries {
106
136
  }
107
137
 
108
138
  /**
109
- * Get user's ETH balance
139
+ * Get user's ETH balance in the contract.
140
+ * @param {string} address - Contract address
141
+ * @param {string} flavor - Contract flavor
142
+ * @param {string} userId - User identifier
143
+ * @returns {Promise<{wei: string, eth: number}>} Balance in wei and ETH
110
144
  */
111
145
  async getUserEthBalance(address, flavor, userId) {
112
146
  const contract = this.getContract(address, flavor);
@@ -118,7 +152,12 @@ export class ContractQueries {
118
152
  }
119
153
 
120
154
  /**
121
- * Get user's token balance
155
+ * Get user's ERC20 token balance in the contract.
156
+ * @param {string} address - Contract address
157
+ * @param {string} flavor - Contract flavor
158
+ * @param {string} userId - User identifier
159
+ * @param {string} tokenAddress - ERC20 token address
160
+ * @returns {Promise<{wei: string, formatted: number}>} Token balance
122
161
  */
123
162
  async getUserTokenBalance(address, flavor, userId, tokenAddress) {
124
163
  const contract = this.getContract(address, flavor);
@@ -130,7 +169,11 @@ export class ContractQueries {
130
169
  }
131
170
 
132
171
  /**
133
- * Get total deposited for a token
172
+ * Get total deposited amount for a token.
173
+ * @param {string} address - Contract address
174
+ * @param {string} flavor - Contract flavor
175
+ * @param {string} [tokenAddress] - Token address (defaults to ETH/zero address)
176
+ * @returns {Promise<{wei: string, formatted: number}>} Total deposited
134
177
  */
135
178
  async getTotalDeposited(address, flavor, tokenAddress) {
136
179
  const contract = this.getContract(address, flavor);
@@ -144,7 +187,11 @@ export class ContractQueries {
144
187
  }
145
188
 
146
189
  /**
147
- * Check if user has claimed
190
+ * Check if user has claimed their rewards.
191
+ * @param {string} address - Contract address
192
+ * @param {string} flavor - Contract flavor
193
+ * @param {string} userId - User identifier
194
+ * @returns {Promise<boolean>} True if claimed
148
195
  */
149
196
  async hasClaimed(address, flavor, userId) {
150
197
  const contract = this.getContract(address, flavor);
@@ -524,7 +571,9 @@ export class ContractQueries {
524
571
  // ==================== FULL SNAPSHOT ====================
525
572
 
526
573
  /**
527
- * Get complete contract state snapshot
574
+ * Get complete contract state snapshot including all members and configuration.
575
+ * @param {string} address - Contract address
576
+ * @returns {Promise<Object>} Complete contract state
528
577
  */
529
578
  async getFullSnapshot(address) {
530
579
  const flavor = await this.detectFlavor(address);
@@ -1,3 +1,14 @@
1
+ /**
2
+ * @fileoverview Core HoloSphere class providing the foundational infrastructure
3
+ * for holonic geospatial communication.
4
+ *
5
+ * This module implements the core HoloSphere class that supports multiple storage
6
+ * backends (Nostr, GunDB, ActivityPub) and provides essential operations for
7
+ * distributed P2P communication and data management.
8
+ *
9
+ * @module core/holosphere
10
+ */
11
+
1
12
  import { createClient } from '../storage/nostr-client.js';
2
13
  import { BackendFactory } from '../storage/backend-factory.js';
3
14
  import * as gunWrapper from '../storage/gun-wrapper.js';
@@ -5,12 +16,16 @@ import * as gunFederation from '../storage/gun-federation.js';
5
16
  import { GunDBBackend } from '../storage/backends/gundb-backend.js';
6
17
  import pkg from '../../package.json' with { type: 'json' };
7
18
 
8
- // Gun will be loaded dynamically when needed
19
+ /** @type {Function|null} Gun constructor, loaded dynamically */
9
20
  let Gun = null;
21
+ /** @type {Promise<Function>|null} Promise for Gun loading */
10
22
  let gunLoadPromise = null;
11
23
 
12
24
  /**
13
- * Load Gun module dynamically
25
+ * Dynamically loads the Gun module.
26
+ * Uses lazy loading to reduce initial bundle size and improve startup time.
27
+ *
28
+ * @private
14
29
  * @returns {Promise<Function>} Gun constructor
15
30
  */
16
31
  async function loadGun() {
@@ -50,9 +65,20 @@ function getDefaultRelays() {
50
65
  }
51
66
 
52
67
  /**
53
- * HoloSphere - Holonic Geospatial Communication Infrastructure
54
- * Combines H3 hexagonal indexing with distributed P2P storage
55
- * Supports multiple storage backends: nostr, gundb, activitypub
68
+ * HoloSphere - Holonic Geospatial Communication Infrastructure.
69
+ *
70
+ * The core class that combines H3 hexagonal indexing with distributed P2P storage.
71
+ * Supports multiple storage backends including Nostr, GunDB, and ActivityPub.
72
+ *
73
+ * @class HoloSphere
74
+ * @example
75
+ * // Create with Nostr backend (default)
76
+ * const hs = new HoloSphere({ appName: 'myapp', relays: ['wss://relay.example.com'] });
77
+ *
78
+ * @example
79
+ * // Create with GunDB backend
80
+ * const hs = new HoloSphere({ appName: 'myapp', backend: 'gundb' });
81
+ * await hs.ready(); // Wait for async initialization
56
82
  */
57
83
  export class HoloSphere {
58
84
  /**
@@ -61,7 +87,7 @@ export class HoloSphere {
61
87
  * @param {string} config.backend - Storage backend: 'nostr' | 'gundb' | 'activitypub' (default: 'nostr')
62
88
  * @param {string[]} config.relays - Nostr relay URLs (default from HOLOSPHERE_RELAYS env or ['wss://relay.holons.io', 'wss://relay.nostr.band'])
63
89
  * @param {string} config.privateKey - Private key for signing (hex format, optional)
64
- * @param {string} config.logLevel - Log verbosity: ERROR|WARN|INFO|DEBUG (default: 'WARN')
90
+ * @param {string} config.logLevel - Log verbosity: ERROR|WARN|INFO|DEBUG (default: 'INFO')
65
91
  * @param {boolean} config.hybridMode - Enable hybrid mode (local + relay queries) (default: true)
66
92
  * @param {Object} config.gundb - GunDB-specific configuration
67
93
  * @param {Object} config.activitypub - ActivityPub-specific configuration
@@ -97,7 +123,7 @@ export class HoloSphere {
97
123
  backend: config.backend || 'nostr',
98
124
  relays: config.relays || getDefaultRelays(),
99
125
  privateKey: config.privateKey || getEnv('HOLOSPHERE_PRIVATE_KEY'),
100
- logLevel: config.logLevel || getEnv('HOLOSPHERE_LOG_LEVEL') || 'WARN',
126
+ logLevel: config.logLevel || getEnv('HOLOSPHERE_LOG_LEVEL') || 'INFO',
101
127
  hybridMode: config.hybridMode !== false, // Enable by default
102
128
  };
103
129
 
@@ -712,7 +738,10 @@ export class HoloSphere {
712
738
  // ============================================================================
713
739
 
714
740
  /**
715
- * Close the backend and clean up resources
741
+ * Closes the backend and cleans up resources.
742
+ * Should be called when done using the HoloSphere instance.
743
+ *
744
+ * @returns {void}
716
745
  */
717
746
  close() {
718
747
  if (this._backend) {