@genobank/biofs 2.5.0 → 2.5.2

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/ADMIN_REGISTER_LAB.md +0 -252
  24. package/ANNOTATOR_RECOMMENDATIONS_API.md +0 -490
  25. package/BIOFS_QUICK_START.md +0 -200
  26. package/BIOFS_TOKENIZE_COMPLETE.md +0 -541
  27. package/BIOFS_V1.2.7_PUBLISHED.md +0 -317
  28. package/BIOFS_V1.2.9_FIXES.md +0 -306
  29. package/BIOFS_V1.3.0_DIRECT_GRANT.md +0 -381
  30. package/BIOFS_V1.3.1_GRANTED_FILES.md +0 -328
  31. package/BIONFS_DEPLOYMENT_GUIDE.md +0 -408
  32. package/BIONFS_MOUNT_INTEGRATION_PLAN.md +0 -415
  33. package/BIONFS_PROTOCOL_SPECIFICATION.md +0 -688
  34. package/BIONFS_SEQUENTIAS_INTEGRATION.md +0 -457
  35. package/BIONFT_NFS_PROTOCOL_ARCHITECTURE.md +0 -583
  36. package/BIOOS_CLI_IMPLEMENTATION_COMPLETE.md +0 -422
  37. package/BIOOS_JOB_MANAGEMENT.md +0 -681
  38. package/BUGFIX_V2.1.3.md +0 -72
  39. package/CHANGELOG_V2.1.0.md +0 -386
  40. package/CHANGELOG_V2.2.0.md +0 -284
  41. package/ENHANCEMENT_DOCUMENTATION.md +0 -218
  42. package/GDPR_BIONFS_CONSENT_ARCHITECTURE.md +0 -798
  43. package/GDPR_BIONFS_IMPLEMENTATION_STATUS.md +0 -462
  44. package/INSTALL_V1.2.7_ON_MAC.md +0 -306
  45. package/LABNFT_BIOFS_INTEGRATION.md +0 -396
  46. package/OPENCRAVAT_ANNOTATORS_REFERENCE.md +0 -340
  47. package/OPENCRAVAT_ANNOTATOR_INTELLIGENCE_COMPLETE.md +0 -479
  48. package/QUICK_START_V2.1.0.md +0 -116
  49. package/RELEASE_SUMMARY_V1.2.7.md +0 -479
  50. package/RELEASE_SUMMARY_V1.3.0.md +0 -324
  51. package/SEQUENTIAS_PROTOCOL_ARCHITECTURE.md +0 -880
  52. package/SEQUENTIA_MIGRATION_GUIDE.md +0 -337
  53. package/SESSION_SUMMARY_DIRECT_GRANT.md +0 -321
  54. package/ULTRATHINK_BIONFS_COMPLETE.md +0 -458
  55. package/WEB3FUSE_LICENSE_TOKEN_ANALYSIS.md +0 -494
  56. package/WHERE_PERMISSIONS_LIVE.md +0 -165
  57. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +0 -4
  58. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +0 -63
  59. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.dbg.json +0 -4
  60. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +0 -328
  61. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +0 -4
  62. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +0 -357
  63. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +0 -4
  64. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +0 -296
  65. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +0 -4
  66. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +0 -45
  67. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.dbg.json +0 -4
  68. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +0 -373
  69. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +0 -4
  70. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +0 -341
  71. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +0 -4
  72. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +0 -10
  73. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +0 -4
  74. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -10
  75. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +0 -4
  76. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -10
  77. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +0 -4
  78. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -30
  79. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +0 -4
  80. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -30
  81. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +0 -4
  82. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -10
  83. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +0 -4
  84. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -10
  85. package/artifacts/build-info/1adfbc50ae3e1821260f858a9c689a37.json +0 -1
  86. package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.dbg.json +0 -4
  87. package/artifacts/contracts/ClaraJobNFT.sol/ClaraJobNFT.json +0 -667
  88. package/cache/solidity-files-cache.json +0 -628
  89. package/check_clara2.js +0 -70
  90. package/check_clara3.js +0 -65
  91. package/config.json +0 -21
  92. package/hardhat.config.js +0 -25
  93. package/jest.config.js +0 -27
  94. package/mint_and_link_all.js +0 -128
  95. package/opencravat_annotators_dictionary.json +0 -2356
  96. package/package.json.working.v1.9.2.20251105_023952 +0 -48
  97. package/test-complete-flow.sh +0 -60
  98. package/test.vcf +0 -12
  99. package/test_23andme.txt +0 -12
  100. package/test_v2_mint.js +0 -101
