@genobank/biofs 1.6.0 → 1.6.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
1
+ # Changelog
2
+
3
+ All notable changes to BioFS CLI will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.6.0] - 2025-10-16
9
+
10
+ ### Added
11
+ - **Programmatic Authentication**: New `--wallet` and `--signature` options for `biofs login` command
12
+ - Enables server-side and CI/CD authentication without browser interaction
13
+ - Maintains full NFT-gated access control
14
+ - Validates Ethereum wallet address format (40 hex characters)
15
+ - Validates signature format (130 hex characters / 65 bytes)
16
+
17
+ ### Changed
18
+ - Enhanced `LoginOptions` interface with optional wallet and signature parameters
19
+ - Updated CLI command registration to expose new authentication options
20
+ - Improved error messages for invalid wallet/signature formats
21
+
22
+ ### Security
23
+ - Direct authentication maintains same NFT-gated security model as browser-based flow
24
+ - All credentials are validated before being saved
25
+ - Credentials stored in `~/.genobank/credentials.json` with appropriate permissions
26
+
27
+ ### Usage Examples
28
+
29
+ #### Direct Authentication (New in 1.6.0)
30
+ ```bash
31
+ biofs login --wallet 0x5f5a60eaef242c0d51a21c703f520347b96ed19a --signature 0xa5141ae955...
32
+ ```
33
+
34
+ #### Browser-Based Authentication (Still Supported)
35
+ ```bash
36
+ biofs login # Opens browser for MetaMask/BioWallet authentication
37
+ ```
38
+
39
+ ### Technical Details
40
+ - Modified files:
41
+ - `src/commands/login.ts`: Added wallet/signature validation and direct auth logic
42
+ - `src/index.ts`: Registered new CLI options
43
+ - `package.json`: Version bump 1.5.2 → 1.6.0
44
+
45
+ ### Backward Compatibility
46
+ - ✅ Fully backward compatible with existing browser-based authentication
47
+ - ✅ No breaking changes to existing commands or APIs
48
+ - ✅ Credentials format unchanged
49
+
50
+ ## [1.5.2] - Previous Release
51
+ - (Previous changelog entries...)
52
+
@@ -0,0 +1,218 @@
1
+ # BioFS CLI v1.6.0 - Programmatic Authentication Enhancement
2
+
3
+ ## Overview
4
+
5
+ BioFS v1.6.0 introduces programmatic authentication via command-line parameters, enabling server-side and CI/CD workflows while maintaining full NFT-gated security.
6
+
7
+ ## New Features
8
+
9
+ ### Direct Authentication with Wallet & Signature
10
+
11
+ Previously, `biofs login` required interactive browser authentication. Now you can authenticate directly:
12
+
13
+ ```bash
14
+ biofs login --wallet <WALLET_ADDRESS> --signature <SIGNATURE>
15
+ ```
16
+
17
+ ### Use Cases
18
+
19
+ 1. **Server-Side Scripts**: Authenticate BioFS in production APIs without browser interaction
20
+ 2. **CI/CD Pipelines**: Automated genomic data processing workflows
21
+ 3. **Batch Processing**: Process multiple BioFiles programmatically
22
+ 4. **API Integration**: Integrate BioFS with backend services
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ npm install -g @genobank/biofs@1.6.0
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ### Method 1: Direct Authentication (New in v1.6.0)
33
+
34
+ ```bash
35
+ # Authenticate with wallet and signature
36
+ biofs login --wallet 0x5f5a60eaef242c0d51a21c703f520347b96ed19a \
37
+ --signature 0xa5141ae955bba91ad46a940aefc3b05120489b8b776a180668e5b849f16254d44982fb867724390b388ea3bbc606ab4128e264c7b4d3de4082aeb63c3144af501c
38
+
39
+ # Verify authentication
40
+ biofs whoami
41
+
42
+ # List your BioFiles (NFT-gated)
43
+ biofs files
44
+
45
+ # Download a specific file
46
+ biofs download <biocid> ./output.vcf
47
+ ```
48
+
49
+ ### Method 2: Browser Authentication (Still Supported)
50
+
51
+ ```bash
52
+ # Traditional browser-based flow
53
+ biofs login # Opens auth.genobank.app in browser
54
+ ```
55
+
56
+ ## Environment Variable Pattern
57
+
58
+ For production deployments, store credentials in environment variables:
59
+
60
+ ```bash
61
+ # .env file
62
+ BIOFS_WALLET=0x5f5a60eaef242c0d51a21c703f520347b96ed19a
63
+ BIOFS_SIGNATURE=0xa5141ae955bba91ad46a940aefc3b05120489b8b776a180668e5b849f16254d44982fb867724390b388ea3bbc606ab4128e264c7b4d3de4082aeb63c3144af501c
64
+
65
+ # Script usage
66
+ biofs login --wallet $BIOFS_WALLET --signature $BIOFS_SIGNATURE
67
+ ```
68
+
69
+ ## Integration Example: Claude AI API with BioFS
70
+
71
+ ```python
72
+ # api_claude_ia_researcher_web3.py
73
+ import os
74
+ import subprocess
75
+
76
+ class ClaudeGenomicAPI:
77
+ def __init__(self):
78
+ self.wallet = os.environ['BIOFS_WALLET']
79
+ self.signature = os.environ['BIOFS_SIGNATURE']
80
+ self._authenticate()
81
+
82
+ def _authenticate(self):
83
+ """Authenticate BioFS with wallet/signature"""
84
+ subprocess.run([
85
+ 'biofs', 'login',
86
+ '--wallet', self.wallet,
87
+ '--signature', self.signature
88
+ ], check=True)
89
+
90
+ def load_sqlite_from_biofs(self, biocid):
91
+ """Download SQLite DB from BioFS (NFT-gated)"""
92
+ output_path = f'/tmp/{biocid}.sqlite'
93
+ subprocess.run([
94
+ 'biofs', 'download', biocid, output_path
95
+ ], check=True)
96
+ return output_path
97
+
98
+ def analyze_variants(self, biocid):
99
+ """Analyze variants from BioFS-gated SQLite"""
100
+ sqlite_path = self.load_sqlite_from_biofs(biocid)
101
+ # Load into SQLite and query variants
102
+ # Send to Claude AI for analysis
103
+ # Return insights
104
+ pass
105
+ ```
106
+
107
+ ## Security Considerations
108
+
109
+ ### NFT-Gated Access Control
110
+ - Direct authentication maintains the same BioNFT permission model
111
+ - Only files owned by the authenticated wallet are accessible
112
+ - All access is logged on-chain via Story Protocol
113
+
114
+ ### Credential Validation
115
+ - Wallet address: Validated as 40-character hex Ethereum address
116
+ - Signature: Validated as 130-character hex (65-byte) signature
117
+ - Invalid credentials are rejected before any API calls
118
+
119
+ ### Credential Storage
120
+ - Stored in `~/.genobank/credentials.json`
121
+ - File permissions: Read/write for owner only
122
+ - 30-day expiration by default
123
+
124
+ ## Migration Guide
125
+
126
+ ### From v1.5.2 to v1.6.0
127
+
128
+ No code changes required! The enhancement is fully backward compatible.
129
+
130
+ **Option A: Keep Using Browser Auth**
131
+ ```bash
132
+ biofs login # Works exactly as before
133
+ ```
134
+
135
+ **Option B: Upgrade to Programmatic Auth**
136
+ ```bash
137
+ # Generate signature once via browser
138
+ biofs login # Opens browser, sign with MetaMask
139
+
140
+ # Extract credentials for reuse
141
+ cat ~/.genobank/credentials.json
142
+
143
+ # Use extracted credentials in scripts
144
+ biofs login --wallet <WALLET> --signature <SIGNATURE>
145
+ ```
146
+
147
+ ## Troubleshooting
148
+
149
+ ### Invalid Wallet Format
150
+ ```
151
+ Error: Invalid wallet address format. Expected Ethereum address (0x...)
152
+ ```
153
+ **Solution**: Ensure wallet starts with `0x` and contains exactly 40 hexadecimal characters
154
+
155
+ ### Invalid Signature Format
156
+ ```
157
+ Error: Invalid signature format. Expected 65-byte signature (0x...)
158
+ ```
159
+ **Solution**: Ensure signature starts with `0x` and contains exactly 130 hexadecimal characters (65 bytes)
160
+
161
+ ### NFT Access Denied
162
+ ```
163
+ Error: Access denied. BioNFT ownership verification failed.
164
+ ```
165
+ **Solution**: Verify you own the BioNFT for the requested file. Check ownership on Story Protocol.
166
+
167
+ ## Technical Implementation
168
+
169
+ ### Modified Files
170
+ 1. **src/commands/login.ts**
171
+ - Added `wallet` and `signature` to `LoginOptions` interface
172
+ - Implemented direct authentication flow
173
+ - Added validation logic for wallet/signature formats
174
+
175
+ 2. **src/index.ts**
176
+ - Registered `--wallet` and `--signature` CLI options
177
+ - Updated command description
178
+
179
+ 3. **package.json**
180
+ - Version bump: 1.5.2 → 1.6.0
181
+
182
+ ### Code Flow
183
+
184
+ ```
185
+ biofs login --wallet 0x... --signature 0x...
186
+ ↓
187
+ LoginOptions interface validates parameters
188
+ ↓
189
+ Wallet format validation (^0x[a-fA-F0-9]{40}$)
190
+ ↓
191
+ Signature format validation (^0x[a-fA-F0-9]{130}$)
192
+ ↓
193
+ CredentialsManager.saveCredentials()
194
+ ↓
195
+ Credentials stored in ~/.genobank/credentials.json
196
+ ↓
197
+ Success message with available commands
198
+ ```
199
+
200
+ ## Version History
201
+
202
+ - **v1.6.0** (2025-10-16): Programmatic authentication via `--wallet` and `--signature`
203
+ - **v1.5.2** (Previous): Browser-based authentication only
204
+
205
+ ## Support
206
+
207
+ - GitHub Issues: https://github.com/genobank/biofs-cli/issues
208
+ - Documentation: https://docs.genobank.io/biofs
209
+ - Email: tech@genobank.io
210
+
211
+ ## License
212
+
213
+ MIT License - See LICENSE file for details
214
+
215
+ ---
216
+
217
+ **Built with ❤️ by GenoBank.io**
218
+ *Empowering genomic data ownership through blockchain technology*
@@ -2,6 +2,8 @@ export interface LoginOptions {
2
2
  port?: number;
3
3
  browser?: boolean;
4
4
  timeout?: number;
5
+ wallet?: string;
6
+ signature?: string;
5
7
  }
