@genobank/biofs 2.4.0 → 2.5.0
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.
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +63 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +328 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +357 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +296 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +45 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +373 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +341 -0
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
- package/artifacts/build-info/1adfbc50ae3e1821260f858a9c689a37.json +1 -0
- package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.dbg.json +4 -0
- package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.json +667 -0
- package/cache/solidity-files-cache.json +628 -0
- package/check_clara2.js +70 -0
- package/check_clara3.js +65 -0
- package/config.json +1 -1
- package/contracts/ClaraJobNFT.sol +99 -0
- package/dist/commands/agent/health.js +1 -1
- package/dist/commands/agent/health.js.map +1 -1
- package/dist/commands/agent/list.d.ts +14 -0
- package/dist/commands/agent/list.d.ts.map +1 -0
- package/dist/commands/agent/list.js +101 -0
- package/dist/commands/agent/list.js.map +1 -0
- package/dist/commands/agent/register.d.ts +18 -0
- package/dist/commands/agent/register.d.ts.map +1 -0
- package/dist/commands/agent/register.js +120 -0
- package/dist/commands/agent/register.js.map +1 -0
- package/dist/commands/agent/status.d.ts +14 -0
- package/dist/commands/agent/status.d.ts.map +1 -0
- package/dist/commands/agent/status.js +151 -0
- package/dist/commands/agent/status.js.map +1 -0
- package/dist/commands/annotate/status.d.ts +11 -0
- package/dist/commands/annotate/status.d.ts.map +1 -0
- package/dist/commands/annotate/status.js +123 -0
- package/dist/commands/annotate/status.js.map +1 -0
- package/dist/commands/annotate/submit.d.ts +23 -0
- package/dist/commands/annotate/submit.d.ts.map +1 -0
- package/dist/commands/annotate/submit.js +296 -0
- package/dist/commands/annotate/submit.js.map +1 -0
- package/dist/commands/family-status.d.ts +12 -0
- package/dist/commands/family-status.d.ts.map +1 -0
- package/dist/commands/family-status.js +220 -0
- package/dist/commands/family-status.js.map +1 -0
- package/dist/commands/job/status.d.ts +1 -0
- package/dist/commands/job/status.d.ts.map +1 -1
- package/dist/commands/job/status.js.map +1 -1
- package/dist/commands/link-clara.d.ts +20 -0
- package/dist/commands/link-clara.d.ts.map +1 -0
- package/dist/commands/link-clara.js +228 -0
- package/dist/commands/link-clara.js.map +1 -0
- package/dist/commands/mount-remote.d.ts +1 -1
- package/dist/commands/mount-remote.js +1 -1
- package/dist/commands/payment/balance.d.ts +12 -0
- package/dist/commands/payment/balance.d.ts.map +1 -0
- package/dist/commands/payment/balance.js +101 -0
- package/dist/commands/payment/balance.js.map +1 -0
- package/dist/commands/payment/faucet.d.ts +11 -0
- package/dist/commands/payment/faucet.d.ts.map +1 -0
- package/dist/commands/payment/faucet.js +92 -0
- package/dist/commands/payment/faucet.js.map +1 -0
- package/dist/commands/payment/history.d.ts +27 -0
- package/dist/commands/payment/history.d.ts.map +1 -0
- package/dist/commands/payment/history.js +162 -0
- package/dist/commands/payment/history.js.map +1 -0
- package/dist/commands/payment/pricing.d.ts +12 -0
- package/dist/commands/payment/pricing.d.ts.map +1 -0
- package/dist/commands/payment/pricing.js +65 -0
- package/dist/commands/payment/pricing.js.map +1 -0
- package/dist/commands/payment/setup.d.ts +25 -0
- package/dist/commands/payment/setup.d.ts.map +1 -0
- package/dist/commands/payment/setup.js +155 -0
- package/dist/commands/payment/setup.js.map +1 -0
- package/dist/commands/tokenize-biosample.d.ts +19 -0
- package/dist/commands/tokenize-biosample.d.ts.map +1 -0
- package/dist/commands/tokenize-biosample.js +247 -0
- package/dist/commands/tokenize-biosample.js.map +1 -0
- package/dist/index.js +281 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/api/bionft-client.d.ts +35 -7
- package/dist/lib/api/bionft-client.d.ts.map +1 -1
- package/dist/lib/api/bionft-client.js +106 -16
- package/dist/lib/api/bionft-client.js.map +1 -1
- package/dist/lib/bioip/collections.d.ts +4 -0
- package/dist/lib/bioip/collections.d.ts.map +1 -1
- package/dist/lib/bioip/collections.js +49 -33
- package/dist/lib/bioip/collections.js.map +1 -1
- package/dist/lib/kite/agent.d.ts +85 -0
- package/dist/lib/kite/agent.d.ts.map +1 -0
- package/dist/lib/kite/agent.js +332 -0
- package/dist/lib/kite/agent.js.map +1 -0
- package/dist/lib/kite/index.d.ts +9 -0
- package/dist/lib/kite/index.d.ts.map +1 -0
- package/dist/lib/kite/index.js +25 -0
- package/dist/lib/kite/index.js.map +1 -0
- package/dist/lib/kite/passport.d.ts +69 -0
- package/dist/lib/kite/passport.d.ts.map +1 -0
- package/dist/lib/kite/passport.js +312 -0
- package/dist/lib/kite/passport.js.map +1 -0
- package/dist/lib/x402/client.d.ts +78 -0
- package/dist/lib/x402/client.d.ts.map +1 -0
- package/dist/lib/x402/client.js +298 -0
- package/dist/lib/x402/client.js.map +1 -0
- package/dist/lib/x402/index.d.ts +9 -0
- package/dist/lib/x402/index.d.ts.map +1 -0
- package/dist/lib/x402/index.js +37 -0
- package/dist/lib/x402/index.js.map +1 -0
- package/dist/lib/x402/middleware.d.ts +37 -0
- package/dist/lib/x402/middleware.d.ts.map +1 -0
- package/dist/lib/x402/middleware.js +220 -0
- package/dist/lib/x402/middleware.js.map +1 -0
- package/dist/types/kite.d.ts +157 -0
- package/dist/types/kite.d.ts.map +1 -0
- package/dist/types/kite.js +107 -0
- package/dist/types/kite.js.map +1 -0
- package/dist/types/x402.d.ts +78 -0
- package/dist/types/x402.d.ts.map +1 -0
- package/dist/types/x402.js +79 -0
- package/dist/types/x402.js.map +1 -0
- package/docs/AI_AGENT_MCP_MANUAL.md +1027 -0
- package/docs/USER_MANUAL.md +601 -0
- package/hardhat.config.js +25 -0
- package/jest.config.js +27 -0
- package/mint_and_link_all.js +128 -0
- package/package.json +7 -1
- package/presentation/biofs-x402-kite-presentation.html +811 -0
- package/scripts/deploy-clara-nft.js +35 -0
- package/test_v2_mint.js +101 -0
- package/BIONFT_GATED_REMOTE_MOUNTING.md +0 -1260
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
# BioFS CLI User Manual
|
|
2
|
+
|
|
3
|
+
**Version 2.4.1** | **GenoBank.io**
|
|
4
|
+
|
|
5
|
+
BioFS is a command-line interface for managing BioNFT-gated genomic data on the Sequentia blockchain. It enables GDPR-compliant file sharing, consent management, and decentralized genomic processing.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
1. [Installation](#installation)
|
|
12
|
+
2. [Quick Start](#quick-start)
|
|
13
|
+
3. [Authentication](#authentication)
|
|
14
|
+
4. [File Management](#file-management)
|
|
15
|
+
5. [Tokenization](#tokenization)
|
|
16
|
+
6. [Access Control](#access-control)
|
|
17
|
+
7. [Data Sharing](#data-sharing)
|
|
18
|
+
8. [Research Jobs](#research-jobs)
|
|
19
|
+
9. [GDPR Compliance](#gdpr-compliance)
|
|
20
|
+
10. [Troubleshooting](#troubleshooting)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
### Prerequisites
|
|
27
|
+
- Node.js 18.0.0 or higher
|
|
28
|
+
- A Web3 wallet (MetaMask recommended)
|
|
29
|
+
|
|
30
|
+
### Install from npm
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @genobank/biofs
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Verify Installation
|
|
36
|
+
```bash
|
|
37
|
+
biofs --version
|
|
38
|
+
# Output: 2.4.1
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
### 1. Authenticate
|
|
46
|
+
```bash
|
|
47
|
+
biofs login
|
|
48
|
+
```
|
|
49
|
+
This opens your browser for Web3 wallet signature. Your credentials are stored locally in `~/.biofs/`.
|
|
50
|
+
|
|
51
|
+
### 2. View Your Files
|
|
52
|
+
```bash
|
|
53
|
+
biofs biofiles
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Download a File
|
|
57
|
+
```bash
|
|
58
|
+
biofs download sample.vcf ./local-copy.vcf
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 4. Share with a Lab
|
|
62
|
+
```bash
|
|
63
|
+
biofs share sample.vcf --lab 0x1234...5678
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Authentication
|
|
69
|
+
|
|
70
|
+
### Login (Web3 Wallet)
|
|
71
|
+
```bash
|
|
72
|
+
biofs login
|
|
73
|
+
```
|
|
74
|
+
Opens browser for MetaMask signature. Use `--no-browser` for headless environments.
|
|
75
|
+
|
|
76
|
+
**Options:**
|
|
77
|
+
| Option | Description |
|
|
78
|
+
|--------|-------------|
|
|
79
|
+
| `--port <number>` | Callback server port |
|
|
80
|
+
| `--no-browser` | Don't auto-open browser |
|
|
81
|
+
| `--timeout <seconds>` | Auth timeout |
|
|
82
|
+
| `--wallet <address>` | Direct auth with wallet |
|
|
83
|
+
| `--signature <sig>` | Direct auth with signature |
|
|
84
|
+
|
|
85
|
+
**Direct Authentication (for scripts):**
|
|
86
|
+
```bash
|
|
87
|
+
biofs login --wallet 0xYourWallet --signature 0xYourSignature
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Logout
|
|
91
|
+
```bash
|
|
92
|
+
biofs logout
|
|
93
|
+
```
|
|
94
|
+
Clears stored credentials from `~/.biofs/credentials.json`.
|
|
95
|
+
|
|
96
|
+
### Check Current Session
|
|
97
|
+
```bash
|
|
98
|
+
biofs whoami
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Options:**
|
|
102
|
+
| Option | Description |
|
|
103
|
+
|--------|-------------|
|
|
104
|
+
| `--json` | Output as JSON |
|
|
105
|
+
| `--verify` | Verify signature validity |
|
|
106
|
+
| `--check <wallet>` | Verify against specific wallet |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## File Management
|
|
111
|
+
|
|
112
|
+
### List Your BioFiles
|
|
113
|
+
```bash
|
|
114
|
+
biofs biofiles
|
|
115
|
+
```
|
|
116
|
+
Discovers files from all sources: Sequentia blockchain, Story Protocol, S3 storage, and BioIP registry.
|
|
117
|
+
|
|
118
|
+
**Aliases:** `biofs files`, `biofs ls`
|
|
119
|
+
|
|
120
|
+
**Options:**
|
|
121
|
+
| Option | Description |
|
|
122
|
+
|--------|-------------|
|
|
123
|
+
| `--filter <type>` | Filter by type: vcf, fastq, bam, pdf |
|
|
124
|
+
| `--source <source>` | Filter by source: story, avalanche, s3, biofs |
|
|
125
|
+
| `--json` | Output as JSON |
|
|
126
|
+
| `--update` | Force refresh from blockchain |
|
|
127
|
+
| `--verbose` | Show debug information |
|
|
128
|
+
|
|
129
|
+
**Example:**
|
|
130
|
+
```bash
|
|
131
|
+
# List only VCF files
|
|
132
|
+
biofs biofiles --filter vcf
|
|
133
|
+
|
|
134
|
+
# JSON output for scripting
|
|
135
|
+
biofs biofiles --json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Download Files
|
|
139
|
+
```bash
|
|
140
|
+
biofs download <biocid_or_filename> [destination]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Alias:** `biofs get`
|
|
144
|
+
|
|
145
|
+
**Options:**
|
|
146
|
+
| Option | Description |
|
|
147
|
+
|--------|-------------|
|
|
148
|
+
| `--output <path>` | Output file path |
|
|
149
|
+
| `--stream` | Stream large files (>100MB) |
|
|
150
|
+
| `--quiet` | No progress bar |
|
|
151
|
+
| `--skip-consent` | Skip GDPR consent prompt |
|
|
152
|
+
|
|
153
|
+
**Examples:**
|
|
154
|
+
```bash
|
|
155
|
+
# Download by filename
|
|
156
|
+
biofs download sample.vcf ./downloads/
|
|
157
|
+
|
|
158
|
+
# Download by BioCID
|
|
159
|
+
biofs download biocid://0x123.../bioip/456 ./my-file.vcf
|
|
160
|
+
|
|
161
|
+
# Stream large file
|
|
162
|
+
biofs download genome.bam --stream --output ./genome.bam
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Upload Files
|
|
166
|
+
```bash
|
|
167
|
+
biofs upload <file>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Alias:** `biofs put`
|
|
171
|
+
|
|
172
|
+
**Options:**
|
|
173
|
+
| Option | Description |
|
|
174
|
+
|--------|-------------|
|
|
175
|
+
| `--type <type>` | File type: vcf, fastq, bam, pdf |
|
|
176
|
+
| `--tokenize` | Mint as NFT after upload |
|
|
177
|
+
| `--share-with <lab>` | Share with lab after upload |
|
|
178
|
+
| `--public` | Make publicly discoverable |
|
|
179
|
+
| `--quiet` | No progress output |
|
|
180
|
+
|
|
181
|
+
**Example:**
|
|
182
|
+
```bash
|
|
183
|
+
biofs upload ./my-genome.vcf --tokenize --share-with 0xLabWallet
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Mount as Filesystem
|
|
187
|
+
```bash
|
|
188
|
+
biofs mount <mount_point>
|
|
189
|
+
```
|
|
190
|
+
Mounts your BioFiles as a local filesystem.
|
|
191
|
+
|
|
192
|
+
**Options:**
|
|
193
|
+
| Option | Description |
|
|
194
|
+
|--------|-------------|
|
|
195
|
+
| `--method <type>` | `nfs` (filesystem) or `copy` (download) |
|
|
196
|
+
| `--biocid <biocid>` | Mount specific BioCID only |
|
|
197
|
+
| `--port <number>` | NFS server port (default: 2049) |
|
|
198
|
+
| `--read-only` | Mount as read-only |
|
|
199
|
+
| `--skip-consent` | Skip GDPR consent |
|
|
200
|
+
|
|
201
|
+
**Examples:**
|
|
202
|
+
```bash
|
|
203
|
+
# Mount all granted files
|
|
204
|
+
biofs mount /mnt/biofiles
|
|
205
|
+
|
|
206
|
+
# Mount specific biosample on remote GPU agent
|
|
207
|
+
biofs mount-remote 55052008714000
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Unmount
|
|
211
|
+
```bash
|
|
212
|
+
biofs umount <mount_point>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Options:**
|
|
216
|
+
| Option | Description |
|
|
217
|
+
|--------|-------------|
|
|
218
|
+
| `--force` | Force unmount even if busy |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Tokenization
|
|
223
|
+
|
|
224
|
+
Tokenize genomic data as BioNFT on the Sequentia Network for consent-gated access.
|
|
225
|
+
|
|
226
|
+
### Tokenize Local File
|
|
227
|
+
```bash
|
|
228
|
+
biofs tokenize file <file>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Options:**
|
|
232
|
+
| Option | Description |
|
|
233
|
+
|--------|-------------|
|
|
234
|
+
| `--title <string>` | Custom NFT title |
|
|
235
|
+
| `--description <string>` | Custom description (AI-generated if omitted) |
|
|
236
|
+
| `--license <type>` | `commercial` or `non-commercial` |
|
|
237
|
+
| `--collection <address>` | Manual collection address |
|
|
238
|
+
| `--no-ai` | Skip AI classification |
|
|
239
|
+
| `--yes` | Auto-confirm prompts |
|
|
240
|
+
|
|
241
|
+
**Example:**
|
|
242
|
+
```bash
|
|
243
|
+
biofs tokenize file ./exome.vcf --license non-commercial --yes
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Tokenize FASTQ Files from S3
|
|
247
|
+
```bash
|
|
248
|
+
biofs tokenize fastqs <biosample_serial>
|
|
249
|
+
```
|
|
250
|
+
Creates a BioNFT consent record for existing FASTQ files in S3.
|
|
251
|
+
|
|
252
|
+
**Options:**
|
|
253
|
+
| Option | Description |
|
|
254
|
+
|--------|-------------|
|
|
255
|
+
| `--recipient <wallet>` | Grant access to wallet |
|
|
256
|
+
| `--license <type>` | License type |
|
|
257
|
+
| `--yes` | Auto-confirm prompts |
|
|
258
|
+
|
|
259
|
+
**Example:**
|
|
260
|
+
```bash
|
|
261
|
+
biofs tokenize fastqs 55052008714000 --recipient 0xLabWallet
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Access Control
|
|
267
|
+
|
|
268
|
+
Manage who can access your BioNFT-gated genomic data.
|
|
269
|
+
|
|
270
|
+
### Request Access
|
|
271
|
+
```bash
|
|
272
|
+
biofs access request <biocid_or_ip_id>
|
|
273
|
+
```
|
|
274
|
+
Request access to someone else's BioNFT asset.
|
|
275
|
+
|
|
276
|
+
**Options:**
|
|
277
|
+
| Option | Description |
|
|
278
|
+
|--------|-------------|
|
|
279
|
+
| `--message <string>` | Message to asset owner |
|
|
280
|
+
|
|
281
|
+
### Grant Access (Owner Only)
|
|
282
|
+
```bash
|
|
283
|
+
biofs access grant <biocid_or_ip_id> <wallet_address>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Options:**
|
|
287
|
+
| Option | Description |
|
|
288
|
+
|--------|-------------|
|
|
289
|
+
| `--expires-in <duration>` | Expiry duration (e.g., `30d`, `90d`) |
|
|
290
|
+
|
|
291
|
+
**Example:**
|
|
292
|
+
```bash
|
|
293
|
+
biofs access grant biocid://0x123.../bioip/456 0xResearcher --expires-in 90d
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Revoke Access (Owner Only)
|
|
297
|
+
```bash
|
|
298
|
+
biofs access revoke <biocid_or_ip_id> <wallet_address>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Options:**
|
|
302
|
+
| Option | Description |
|
|
303
|
+
|--------|-------------|
|
|
304
|
+
| `--yes` | Skip confirmation |
|
|
305
|
+
|
|
306
|
+
### List Permissions
|
|
307
|
+
```bash
|
|
308
|
+
biofs access list [biocid_or_ip_id]
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Options:**
|
|
312
|
+
| Option | Description |
|
|
313
|
+
|--------|-------------|
|
|
314
|
+
| `--mine` | List assets you have access to |
|
|
315
|
+
| `--status <status>` | Filter: active, pending, revoked |
|
|
316
|
+
| `--json` | Output as JSON |
|
|
317
|
+
|
|
318
|
+
**Examples:**
|
|
319
|
+
```bash
|
|
320
|
+
# List who has access to your asset
|
|
321
|
+
biofs access list biocid://0x123.../bioip/456
|
|
322
|
+
|
|
323
|
+
# List assets you can access
|
|
324
|
+
biofs access list --mine
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Check Your Access
|
|
328
|
+
```bash
|
|
329
|
+
biofs access check <biocid_or_ip_id>
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Revoke Your Consent (GDPR Right to Withdraw)
|
|
333
|
+
```bash
|
|
334
|
+
biofs access revoke-consent [ip_id]
|
|
335
|
+
```
|
|
336
|
+
Withdraw your consent for genomic data access.
|
|
337
|
+
|
|
338
|
+
**Options:**
|
|
339
|
+
| Option | Description |
|
|
340
|
+
|--------|-------------|
|
|
341
|
+
| `--all` | Revoke all consents |
|
|
342
|
+
| `--force` | Skip confirmation |
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Data Sharing
|
|
347
|
+
|
|
348
|
+
### Share with a Lab
|
|
349
|
+
```bash
|
|
350
|
+
biofs share <biocid_or_filename> --lab <wallet_address>
|
|
351
|
+
```
|
|
352
|
+
Shares your file with an approved research lab using dual NFT minting.
|
|
353
|
+
|
|
354
|
+
**Options:**
|
|
355
|
+
| Option | Description |
|
|
356
|
+
|--------|-------------|
|
|
357
|
+
| `--lab <wallet>` | **Required.** Lab wallet address |
|
|
358
|
+
| `--license <type>` | `non-commercial`, `commercial`, `commercial-remix` |
|
|
359
|
+
| `--verbose` | Show detailed progress |
|
|
360
|
+
|
|
361
|
+
**Example:**
|
|
362
|
+
```bash
|
|
363
|
+
# Share VCF with cancer research lab
|
|
364
|
+
biofs share my-exome.vcf --lab 0xCancerLabWallet --license non-commercial
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### View Permission Graph
|
|
368
|
+
```bash
|
|
369
|
+
biofs shares
|
|
370
|
+
```
|
|
371
|
+
Shows files shared with you and by you.
|
|
372
|
+
|
|
373
|
+
**Options:**
|
|
374
|
+
| Option | Description |
|
|
375
|
+
|--------|-------------|
|
|
376
|
+
| `--json` | Output as JSON |
|
|
377
|
+
| `--graphql` | Show GraphQL schema |
|
|
378
|
+
|
|
379
|
+
### List Approved Labs
|
|
380
|
+
```bash
|
|
381
|
+
biofs labnfts
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
**Alias:** `biofs labs`
|
|
385
|
+
|
|
386
|
+
**Options:**
|
|
387
|
+
| Option | Description |
|
|
388
|
+
|--------|-------------|
|
|
389
|
+
| `--filter <specialization>` | Filter by specialization |
|
|
390
|
+
| `--location <location>` | Filter by location |
|
|
391
|
+
| `--json` | Output as JSON |
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Research Jobs
|
|
396
|
+
|
|
397
|
+
Submit genomic analysis jobs to the BioOS distributed processing network.
|
|
398
|
+
|
|
399
|
+
### Create a Job
|
|
400
|
+
```bash
|
|
401
|
+
biofs job create "<prompt>" <file>
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Options:**
|
|
405
|
+
| Option | Description |
|
|
406
|
+
|--------|-------------|
|
|
407
|
+
| `--pipeline <template>` | Use predefined pipeline |
|
|
408
|
+
| `--json` | Output as JSON |
|
|
409
|
+
|
|
410
|
+
**Example:**
|
|
411
|
+
```bash
|
|
412
|
+
biofs job create "Find pathogenic variants in BRCA genes" my-exome.vcf
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Check Job Status
|
|
416
|
+
```bash
|
|
417
|
+
biofs job status <job_id>
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Options:**
|
|
421
|
+
| Option | Description |
|
|
422
|
+
|--------|-------------|
|
|
423
|
+
| `--json` | Output as JSON |
|
|
424
|
+
| `--watch` | Refresh every 5 seconds |
|
|
425
|
+
|
|
426
|
+
### Get Job Results
|
|
427
|
+
```bash
|
|
428
|
+
biofs job results <job_id>
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Options:**
|
|
432
|
+
| Option | Description |
|
|
433
|
+
|--------|-------------|
|
|
434
|
+
| `--json` | Output as JSON |
|
|
435
|
+
| `--step <number>` | Download specific step |
|
|
436
|
+
|
|
437
|
+
### List All Jobs
|
|
438
|
+
```bash
|
|
439
|
+
biofs job list
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Options:**
|
|
443
|
+
| Option | Description |
|
|
444
|
+
|--------|-------------|
|
|
445
|
+
| `--status <status>` | Filter: pending, running, completed, failed |
|
|
446
|
+
| `--limit <number>` | Limit results |
|
|
447
|
+
| `--json` | Output as JSON |
|
|
448
|
+
|
|
449
|
+
### List Pipeline Templates
|
|
450
|
+
```bash
|
|
451
|
+
biofs job pipelines
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### Submit Clara Parabricks Job
|
|
455
|
+
```bash
|
|
456
|
+
biofs job submit-clara <biosample_id> [fastq_r1] [fastq_r2]
|
|
457
|
+
```
|
|
458
|
+
Submit GPU-accelerated variant calling (FASTQ → VCF).
|
|
459
|
+
|
|
460
|
+
**Options:**
|
|
461
|
+
| Option | Description |
|
|
462
|
+
|--------|-------------|
|
|
463
|
+
| `--job-id <id>` | Custom job ID |
|
|
464
|
+
| `--reference <genome>` | Reference genome (default: hg38) |
|
|
465
|
+
| `--capture-kit <kit>` | Capture kit (default: agilent_v8) |
|
|
466
|
+
| `--sequencing-type <type>` | WES or WGS |
|
|
467
|
+
| `--interval-file <path>` | BED file for targeted sequencing |
|
|
468
|
+
|
|
469
|
+
**Example:**
|
|
470
|
+
```bash
|
|
471
|
+
biofs job submit-clara 55052008714000 --sequencing-type WES
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Check Agent Health
|
|
475
|
+
```bash
|
|
476
|
+
biofs agent-health
|
|
477
|
+
```
|
|
478
|
+
Verify the GPU processing agent is ready.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## GDPR Compliance
|
|
483
|
+
|
|
484
|
+
BioFS is designed for GDPR-compliant genomic data management.
|
|
485
|
+
|
|
486
|
+
### Verify File Integrity
|
|
487
|
+
```bash
|
|
488
|
+
biofs verify <biocid_or_filename> <local_file>
|
|
489
|
+
```
|
|
490
|
+
Uses DNA fingerprinting (Bloom filter) to verify file integrity.
|
|
491
|
+
|
|
492
|
+
### Extract Phenotype-Specific SNPs (Data Minimization)
|
|
493
|
+
```bash
|
|
494
|
+
biofs dissect "<phenotype_query>" <source_file>
|
|
495
|
+
```
|
|
496
|
+
AI-powered extraction of phenotype-specific SNP subsets.
|
|
497
|
+
|
|
498
|
+
**Options:**
|
|
499
|
+
| Option | Description |
|
|
500
|
+
|--------|-------------|
|
|
501
|
+
| `--share <wallet>` | Share derivative with wallet |
|
|
502
|
+
| `--license <type>` | License type |
|
|
503
|
+
| `--min-snps <number>` | Minimum SNPs to discover |
|
|
504
|
+
| `--output <path>` | Save locally |
|
|
505
|
+
|
|
506
|
+
**Example:**
|
|
507
|
+
```bash
|
|
508
|
+
biofs dissect "cardiovascular risk variants" my-exome.vcf --share 0xResearcher
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
### View File Content (Right to Access)
|
|
512
|
+
```bash
|
|
513
|
+
biofs view <biocid_or_filename>
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
**Options:**
|
|
517
|
+
| Option | Description |
|
|
518
|
+
|--------|-------------|
|
|
519
|
+
| `--lines <number>` | Lines to display |
|
|
520
|
+
| `--format <type>` | raw, pretty, json |
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## Troubleshooting
|
|
525
|
+
|
|
526
|
+
### Diagnostic Report
|
|
527
|
+
```bash
|
|
528
|
+
biofs report
|
|
529
|
+
```
|
|
530
|
+
Generates health check report for troubleshooting.
|
|
531
|
+
|
|
532
|
+
**Options:**
|
|
533
|
+
| Option | Description |
|
|
534
|
+
|--------|-------------|
|
|
535
|
+
| `--json` | Output as JSON |
|
|
536
|
+
| `--verbose` | Show verbose debug info |
|
|
537
|
+
|
|
538
|
+
### Enable Debug Mode
|
|
539
|
+
```bash
|
|
540
|
+
biofs --debug <command>
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Common Issues
|
|
544
|
+
|
|
545
|
+
**Authentication Failed**
|
|
546
|
+
```bash
|
|
547
|
+
# Clear credentials and re-login
|
|
548
|
+
biofs logout
|
|
549
|
+
biofs login
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Connection Timeout**
|
|
553
|
+
```bash
|
|
554
|
+
# Check network and retry with longer timeout
|
|
555
|
+
biofs login --timeout 120
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**File Not Found**
|
|
559
|
+
```bash
|
|
560
|
+
# Force refresh file list
|
|
561
|
+
biofs biofiles --update
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**Permission Denied**
|
|
565
|
+
```bash
|
|
566
|
+
# Check your access level
|
|
567
|
+
biofs access check <biocid>
|
|
568
|
+
|
|
569
|
+
# Request access if needed
|
|
570
|
+
biofs access request <biocid>
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Environment Variables
|
|
576
|
+
|
|
577
|
+
| Variable | Description |
|
|
578
|
+
|----------|-------------|
|
|
579
|
+
| `BIOFS_NODE_URL` | BioFS-Node server URL |
|
|
580
|
+
| `DEBUG` | Enable debug output |
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## Configuration Files
|
|
585
|
+
|
|
586
|
+
| File | Location | Purpose |
|
|
587
|
+
|------|----------|---------|
|
|
588
|
+
| Credentials | `~/.biofs/credentials.json` | Stored wallet + signature |
|
|
589
|
+
| Config | `~/.biofs/config.json` | User preferences |
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## Support
|
|
594
|
+
|
|
595
|
+
- **Documentation:** https://docs.genobank.io/biofs
|
|
596
|
+
- **GitHub Issues:** https://github.com/Genobank/biofs-cli/issues
|
|
597
|
+
- **Email:** support@genobank.io
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
*BioFS CLI is part of the GenoBank.io ecosystem for decentralized genomic data management.*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require("@nomicfoundation/hardhat-toolbox");
|
|
2
|
+
|
|
3
|
+
/** @type import('hardhat/config').HardhatUserConfig */
|
|
4
|
+
module.exports = {
|
|
5
|
+
solidity: {
|
|
6
|
+
version: "0.8.19", // CRITICAL: Max 0.8.19 for Sequentia (no PUSH0)
|
|
7
|
+
settings: {
|
|
8
|
+
optimizer: {
|
|
9
|
+
enabled: true,
|
|
10
|
+
runs: 200
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
networks: {
|
|
15
|
+
sequentia: {
|
|
16
|
+
url: "http://54.226.180.9:8545",
|
|
17
|
+
chainId: 15132025,
|
|
18
|
+
accounts: [
|
|
19
|
+
"0xfaa9148191dfcb99dc713f2652315b09df590a59e07c78a8d59c288d7f4a5013"
|
|
20
|
+
],
|
|
21
|
+
gas: 5000000,
|
|
22
|
+
gasPrice: 0
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @type {import('jest').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
preset: 'ts-jest',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
roots: ['<rootDir>/test'],
|
|
6
|
+
testMatch: ['**/*.test.ts'],
|
|
7
|
+
moduleFileExtensions: ['ts', 'js', 'json'],
|
|
8
|
+
collectCoverageFrom: [
|
|
9
|
+
'src/**/*.ts',
|
|
10
|
+
'!src/**/*.d.ts',
|
|
11
|
+
'!src/**/index.ts'
|
|
12
|
+
],
|
|
13
|
+
coverageDirectory: 'coverage',
|
|
14
|
+
coverageReporters: ['text', 'lcov'],
|
|
15
|
+
transform: {
|
|
16
|
+
'^.+\\.ts$': ['ts-jest', {
|
|
17
|
+
tsconfig: {
|
|
18
|
+
esModuleInterop: true,
|
|
19
|
+
strict: false,
|
|
20
|
+
types: ['jest', 'node']
|
|
21
|
+
}
|
|
22
|
+
}]
|
|
23
|
+
},
|
|
24
|
+
moduleNameMapper: {
|
|
25
|
+
'^@/(.*)$': '<rootDir>/src/$1'
|
|
26
|
+
}
|
|
27
|
+
};
|