@genobank/biofs 2.5.0 → 2.5.1

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 (100) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE +37 -0
  3. package/README.md +2 -1
  4. package/bin/biofs.js +2 -1
  5. package/contracts/ClaraJobNFT.sol +2 -0
  6. package/dist/commands/link-clara.d.ts.map +1 -1
  7. package/dist/commands/link-clara.js +9 -3
  8. package/dist/commands/link-clara.js.map +1 -1
  9. package/dist/commands/tokenize-biosample.d.ts.map +1 -1
  10. package/dist/commands/tokenize-biosample.js +9 -3
  11. package/dist/commands/tokenize-biosample.js.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/docs/AI_AGENT_MCP_MANUAL.md +2 -0
  14. package/docs/USER_MANUAL.md +2 -0
  15. package/docs/technical-details.html +555 -0
  16. package/lib/bionfs-client.js +2 -0
  17. package/lib/consent-manager.js +2 -0
  18. package/lib/consent-prompt.js +2 -0
  19. package/package.json +3 -3
  20. package/presentation/biofs-x402-kite-presentation.html +2 -0
  21. package/scripts/build_annotator_dictionary.py +1 -0
  22. package/scripts/deploy-clara-nft.js +2 -0
  23. package/test-complete-flow.sh +1 -1
  24. package/test.vcf +1 -0
  25. package/test_23andme.txt +1 -0
  26. package/ADMIN_REGISTER_LAB.md +0 -252
  27. package/ANNOTATOR_RECOMMENDATIONS_API.md +0 -490
  28. package/BIOFS_QUICK_START.md +0 -200
  29. package/BIOFS_TOKENIZE_COMPLETE.md +0 -541
  30. package/BIOFS_V1.2.7_PUBLISHED.md +0 -317
  31. package/BIOFS_V1.2.9_FIXES.md +0 -306
  32. package/BIOFS_V1.3.0_DIRECT_GRANT.md +0 -381
  33. package/BIOFS_V1.3.1_GRANTED_FILES.md +0 -328
  34. package/BIONFS_DEPLOYMENT_GUIDE.md +0 -408
  35. package/BIONFS_MOUNT_INTEGRATION_PLAN.md +0 -415
  36. package/BIONFS_PROTOCOL_SPECIFICATION.md +0 -688
  37. package/BIONFS_SEQUENTIAS_INTEGRATION.md +0 -457
  38. package/BIONFT_NFS_PROTOCOL_ARCHITECTURE.md +0 -583
  39. package/BIOOS_CLI_IMPLEMENTATION_COMPLETE.md +0 -422
  40. package/BIOOS_JOB_MANAGEMENT.md +0 -681
  41. package/BUGFIX_V2.1.3.md +0 -72
  42. package/CHANGELOG_V2.1.0.md +0 -386
  43. package/CHANGELOG_V2.2.0.md +0 -284
  44. package/ENHANCEMENT_DOCUMENTATION.md +0 -218
  45. package/GDPR_BIONFS_CONSENT_ARCHITECTURE.md +0 -798
  46. package/GDPR_BIONFS_IMPLEMENTATION_STATUS.md +0 -462
  47. package/INSTALL_V1.2.7_ON_MAC.md +0 -306
  48. package/LABNFT_BIOFS_INTEGRATION.md +0 -396
  49. package/OPENCRAVAT_ANNOTATORS_REFERENCE.md +0 -340
  50. package/OPENCRAVAT_ANNOTATOR_INTELLIGENCE_COMPLETE.md +0 -479
  51. package/QUICK_START_V2.1.0.md +0 -116
  52. package/RELEASE_SUMMARY_V1.2.7.md +0 -479
  53. package/RELEASE_SUMMARY_V1.3.0.md +0 -324
  54. package/SEQUENTIAS_PROTOCOL_ARCHITECTURE.md +0 -880
  55. package/SEQUENTIA_MIGRATION_GUIDE.md +0 -337
  56. package/SESSION_SUMMARY_DIRECT_GRANT.md +0 -321
  57. package/ULTRATHINK_BIONFS_COMPLETE.md +0 -458
  58. package/WEB3FUSE_LICENSE_TOKEN_ANALYSIS.md +0 -494
  59. package/WHERE_PERMISSIONS_LIVE.md +0 -165
  60. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +0 -4
  61. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +0 -63
  62. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.dbg.json +0 -4
  63. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +0 -328
  64. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +0 -4
  65. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +0 -357
  66. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +0 -4
  67. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +0 -296
  68. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +0 -4
  69. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +0 -45
  70. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.dbg.json +0 -4
  71. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +0 -373
  72. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +0 -4
  73. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +0 -341
  74. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +0 -4
  75. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +0 -10
  76. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +0 -4
  77. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -10
  78. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +0 -4
  79. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -10
  80. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +0 -4
  81. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -30
  82. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +0 -4
  83. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -30
  84. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +0 -4
  85. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -10
  86. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +0 -4
  87. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -10
  88. package/artifacts/build-info/1adfbc50ae3e1821260f858a9c689a37.json +0 -1
  89. package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.dbg.json +0 -4
  90. package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.json +0 -667
  91. package/cache/solidity-files-cache.json +0 -628
  92. package/check_clara2.js +0 -70
  93. package/check_clara3.js +0 -65
  94. package/config.json +0 -21
  95. package/hardhat.config.js +0 -25
  96. package/jest.config.js +0 -27
  97. package/mint_and_link_all.js +0 -128
  98. package/opencravat_annotators_dictionary.json +0 -2356
  99. package/package.json.working.v1.9.2.20251105_023952 +0 -48
  100. package/test_v2_mint.js +0 -101