6
8
  export declare function loginCommand(options: LoginOptions): Promise<void>;
7
9
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgEvE"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkGvE"}
@@ -12,12 +12,37 @@ const constants_1 = require("../lib/config/constants");
12
12
  const chalk_1 = __importDefault(require("chalk"));
13
13
  async function loginCommand(options) {
14
14
  const credManager = credentials_1.CredentialsManager.getInstance();
15
+ // NEW: Direct authentication with provided credentials
16
+ if (options.wallet && options.signature) {
17
+ logger_1.Logger.info('Using provided credentials for direct authentication...');
18
+ // Validate wallet address format (Ethereum address)
19
+ if (!options.wallet.match(/^0x[a-fA-F0-9]{40}$/)) {
20
+ logger_1.Logger.error('Invalid wallet address format. Expected Ethereum address (0x...)');
21
+ process.exit(1);
22
+ }
23
+ // Validate signature format
24
+ if (!options.signature.match(/^0x[a-fA-F0-9]{130}$/)) {
25
+ logger_1.Logger.error('Invalid signature format. Expected 65-byte signature (0x...)');
26
+ process.exit(1);
27
+ }
28
+ // Save credentials directly
29
+ await credManager.saveCredentials(options.wallet, options.signature);
30
+ // Show success message
31
+ logger_1.Logger.box(`Wallet: ${chalk_1.default.green(options.wallet)}\n\n` +
32
+ `You can now use:\n` +
33
+ ` ${chalk_1.default.cyan('biofs files')} - List your BioFiles\n` +
34
+ ` ${chalk_1.default.cyan('biofs download')} - Download files\n` +
35
+ ` ${chalk_1.default.cyan('biofs upload')} - Upload files\n` +
36
+ ` ${chalk_1.default.cyan('biofs whoami')} - Show current wallet`, 'Direct Authentication Successful');
37
+ logger_1.Logger.success(`Credentials saved to: ~/.genobank/credentials.json`);
38
+ return;
39
+ }
15
40
  // Check if already authenticated
16
41
  if (await credManager.hasCredentials()) {
17
42
  const creds = await credManager.loadCredentials();
18
43
  if (creds) {
19
44
  logger_1.Logger.info(`Already authenticated as: ${logger_1.Logger.formatWallet(creds.wallet_address)}`);
20
- logger_1.Logger.info('Run "genobank logout" to switch accounts');
45
+ logger_1.Logger.info('Run "biofs logout" to switch accounts');
21
46
  return;
22
47
  }
23
48
  }
@@ -48,10 +73,10 @@ async function loginCommand(options) {
48
73
  // Show success message
49
74
  logger_1.Logger.box(`Wallet: ${chalk_1.default.green(result.wallet)}\n\n` +
50
75
  `You can now use:\n` +
51
- ` ${chalk_1.default.cyan('genobank files')} - List your BioFiles\n` +
52
- ` ${chalk_1.default.cyan('genobank download')} - Download files\n` +
53
- ` ${chalk_1.default.cyan('genobank upload')} - Upload files\n` +
54
- ` ${chalk_1.default.cyan('genobank whoami')} - Show current wallet`, 'Authentication Successful');
76
+ ` ${chalk_1.default.cyan('biofs files')} - List your BioFiles\n` +
77
+ ` ${chalk_1.default.cyan('biofs download')} - Download files\n` +
78
+ ` ${chalk_1.default.cyan('biofs upload')} - Upload files\n` +
79
+ ` ${chalk_1.default.cyan('biofs whoami')} - Show current wallet`, 'Authentication Successful');
55
80
  logger_1.Logger.success(`Credentials saved to: ~/.genobank/credentials.json`);
56
81
  }
57
82
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;;;AAaA,oCAgEC;AA7ED,+CAAoD;AACpD,iDAAsD;AACtD,yDAA6D;AAC7D,gDAA6C;AAC7C,uDAAiD;AACjD,kDAA0B;AAQnB,KAAK,UAAU,YAAY,CAAC,OAAqB;IACtD,MAAM,WAAW,GAAG,gCAAkB,CAAC,WAAW,EAAE,CAAC;IAErD,iCAAiC;IACjC,IAAI,MAAM,WAAW,CAAC,cAAc,EAAE,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,eAAe,EAAE,CAAC;QAClD,IAAI,KAAK,EAAE,CAAC;YACV,eAAM,CAAC,IAAI,CAAC,6BAA6B,eAAM,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACtF,eAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;YACxD,OAAO;QACT,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,CAAC;IAC9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