@genobank/biofs 2.4.1 → 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 (153) 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 +101 -0
  6. package/dist/commands/agent/health.js +1 -1
  7. package/dist/commands/agent/health.js.map +1 -1
  8. package/dist/commands/agent/list.d.ts +14 -0
  9. package/dist/commands/agent/list.d.ts.map +1 -0
  10. package/dist/commands/agent/list.js +101 -0
  11. package/dist/commands/agent/list.js.map +1 -0
  12. package/dist/commands/agent/register.d.ts +18 -0
  13. package/dist/commands/agent/register.d.ts.map +1 -0
  14. package/dist/commands/agent/register.js +120 -0
  15. package/dist/commands/agent/register.js.map +1 -0
  16. package/dist/commands/agent/status.d.ts +14 -0
  17. package/dist/commands/agent/status.d.ts.map +1 -0
  18. package/dist/commands/agent/status.js +151 -0
  19. package/dist/commands/agent/status.js.map +1 -0
  20. package/dist/commands/annotate/status.d.ts +11 -0
  21. package/dist/commands/annotate/status.d.ts.map +1 -0
  22. package/dist/commands/annotate/status.js +123 -0
  23. package/dist/commands/annotate/status.js.map +1 -0
  24. package/dist/commands/annotate/submit.d.ts +23 -0
  25. package/dist/commands/annotate/submit.d.ts.map +1 -0
  26. package/dist/commands/annotate/submit.js +296 -0
  27. package/dist/commands/annotate/submit.js.map +1 -0
  28. package/dist/commands/family-status.d.ts +12 -0
  29. package/dist/commands/family-status.d.ts.map +1 -0
  30. package/dist/commands/family-status.js +220 -0
  31. package/dist/commands/family-status.js.map +1 -0
  32. package/dist/commands/job/status.d.ts +1 -0
  33. package/dist/commands/job/status.d.ts.map +1 -1
  34. package/dist/commands/job/status.js.map +1 -1
  35. package/dist/commands/link-clara.d.ts +20 -0
  36. package/dist/commands/link-clara.d.ts.map +1 -0
  37. package/dist/commands/link-clara.js +234 -0
  38. package/dist/commands/link-clara.js.map +1 -0
  39. package/dist/commands/mount-remote.d.ts +1 -1
  40. package/dist/commands/mount-remote.js +1 -1
  41. package/dist/commands/payment/balance.d.ts +12 -0
  42. package/dist/commands/payment/balance.d.ts.map +1 -0
  43. package/dist/commands/payment/balance.js +101 -0
  44. package/dist/commands/payment/balance.js.map +1 -0
  45. package/dist/commands/payment/faucet.d.ts +11 -0
  46. package/dist/commands/payment/faucet.d.ts.map +1 -0
  47. package/dist/commands/payment/faucet.js +92 -0
  48. package/dist/commands/payment/faucet.js.map +1 -0
  49. package/dist/commands/payment/history.d.ts +27 -0
  50. package/dist/commands/payment/history.d.ts.map +1 -0
  51. package/dist/commands/payment/history.js +162 -0
  52. package/dist/commands/payment/history.js.map +1 -0
  53. package/dist/commands/payment/pricing.d.ts +12 -0
  54. package/dist/commands/payment/pricing.d.ts.map +1 -0
  55. package/dist/commands/payment/pricing.js +65 -0
  56. package/dist/commands/payment/pricing.js.map +1 -0
  57. package/dist/commands/payment/setup.d.ts +25 -0
  58. package/dist/commands/payment/setup.d.ts.map +1 -0
  59. package/dist/commands/payment/setup.js +155 -0
  60. package/dist/commands/payment/setup.js.map +1 -0
  61. package/dist/commands/tokenize-biosample.d.ts +19 -0
  62. package/dist/commands/tokenize-biosample.d.ts.map +1 -0
  63. package/dist/commands/tokenize-biosample.js +253 -0
  64. package/dist/commands/tokenize-biosample.js.map +1 -0
  65. package/dist/index.js +281 -13
  66. package/dist/index.js.map +1 -1
  67. package/dist/lib/api/bionft-client.d.ts +35 -7
  68. package/dist/lib/api/bionft-client.d.ts.map +1 -1
  69. package/dist/lib/api/bionft-client.js +106 -16
  70. package/dist/lib/api/bionft-client.js.map +1 -1
  71. package/dist/lib/kite/agent.d.ts +85 -0
  72. package/dist/lib/kite/agent.d.ts.map +1 -0
  73. package/dist/lib/kite/agent.js +332 -0
  74. package/dist/lib/kite/agent.js.map +1 -0
  75. package/dist/lib/kite/index.d.ts +9 -0
  76. package/dist/lib/kite/index.d.ts.map +1 -0
  77. package/dist/lib/kite/index.js +25 -0
  78. package/dist/lib/kite/index.js.map +1 -0
  79. package/dist/lib/kite/passport.d.ts +69 -0
  80. package/dist/lib/kite/passport.d.ts.map +1 -0
  81. package/dist/lib/kite/passport.js +312 -0
  82. package/dist/lib/kite/passport.js.map +1 -0
  83. package/dist/lib/x402/client.d.ts +78 -0
  84. package/dist/lib/x402/client.d.ts.map +1 -0
  85. package/dist/lib/x402/client.js +298 -0
  86. package/dist/lib/x402/client.js.map +1 -0
  87. package/dist/lib/x402/index.d.ts +9 -0
  88. package/dist/lib/x402/index.d.ts.map +1 -0
  89. package/dist/lib/x402/index.js +37 -0
  90. package/dist/lib/x402/index.js.map +1 -0
  91. package/dist/lib/x402/middleware.d.ts +37 -0
  92. package/dist/lib/x402/middleware.d.ts.map +1 -0
  93. package/dist/lib/x402/middleware.js +220 -0
  94. package/dist/lib/x402/middleware.js.map +1 -0
  95. package/dist/types/kite.d.ts +157 -0
  96. package/dist/types/kite.d.ts.map +1 -0
  97. package/dist/types/kite.js +107 -0
  98. package/dist/types/kite.js.map +1 -0
  99. package/dist/types/x402.d.ts +78 -0
  100. package/dist/types/x402.d.ts.map +1 -0
  101. package/dist/types/x402.js +79 -0
  102. package/dist/types/x402.js.map +1 -0
  103. package/docs/AI_AGENT_MCP_MANUAL.md +1029 -0
  104. package/docs/USER_MANUAL.md +603 -0
  105. package/docs/technical-details.html +555 -0
  106. package/lib/bionfs-client.js +2 -0
  107. package/lib/consent-manager.js +2 -0
  108. package/lib/consent-prompt.js +2 -0
  109. package/package.json +9 -3
  110. package/presentation/biofs-x402-kite-presentation.html +813 -0
  111. package/scripts/build_annotator_dictionary.py +1 -0
  112. package/scripts/deploy-clara-nft.js +37 -0
  113. package/test-complete-flow.sh +1 -1
  114. package/test.vcf +1 -0
  115. package/test_23andme.txt +1 -0
  116. package/ADMIN_REGISTER_LAB.md +0 -252
  117. package/ANNOTATOR_RECOMMENDATIONS_API.md +0 -490
  118. package/BIOFS_QUICK_START.md +0 -200
  119. package/BIOFS_TOKENIZE_COMPLETE.md +0 -541
  120. package/BIOFS_V1.2.7_PUBLISHED.md +0 -317
  121. package/BIOFS_V1.2.9_FIXES.md +0 -306
  122. package/BIOFS_V1.3.0_DIRECT_GRANT.md +0 -381
  123. package/BIOFS_V1.3.1_GRANTED_FILES.md +0 -328
  124. package/BIONFS_DEPLOYMENT_GUIDE.md +0 -408
  125. package/BIONFS_MOUNT_INTEGRATION_PLAN.md +0 -415
  126. package/BIONFS_PROTOCOL_SPECIFICATION.md +0 -688
  127. package/BIONFS_SEQUENTIAS_INTEGRATION.md +0 -457
  128. package/BIONFT_GATED_REMOTE_MOUNTING.md +0 -1260
  129. package/BIONFT_NFS_PROTOCOL_ARCHITECTURE.md +0 -583
  130. package/BIOOS_CLI_IMPLEMENTATION_COMPLETE.md +0 -422
  131. package/BIOOS_JOB_MANAGEMENT.md +0 -681
  132. package/BUGFIX_V2.1.3.md +0 -72
  133. package/CHANGELOG_V2.1.0.md +0 -386
  134. package/CHANGELOG_V2.2.0.md +0 -284
  135. package/ENHANCEMENT_DOCUMENTATION.md +0 -218
  136. package/GDPR_BIONFS_CONSENT_ARCHITECTURE.md +0 -798
  137. package/GDPR_BIONFS_IMPLEMENTATION_STATUS.md +0 -462
  138. package/INSTALL_V1.2.7_ON_MAC.md +0 -306
  139. package/LABNFT_BIOFS_INTEGRATION.md +0 -396
  140. package/OPENCRAVAT_ANNOTATORS_REFERENCE.md +0 -340
  141. package/OPENCRAVAT_ANNOTATOR_INTELLIGENCE_COMPLETE.md +0 -479
  142. package/QUICK_START_V2.1.0.md +0 -116
  143. package/RELEASE_SUMMARY_V1.2.7.md +0 -479
  144. package/RELEASE_SUMMARY_V1.3.0.md +0 -324
  145. package/SEQUENTIAS_PROTOCOL_ARCHITECTURE.md +0 -880
  146. package/SEQUENTIA_MIGRATION_GUIDE.md +0 -337
  147. package/SESSION_SUMMARY_DIRECT_GRANT.md +0 -321
  148. package/ULTRATHINK_BIONFS_COMPLETE.md +0 -458
  149. package/WEB3FUSE_LICENSE_TOKEN_ANALYSIS.md +0 -494
  150. package/WHERE_PERMISSIONS_LIVE.md +0 -165
  151. package/config.json +0 -21
  152. package/opencravat_annotators_dictionary.json +0 -2356
  153. package/package.json.working.v1.9.2.20251105_023952 +0 -48