@@ -1,48 +0,0 @@
1
- {
2
- "name": "@genobank/biofs",
3
- "version": "1.9.2",
4
- "description": "BioFS - GenoBank.io BioNFT-Gated S3 CLI with GDPR Consent for genomic data",
5
- "main": "dist/index.js",
6
- "bin": {
7
- "biofs": "./bin/biofs.js"
8
- },
9
- "scripts": {
10
- "build": "tsc",
11
- "dev": "ts-node src/index.ts",
12
- "test": "jest"
13
- },
14
- "dependencies": {
15
- "@google/generative-ai": "^0.24.1",
16
- "axios": "^1.6.0",
17
- "bloom-filters": "^3.0.4",
18
- "boxen": "^5.1.2",
19
- "chalk": "^4.1.2",
20
- "cli-progress": "^3.12.0",
21
- "cli-table3": "^0.6.3",
22
- "commander": "^12.0.0",
23
- "dotenv": "^16.3.0",
24
- "ethers": "^6.9.0",
25
- "express": "^4.18.0",
26
- "form-data": "^4.0.0",
27
- "fs-extra": "^11.2.0",
28
- "inquirer": "^8.2.6",
29
- "open": "^8.4.2",
30
- "ora": "^5.4.1",
31
- "uuid": "^9.0.0"
32
- },
33
- "devDependencies": {
34
- "@types/cli-progress": "^3.11.0",
35
- "@types/express": "^4.17.0",
36
- "@types/fs-extra": "^11.0.0",
37
- "@types/inquirer": "^9.0.9",
38
- "@types/node": "^20.0.0",
39
- "@types/uuid": "^9.0.0",
40
- "ts-node": "^10.9.0",
41
- "typescript": "^5.3.0"
42
- },
43
- "author": "GenoBank",
44
- "license": "MIT",
45
- "engines": {
46
- "node": ">=18.0.0"
47
- }
48
- }
@@ -1,60 +0,0 @@
1
- #!/bin/bash
2
-
3
- # GenoBank CLI Complete Test Script
4
- # Tests all major functionality with CEO credentials
5
-
6
- echo "========================================="
7
- echo "GenoBank CLI Complete Test Suite"
8
- echo "========================================="
9
- echo ""
10
-
11
- # 1. Test whoami command
12
- echo "1. Testing 'whoami' command:"
13
- echo "----------------------------"
14
- genobank whoami
15
- echo ""
16
-
17
- # 2. Test files command
18
- echo "2. Testing 'files' command:"
19
- echo "----------------------------"
20
- genobank files
21
- echo ""
22
-
23
- # 3. Test files with filter
24
- echo "3. Testing 'files --filter vcf' command:"
25
- echo "-----------------------------------------"
26
- genobank files --filter vcf
27
- echo ""
28
-
29
- # 4. Test JSON output
30
- echo "4. Testing 'whoami --json' command:"
31
- echo "------------------------------------"
32
- genobank whoami --json
33
- echo ""
34
-
35
- # 5. Test help
36
- echo "5. Testing 'help' command:"
37
- echo "---------------------------"
38
- genobank help download
39
- echo ""
40
-
41
- # 6. Show version
42
- echo "6. Testing version:"
43
- echo "-------------------"
44
- genobank --version
45
- echo ""
46
-
47
- echo "========================================="
48
- echo "Test Complete!"
49
- echo "========================================="
50
- echo ""
51
- echo "Summary of commands tested:"
52
- echo " ✅ genobank whoami - Show authenticated wallet"
53
- echo " ✅ genobank files - List BioFiles"
54
- echo " ✅ genobank files --filter - Filter by type"
55
- echo " ✅ genobank whoami --json - JSON output"
56
- echo " ✅ genobank help - Help system"
57
- echo " ✅ genobank --version - Version check"
58
- echo ""
59
- echo "Note: Upload and download require actual files"
60
- echo "Login/logout not tested (would clear CEO credentials)"
package/test.vcf DELETED
@@ -1,12 +0,0 @@
1
- ##fileformat=VCFv4.2
2
- ##contig=<ID=chr1,length=248956422>
3
- ##contig=<ID=chr2,length=242193529>
4
- ##INFO=<ID=DP,Number=1,Type=Integer,Description="Total read depth">
5
- ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
6
- ##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read depth">
7
- #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE1
8
- chr1 100 rs123 A G 30 PASS DP=10 GT:DP 0/1:10
9
- chr1 200 rs456 C T 40 PASS DP=15 GT:DP 1/1:15
10
- chr1 300 rs789 G A 35 PASS DP=12 GT:DP 0/1:12
11
- chr2 1000 rs111 T C 50 PASS DP=20 GT:DP 1/1:20
12
- chr2 2000 rs222 A T 45 PASS DP=18 GT:DP 0/1:18
package/test_23andme.txt DELETED
@@ -1,12 +0,0 @@
1
- # This data file generated by 23andMe at: Thu Jan 14 08:00:52 2024
2
- # rsid chromosome position genotype
3
- rs12345 1 100 AG
4
- rs67890 2 200 CC
5
- rs11111 3 300 TT
6
- rs22222 4 400 AG
7
- rs33333 5 500 GG
8
- rs44444 6 600 AA
9
- rs55555 7 700 CT
10
- rs66666 8 800 TG
11
- rs77777 9 900 AC
12
- rs88888 10 1000 GC
package/test_v2_mint.js DELETED
@@ -1,101 +0,0 @@
1
- const { ethers } = require('ethers');
2
-
3
- const CLARA_JOB_NFT_V2 = '0x9B70040299efd49C0BBC607395F92a9492DCcc20';
4
- const BIONFT = '0xA2cD489d7c2eB3FF5e51F13f0641351a33cA32cd';
5
- const RPC = 'http://54.226.180.9:8545';
6
- const MINTER_KEY = '0xfaa9148191dfcb99dc713f2652315b09df590a59e07c78a8d59c288d7f4a5013';
7
-
8
- async function main() {
9
- const provider = new ethers.JsonRpcProvider(RPC);
10
- const wallet = new ethers.Wallet(MINTER_KEY, provider);
11
- console.log('Wallet:', wallet.address);
12
-
13
- // Get BioNFT owner for Memo (token #2)
14
- const bionft = new ethers.Contract(BIONFT, [
15
- 'function ownerOf(uint256 tokenId) view returns (address)',
16
- 'function serialToTokenId(string serial) view returns (uint256)'
17
- ], provider);
18
-
19
- const tokenId = await bionft.serialToTokenId('56102007614180');
20
- console.log('Memo BioNFT Token ID:', tokenId.toString());
21
-
22
- const bionftOwner = await bionft.ownerOf(tokenId);
23
- const checksumOwner = ethers.getAddress(bionftOwner);
24
- console.log('Memo BioWallet:', checksumOwner);
25
-
26
- // ClaraJobNFT V2 contract
27
- const claraAbi = [
28
- 'function mintJob(address to, string biosampleSerial, string vcfPath, string pipeline, string referenceGenome, bytes32 vcfHash, string metadataUri) returns (uint256)',
29
- 'function safeMint(address to, string uri) returns (uint256)',
30
- 'function totalSupply() view returns (uint256)',
31
- 'function owner() view returns (address)'
32
- ];
33
- const clara = new ethers.Contract(CLARA_JOB_NFT_V2, claraAbi, wallet);
34
-
35
- const owner = await clara.owner();
36
- console.log('Contract owner:', owner);
37
- console.log('Wallet is owner:', owner.toLowerCase() === wallet.address.toLowerCase());
38
-
39
- // Prepare mint data
40
- const biosampleSerial = '56102007614180';
41
- const vcfPath = 's3://deepvariant-fastq-to-vcf-genobank.app/output/56102007614180/56102007614180.deepvariant.g.vcf';
42
- const pipeline = 'deepvariant';
43
- const referenceGenome = 'hg38';
44
- const vcfHash = ethers.keccak256(ethers.toUtf8Bytes(vcfPath));
45
-
46
- const metadata = {
47
- name: 'Clara DeepVariant VCF: 56102007614180',
48
- description: 'DeepVariant variant calling results for Memo'
49
- };
50
- const metadataUri = 'data:application/json;base64,' +
51
- Buffer.from(JSON.stringify(metadata)).toString('base64');
52
-
53
- console.log('\nMinting with:');
54
- console.log(' to:', checksumOwner);
55
- console.log(' biosampleSerial:', biosampleSerial);
56
- console.log(' vcfPath:', vcfPath.slice(0, 50) + '...');
57
- console.log(' vcfHash:', vcfHash);
58
-
59
- // Try mintJob
60
- try {
61
- console.log('\n--- Trying mintJob ---');
62
- const tx = await clara.mintJob(
63
- checksumOwner,
64
- biosampleSerial,
65
- vcfPath,
66
- pipeline,
67
- referenceGenome,
68
- vcfHash,
69
- metadataUri,
70
- { gasLimit: 1000000n }
71
- );
72
- console.log('TX sent:', tx.hash);
73
- const receipt = await tx.wait();
74
- console.log('TX status:', receipt.status === 1 ? 'SUCCESS' : 'FAILED');
75
-
76
- const supply = await clara.totalSupply();
77
- console.log('New total supply:', supply.toString());
78
- } catch (e) {
79
- console.log('mintJob error:', e.message);
80
- }
81
-
82
- // Try safeMint as fallback
83
- try {
84
- console.log('\n--- Trying safeMint ---');
85
- const tx = await clara.safeMint(
86
- checksumOwner,
87
- metadataUri,
88
- { gasLimit: 500000n }
89
- );
90
- console.log('TX sent:', tx.hash);
91
- const receipt = await tx.wait();
92
- console.log('TX status:', receipt.status === 1 ? 'SUCCESS' : 'FAILED');
93
-
94
- const supply = await clara.totalSupply();
95
- console.log('New total supply:', supply.toString());
96
- } catch (e) {
97
- console.log('safeMint error:', e.message);
98
- }
99
- }
100
-
101
- main().catch(console.error);