@@ -1,252 +0,0 @@
1
- # BioFS Admin Register Lab Command
2
-
3
- ## Overview
4
-
5
- The `biofs admin register-lab` command onboards new research labs to the GenoBank platform on **Sequentia Network** with minimal input.
6
-
7
- ## Features
8
-
9
- - **Website-based extraction**: Automatically extracts lab information from website
10
- - **Custodial wallet generation**: Creates secure EIP-55 wallet for lab
11
- - **MongoDB integration**: Stores lab profile with all metadata
12
- - **Sequentia Network registration**: Registers as BioPIL DAO permittee
13
- - **Blockchain logging**: Records registration transaction on-chain
14
-
15
- ## Network Configuration
16
-
17
- ✅ **Sequentia Mainnet**:
18
- - RPC URL: `http://52.90.163.112:8545`
19
- - Chain ID: `15132025`
20
- - BioPIL DAO: `0xDae899b64282370001E3f820304213eDf2D983DE`
21
-
22
- ❌ **Deprecated Networks**:
23
- - Avalanche Fuji (deprecated)
24
- - Story Protocol (use Sequentia instead)
25
-
26
- ## Usage
27
-
28
- ### Basic Usage (Minimal Input)
29
-
30
- ```bash
31
- biofs admin register-lab https://novogene.com --yes
32
- ```
33
-
34
- This command will:
35
- 1. Extract lab information from the website
36
- 2. Generate a custodial wallet
37
- 3. Store in MongoDB
38
- 4. Register on Sequentia blockchain
39
- 5. Display lab credentials
40
-
41
- ### Advanced Usage (With Overrides)
42
-
43
- ```bash
44
- biofs admin register-lab https://ciphersoniclabs.com \
45
- --name "CipherSonic Labs" \
46
- --email rashmi@ciphersoniclabs.com \
47
- --specialization "genomic analysis" \
48
- --location "San Francisco, CA" \
49
- --auto-approve
50
- ```
51
-
52
- ### Command Options
53
-
54
- ```
55
- Arguments:
56
- <website_url> Lab's website URL (required)
57
-
58
- Options:
59
- --name <string> Override extracted lab name
60
- --email <string> Contact email (extracted if not provided)
61
- --specialization <string> Research focus (extracted if not provided)
62
- --location <string> Lab location (extracted if not provided)
63
- --auto-approve Mark lab as verified immediately
64
- --yes Skip confirmation prompts
65
- -h, --help Display help
66
- ```
67
-
68
- ## Example Output
69
-
70
- ```
71
- 🧬 BioFS Lab Registration - Sequentia Network
72
-
73
- ✓ Website analysis complete
74
- ✓ Custodial wallet generated: 0x9346be6aD3384EB36c172F8B2bB4b7C9d8afFc07
75
- ✓ Assigned serial: 43
76
- ✓ Lab profile stored in MongoDB
77
- ✓ Sequentia registration complete
78
-
79
- ✅ Lab registered successfully on Sequentia Network!
80
-
81
- Lab Details:
82
- 🏥 Lab: Novogene
83
- 🔗 Website: https://novogene.com
84
- 👛 Custodial Wallet: 0x9346be6aD3384EB36c172F8B2bB4b7C9d8afFc07
85
- 🔑 Private Key: (stored securely in MongoDB)
86
- 📧 Email: contact@novogene.com
87
- 🧬 Specialization: Genomic sequencing and bioinformatics
88
- 📍 Location: United States
89
- ⛓️ Sequentia TX: 0xabc123...
90
- 🌐 Network: Sequentia (Chain ID: 15132025)
91
- 📋 Status: Verified ✅
92
- 🆔 Serial: 43
93
-
94
- 💡 Next Steps:
95
- Lab can now receive BioNFT-licensed data:
96
- $ biofs share <file> --lab 0x9346be6aD3384EB36c172F8B2bB4b7C9d8afFc07 --license non-commercial
97
-
98
- View in admin dashboard:
99
- https://admin.genobank.io
100
- ```
101
-
102
- ## MongoDB Collections
103
-
104
- ### `lab_wallets` Collection
105
-
106
- ```javascript
107
- {
108
- "_id": ObjectId("..."),
109
- "serial": 43,
110
- "lab_name": "Novogene",
111
- "wallet_address": "0x9346be6aD3384EB36c172F8B2bB4b7C9d8afFc07",
112
- "private_key": "081114ff09e10efb12970c90e162d5bb6d1db6823706633df8fdeeb13590918a",
113
- "mnemonic": "word1 word2 ... word12",
114
- "website": "https://www.novogene.com",
115
- "email": "contact@novogene.com",
116
- "specialization": "Genomic sequencing and bioinformatics",
117
- "description": "Leading genomics service provider...",
118
- "logo_url": "https://www.novogene.com/logo.png",
119
- "location": "United States",
120
- "network": "sequentia",
121
- "chain_id": 15132025,
122
- "verified": true,
123
- "auto_generated": true,
124
- "claimed": false,
125
- "created_at": ISODate("2025-11-10T08:00:00Z"),
126
- "updated_at": ISODate("2025-11-10T08:00:00Z")
127
- }
128
- ```
129
-
130
- ### `researcher_registration_logs` Collection
131
-
132
- ```javascript
133
- {
134
- "_id": ObjectId("..."),
135
- "researcher_serial": 43,
136
- "researcher_wallet": "0X9346BE6AD3384EB36C172F8B2BB4B7C9D8AFFC07",
137
- "researcher_name": "Novogene",
138
- "admin_wallet": "0X088EBE307B4200A62DC6190D0AC52D55BCABAC11",
139
- "timestamp": ISODate("2025-11-10T08:00:00Z"),
140
- "action": "researcher_registered_blockchain",
141
- "network": "sequentia",
142
- "chain_id": 15132025,
143
- "tx_hash": "0xabc123...",
144
- "ip_address": "CLI"
145
- }
146
- ```
147
-
148
- ## Environment Variables
149
-
150
- Required in `/home/ubuntu/Genobank_APIs/production_api/.env`:
151
-
152
- ```bash
153
- # Sequentia Network Configuration
154
- SEQUENTIA_RPC_URL=http://52.90.163.112:8545
155
- SEQUENTIA_CHAIN_ID=15132025
156
- SEQUENTIA_EXECUTOR_KEY=0xfaa9148191dfcb99dc713f2652315b09df590a59e07c78a8d59c288d7f4a5013
157
-
158
- # BioPIL DAO Contract
159
- BIOPIL_CONTRACT_ADDRESS=0xDae899b64282370001E3f820304213eDf2D983DE
160
-
161
- # MongoDB
162
- MONGO_DB_HOST=mongodb://localhost:27017/genobank-api
163
-
164
- # GenoBank API
165
- GENOBANK_API_URL=https://genobank.app
166
- ADMIN_SIGNATURE=0xa5141ae955bba91ad46a940aefc3b05120489b8b776a180668e5b849f16254d44982fb867724390b388ea3bbc606ab4128e264c7b4d3de4082aeb63c3144af501c
167
- ```
168
-
169
- ## Implementation Details
170
-
171
- ### Files Created
172
-
173
- 1. **`/home/ubuntu/biofs-cli/src/commands/admin/register-lab.ts`**
174
- - Main registration logic
175
- - Website extraction via GenoBank API
176
- - Wallet generation with ethers.js
177
- - MongoDB operations
178
- - Sequentia blockchain registration
179
-
180
- 2. **`/home/ubuntu/biofs-cli/src/commands/admin/index.ts`**
181
- - Admin command group index
182
- - Exports createAdminCommand()
183
-
184
- ### Integration Points
185
-
186
- - **GenoBank API**: `/api_lab_customization/extract_website_branding` endpoint
187
- - **MongoDB**: Direct connection to `genobank-api` database
188
- - **Sequentia Network**: Blockchain registration via BioPIL DAO
189
- - **Admin Dashboard**: Labs appear at `https://admin.genobank.io`
190
-
191
- ## Security Considerations
192
-
193
- 1. **Private Key Storage**: Private keys stored in MongoDB (consider encryption at rest)
194
- 2. **Admin Privileges**: Command requires admin credentials from `.env`
195
- 3. **HTTPS Required**: Website URLs must use HTTPS for extraction
196
- 4. **Wallet Security**: EIP-55 checksummed addresses
197
-
198
- ## Troubleshooting
199
-
200
- ### Website Extraction Fails
201
- ```bash
202
- ⚠️ Website extraction failed: timeout
203
- ```
204
- **Solution**: Use manual overrides with `--name`, `--email`, etc.
205
-
206
- ### Blockchain Registration Fails
207
- ```bash
208
- ⚠️ Blockchain registration skipped: contract not deployed
209
- ```
210
- **Solution**: Lab will still be registered in MongoDB. Blockchain registration is optional.
211
-
212
- ### MongoDB Connection Error
213
- ```bash
214
- Error: MongoServerError: connection refused
215
- ```
216
- **Solution**: Verify MongoDB is running and `MONGO_DB_HOST` is correct
217
-
218
- ## Testing
219
-
220
- ```bash
221
- # Test with Novogene (real website)
222
- biofs admin register-lab https://www.novogene.com --yes
223
-
224
- # Test with custom overrides
225
- biofs admin register-lab https://example-lab.edu \
226
- --name "Example Genomics Lab" \
227
- --email contact@example.edu \
228
- --specialization "cancer genomics" \
229
- --location "Boston, MA" \
230
- --auto-approve
231
- ```
232
-
233
- ## Future Enhancements
234
-
235
- 1. **Lab Claims Wallet**: Allow labs to claim custodial wallets via email verification
236
- 2. **Batch Registration**: Register multiple labs from CSV file
237
- 3. **Email Notifications**: Send registration confirmation to lab email
238
- 4. **Private Key Encryption**: Encrypt private keys at rest using AWS KMS
239
- 5. **BioPIL DAO Confirmation**: Verify contract interface and enable full blockchain registration
240
-
241
- ## Support
242
-
243
- For issues or questions:
244
- - GitHub: https://github.com/Genobank/biofs-cli
245
- - Email: support@genobank.io
246
- - Dashboard: https://admin.genobank.io
247
-
248
- ---
249
-
250
- **Implementation Date**: November 11, 2025
251
- **Author**: GenoBank.io - BioFS CLI Team
252
- **Network**: Sequentia Mainnet (Chain ID: 15132025)