@@ -350,3 +350,4 @@ def create_markdown_reference(dictionary, categories):
350
350
 
351
351
  if __name__ == "__main__":
352
352
  main()
353
+
@@ -0,0 +1,37 @@
1
+ const { ethers } = require("hardhat");
2
+
3
+ async function main() {
4
+ console.log("Deploying ClaraJobNFT to Sequentia...");
5
+
6
+ const [deployer] = await ethers.getSigners();
7
+ console.log("Deployer:", deployer.address);
8
+
9
+ const balance = await deployer.provider.getBalance(deployer.address);
10
+ console.log("Balance:", ethers.formatEther(balance), "SEQ");
11
+
12
+ const ClaraJobNFT = await ethers.getContractFactory("ClaraJobNFT");
13
+ console.log("Deploying...");
14
+
15
+ const clara = await ClaraJobNFT.deploy();
16
+ await clara.waitForDeployment();
17
+
18
+ const address = await clara.getAddress();
19
+ console.log("ClaraJobNFT deployed to:", address);
20
+
21
+ // Verify deployment
22
+ const name = await clara.name();
23
+ const symbol = await clara.symbol();
24
+ const owner = await clara.owner();
25
+ console.log("Name:", name);
26
+ console.log("Symbol:", symbol);
27
+ console.log("Owner:", owner);
28
+ }
29
+
30
+ main()
31
+ .then(() => process.exit(0))
32
+ .catch((error) => {
33
+ console.error(error);
34
+ process.exit(1);
35
+ });
36
+
37
+
@@ -57,4 +57,4 @@ echo " ✅ genobank help - Help system"
57
57
  echo " ✅ genobank --version - Version check"
58
58
  echo ""
59
59
  echo "Note: Upload and download require actual files"
60
- echo "Login/logout not tested (would clear CEO credentials)"
60
+ echo "Login/logout not tested (would clear CEO credentials)"
package/test.vcf CHANGED
@@ -10,3 +10,4 @@ chr1 200 rs456 C T 40 PASS DP=15 GT:DP 1/1:15
10
10
  chr1 300 rs789 G A 35 PASS DP=12 GT:DP 0/1:12
11
11
  chr2 1000 rs111 T C 50 PASS DP=20 GT:DP 1/1:20
12
12
  chr2 2000 rs222 A T 45 PASS DP=18 GT:DP 0/1:18
13
+
package/test_23andme.txt CHANGED
@@ -10,3 +10,4 @@ rs55555 7 700 CT
10
10
  rs66666 8 800 TG
11
11
  rs77777 9 900 AC
12
12
  rs88888 10 1000 GC
13
+
@@ -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)