Prototyped /ipfs/download

This commit is contained in:
Chris Troutner
2024-03-07 21:27:06 -08:00
parent dbbd321029
commit e6efc4f49b
5 changed files with 635 additions and 70 deletions
+558 -66
View File
@@ -12,6 +12,7 @@
"@chainsafe/libp2p-gossipsub": "11.0.1", "@chainsafe/libp2p-gossipsub": "11.0.1",
"@chainsafe/libp2p-noise": "14.1.0", "@chainsafe/libp2p-noise": "14.1.0",
"@chainsafe/libp2p-yamux": "6.0.1", "@chainsafe/libp2p-yamux": "6.0.1",
"@helia/unixfs": "3.0.1",
"@libp2p/bootstrap": "10.0.7", "@libp2p/bootstrap": "10.0.7",
"@libp2p/circuit-relay-v2": "1.0.13", "@libp2p/circuit-relay-v2": "1.0.13",
"@libp2p/identify": "1.0.6", "@libp2p/identify": "1.0.6",
@@ -26,6 +27,7 @@
"glob": "7.1.6", "glob": "7.1.6",
"helia": "2.1.0", "helia": "2.1.0",
"helia-coord": "1.5.4", "helia-coord": "1.5.4",
"ipfs-unixfs-exporter": "13.5.0",
"jsonrpc-lite": "2.2.0", "jsonrpc-lite": "2.2.0",
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"jwt-bch-lib": "1.3.0", "jwt-bch-lib": "1.3.0",
@@ -113,6 +115,11 @@
"node": ">=6.0.0" "node": ">=6.0.0"
} }
}, },
"node_modules/@assemblyscript/loader": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
"integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA=="
},
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
"version": "7.23.5", "version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
@@ -3174,6 +3181,70 @@
"uint8arraylist": "^2.4.3" "uint8arraylist": "^2.4.3"
} }
}, },
"node_modules/@helia/unixfs": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@helia/unixfs/-/unixfs-3.0.1.tgz",
"integrity": "sha512-NgT0gk3oswUK+8IEnJDl6IGv5catSQq6IQ1VrO68ZBpJPpo49CyFCqN5CO8IC3QL3wi4JyJ0sTLXemMVkUsTVA==",
"dependencies": {
"@helia/interface": "^4.0.1",
"@ipld/dag-pb": "^4.1.0",
"@libp2p/interface": "^1.1.4",
"@libp2p/logger": "^4.0.7",
"@multiformats/murmur3": "^2.1.8",
"hamt-sharding": "^3.0.6",
"interface-blockstore": "^5.2.10",
"ipfs-unixfs": "^11.1.3",
"ipfs-unixfs-exporter": "^13.5.0",
"ipfs-unixfs-importer": "^15.2.4",
"it-all": "^3.0.4",
"it-glob": "^2.0.6",
"it-last": "^3.0.4",
"it-pipe": "^3.0.1",
"merge-options": "^3.0.4",
"multiformats": "^13.1.0",
"progress-events": "^1.0.0",
"sparse-array": "^1.3.2",
"uint8arrays": "^5.0.2"
}
},
"node_modules/@helia/unixfs/node_modules/@helia/interface": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@helia/interface/-/interface-4.0.1.tgz",
"integrity": "sha512-tp9dLlog9x5C/+gE4FF452slemnTQtpS3RneGOatx51nDaE76/HHOmW1hIAASuFtjPHeg/R9BAM8UIX4DEffsg==",
"dependencies": {
"@libp2p/interface": "^1.1.4",
"interface-blockstore": "^5.2.10",
"interface-datastore": "^8.2.11",
"interface-store": "^5.1.8",
"multiformats": "^13.1.0",
"progress-events": "^1.0.0"
}
},
"node_modules/@helia/unixfs/node_modules/@libp2p/logger": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.7.tgz",
"integrity": "sha512-oyICns7G18S4eDhbFHUwZ7gLQnZTBVQtUMmMgEmrs8LnQu2GvXADxmQAPPkKtLNSCvRudg4hN3hP04Y+vNvlBQ==",
"dependencies": {
"@libp2p/interface": "^1.1.4",
"@multiformats/multiaddr": "^12.1.14",
"debug": "^4.3.4",
"interface-datastore": "^8.2.11",
"multiformats": "^13.1.0"
}
},
"node_modules/@helia/unixfs/node_modules/multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"node_modules/@helia/unixfs/node_modules/uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"dependencies": {
"multiformats": "^13.0.0"
}
},
"node_modules/@humanwhocodes/config-array": { "node_modules/@humanwhocodes/config-array": {
"version": "0.11.14", "version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
@@ -3244,11 +3315,11 @@
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA=="
}, },
"node_modules/@ipld/dag-pb": { "node_modules/@ipld/dag-pb": {
"version": "4.0.8", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.0.8.tgz", "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.1.0.tgz",
"integrity": "sha512-693AqMY2jvhe+w4jSwjnDrbhxIu39gm1H4f6/KD5gG+6VFMM6EXV7vq85BvEf8CRsnA0+auWfA29/S8gbWI0Ew==", "integrity": "sha512-LJU451Drqs5zjFm7jI4Hs3kHlilOqkjcSfPiQgVsZnWaYb2C7YdfhnclrVn/X+ucKejlU9BL3+gXFCZUXkMuCg==",
"dependencies": { "dependencies": {
"multiformats": "^13.0.0" "multiformats": "^13.1.0"
}, },
"engines": { "engines": {
"node": ">=16.0.0", "node": ">=16.0.0",
@@ -3256,9 +3327,9 @@
} }
}, },
"node_modules/@ipld/dag-pb/node_modules/multiformats": { "node_modules/@ipld/dag-pb/node_modules/multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}, },
"node_modules/@isaacs/ttlcache": { "node_modules/@isaacs/ttlcache": {
"version": "1.4.1", "version": "1.4.1",
@@ -3535,16 +3606,16 @@
} }
}, },
"node_modules/@libp2p/interface": { "node_modules/@libp2p/interface": {
"version": "1.1.2", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.4.tgz",
"integrity": "sha512-uC4hxtEJuWiDiZfokkSNEEbCzdyZrqb5kp67Wc5PjZsySZ2IoImdIfie003yQXlB1xBp/XUJzdC6kVu4M7LUmg==", "integrity": "sha512-gJXQycTF50tI02X/IlReAav4XoGPs3Yr917vNXsTUsZQRzQaPjbvKfXqA5hkLFpZ1lnxQ8wto/EVw4ca4XaL1A==",
"dependencies": { "dependencies": {
"@multiformats/multiaddr": "^12.1.10", "@multiformats/multiaddr": "^12.1.14",
"it-pushable": "^3.2.3", "it-pushable": "^3.2.3",
"it-stream-types": "^2.0.1", "it-stream-types": "^2.0.1",
"multiformats": "^13.0.0", "multiformats": "^13.1.0",
"progress-events": "^1.0.0", "progress-events": "^1.0.0",
"uint8arraylist": "^2.4.7" "uint8arraylist": "^2.4.8"
} }
}, },
"node_modules/@libp2p/interface-internal": { "node_modules/@libp2p/interface-internal": {
@@ -3559,9 +3630,9 @@
} }
}, },
"node_modules/@libp2p/interface/node_modules/multiformats": { "node_modules/@libp2p/interface/node_modules/multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}, },
"node_modules/@libp2p/kad-dht": { "node_modules/@libp2p/kad-dht": {
"version": "10.0.15", "version": "10.0.15",
@@ -4474,6 +4545,24 @@
"multiformats": "^13.0.0" "multiformats": "^13.0.0"
} }
}, },
"node_modules/@multiformats/murmur3": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/@multiformats/murmur3/-/murmur3-2.1.8.tgz",
"integrity": "sha512-6vId1C46ra3R1sbJUOFCZnsUIveR9oF20yhPmAFxPm0JfrX3/ZRCgP3YDrBzlGoEppOXnA9czHeYc0T9mB6hbA==",
"dependencies": {
"multiformats": "^13.0.0",
"murmurhash3js-revisited": "^3.0.0"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@multiformats/murmur3/node_modules/multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"node_modules/@noble/ciphers": { "node_modules/@noble/ciphers": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz", "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz",
@@ -11200,6 +11289,28 @@
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
"dev": true "dev": true
}, },
"node_modules/hamt-sharding": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-3.0.6.tgz",
"integrity": "sha512-nZeamxfymIWLpVcAN0CRrb7uVq3hCOGj9IcL6NMA6VVCVWqj+h9Jo/SmaWuS92AEDf1thmHsM5D5c70hM3j2Tg==",
"dependencies": {
"sparse-array": "^1.3.1",
"uint8arrays": "^5.0.1"
}
},
"node_modules/hamt-sharding/node_modules/multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"node_modules/hamt-sharding/node_modules/uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"dependencies": {
"multiformats": "^13.0.0"
}
},
"node_modules/handlebars": { "node_modules/handlebars": {
"version": "4.7.8", "version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
@@ -12286,12 +12397,12 @@
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
}, },
"node_modules/interface-blockstore": { "node_modules/interface-blockstore": {
"version": "5.2.9", "version": "5.2.10",
"resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.9.tgz", "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.10.tgz",
"integrity": "sha512-2nyiiOcmGSE5Z0K/Dck5Ayp2a51g1CEG1JyasqNYU/y+n0ykrT9sxuq+Dtc2w3qGpPuBBUirC4HwfGgBT4Z5lA==", "integrity": "sha512-9K48hTvBCGsKVD3pF4ILgDcf+W2P/gq0oxLcsHGB6E6W6nDutYkzR+7k7bCs9REHrBEfKzcVDEKieiuNM9WRZg==",
"dependencies": { "dependencies": {
"interface-store": "^5.0.0", "interface-store": "^5.0.0",
"multiformats": "^13.0.0" "multiformats": "^13.0.1"
} }
}, },
"node_modules/interface-blockstore/node_modules/multiformats": { "node_modules/interface-blockstore/node_modules/multiformats": {
@@ -12300,31 +12411,31 @@
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA=="
}, },
"node_modules/interface-datastore": { "node_modules/interface-datastore": {
"version": "8.2.10", "version": "8.2.11",
"resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz", "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.11.tgz",
"integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==", "integrity": "sha512-9E0iXehfp/j0UbZ2mvlYB4K9pP7uQBCppfuy8WHs1EHF6wLQrM9+zwyX+8Qt6HnH4GKZRyXX/CNXm6oD4+QYgA==",
"dependencies": { "dependencies": {
"interface-store": "^5.0.0", "interface-store": "^5.0.0",
"uint8arrays": "^5.0.0" "uint8arrays": "^5.0.2"
} }
}, },
"node_modules/interface-datastore/node_modules/multiformats": { "node_modules/interface-datastore/node_modules/multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}, },
"node_modules/interface-datastore/node_modules/uint8arrays": { "node_modules/interface-datastore/node_modules/uint8arrays": {
"version": "5.0.1", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", "integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"dependencies": { "dependencies": {
"multiformats": "^13.0.0" "multiformats": "^13.0.0"
} }
}, },
"node_modules/interface-store": { "node_modules/interface-store": {
"version": "5.1.7", "version": "5.1.8",
"resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz", "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.8.tgz",
"integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg==" "integrity": "sha512-7na81Uxkl0vqk0CBPO5PvyTkdaJBaezwUJGsMOz7riPOq0rJt+7W31iaopaMICWea/iykUsvNlPx/Tc+MxC3/w=="
}, },
"node_modules/internal-slot": { "node_modules/internal-slot": {
"version": "1.0.6", "version": "1.0.6",
@@ -12454,6 +12565,81 @@
"multiformats": "^12.0.1" "multiformats": "^12.0.1"
} }
}, },
"node_modules/ipfs-unixfs": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-11.1.3.tgz",
"integrity": "sha512-sy6Koojwm/EcM8yvDlycRYA89C8wIcLcGTMMpqnCPUtqTCdl+JxsuPNCBgAu7tmO8Nipm7Tv7f0g/erxTGKKRA==",
"dependencies": {
"err-code": "^3.0.1",
"protons-runtime": "^5.0.0",
"uint8arraylist": "^2.4.3"
}
},
"node_modules/ipfs-unixfs-exporter": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/ipfs-unixfs-exporter/-/ipfs-unixfs-exporter-13.5.0.tgz",
"integrity": "sha512-s1eWXzoyhQFNEAB1p+QE3adjhW+lBdgpORmmjiCLiruHs5z7T5zsAgRVcWpM8LWYhq2flRtJHObb7Hg73J+oLQ==",
"dependencies": {
"@ipld/dag-cbor": "^9.0.0",
"@ipld/dag-json": "^10.1.7",
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"ipfs-unixfs": "^11.0.0",
"it-filter": "^3.0.2",
"it-last": "^3.0.2",
"it-map": "^3.0.3",
"it-parallel": "^3.0.0",
"it-pipe": "^3.0.1",
"it-pushable": "^3.1.0",
"multiformats": "^13.0.0",
"p-queue": "^8.0.1",
"progress-events": "^1.0.0"
}
},
"node_modules/ipfs-unixfs-exporter/node_modules/multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"node_modules/ipfs-unixfs-importer": {
"version": "15.2.4",
"resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-15.2.4.tgz",
"integrity": "sha512-3b7d/pLPwGvAEXvpJ0WyYlbn2pb2j7qY6FayuMSzbZNdFxdJ82l6VkJ9vK1d/G/AHx+0ZfB06eSdGKjX0GVCAg==",
"dependencies": {
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"interface-store": "^5.0.1",
"ipfs-unixfs": "^11.0.0",
"it-all": "^3.0.2",
"it-batch": "^3.0.2",
"it-first": "^3.0.2",
"it-parallel-batch": "^3.0.1",
"multiformats": "^13.0.0",
"progress-events": "^1.0.0",
"rabin-wasm": "^0.1.4",
"uint8arraylist": "^2.4.3",
"uint8arrays": "^5.0.0"
}
},
"node_modules/ipfs-unixfs-importer/node_modules/multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"node_modules/ipfs-unixfs-importer/node_modules/uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"dependencies": {
"multiformats": "^13.0.0"
}
},
"node_modules/ipns": { "node_modules/ipns": {
"version": "7.0.2", "version": "7.0.2",
"resolved": "https://registry.npmjs.org/ipns/-/ipns-7.0.2.tgz", "resolved": "https://registry.npmjs.org/ipns/-/ipns-7.0.2.tgz",
@@ -13225,6 +13411,11 @@
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/it-last": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/it-last/-/it-last-3.0.4.tgz",
"integrity": "sha512-Ns+KTsQWhs0KCvfv5X3Ck3lpoYxHcp4zUp4d+AOdmC8cXXqDuoZqAjfWhgCbxJubXyIYWdfE2nRcfWqgvZHP8Q=="
},
"node_modules/it-length": { "node_modules/it-length": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.4.tgz", "resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.4.tgz",
@@ -16253,6 +16444,14 @@
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
"integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow=="
}, },
"node_modules/murmurhash3js-revisited": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz",
"integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/nan": { "node_modules/nan": {
"version": "2.18.0", "version": "2.18.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
@@ -20263,6 +20462,55 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/rabin-wasm": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz",
"integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==",
"dependencies": {
"@assemblyscript/loader": "^0.9.4",
"bl": "^5.0.0",
"debug": "^4.3.1",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"readable-stream": "^3.6.0"
},
"bin": {
"rabin-wasm": "cli/bin.js"
}
},
"node_modules/rabin-wasm/node_modules/bl": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
"integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
"dependencies": {
"buffer": "^6.0.3",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"node_modules/rabin-wasm/node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
},
"node_modules/race-event": { "node_modules/race-event": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/race-event/-/race-event-1.1.0.tgz", "resolved": "https://registry.npmjs.org/race-event/-/race-event-1.1.0.tgz",
@@ -22107,6 +22355,11 @@
"source-map": "^0.6.0" "source-map": "^0.6.0"
} }
}, },
"node_modules/sparse-array": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz",
"integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg=="
},
"node_modules/sparse-bitfield": { "node_modules/sparse-bitfield": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
@@ -24313,6 +24566,11 @@
"@jridgewell/trace-mapping": "^0.3.9" "@jridgewell/trace-mapping": "^0.3.9"
} }
}, },
"@assemblyscript/loader": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
"integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA=="
},
"@babel/code-frame": { "@babel/code-frame": {
"version": "7.23.5", "version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
@@ -26421,6 +26679,72 @@
} }
} }
}, },
"@helia/unixfs": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@helia/unixfs/-/unixfs-3.0.1.tgz",
"integrity": "sha512-NgT0gk3oswUK+8IEnJDl6IGv5catSQq6IQ1VrO68ZBpJPpo49CyFCqN5CO8IC3QL3wi4JyJ0sTLXemMVkUsTVA==",
"requires": {
"@helia/interface": "^4.0.1",
"@ipld/dag-pb": "^4.1.0",
"@libp2p/interface": "^1.1.4",
"@libp2p/logger": "^4.0.7",
"@multiformats/murmur3": "^2.1.8",
"hamt-sharding": "^3.0.6",
"interface-blockstore": "^5.2.10",
"ipfs-unixfs": "^11.1.3",
"ipfs-unixfs-exporter": "^13.5.0",
"ipfs-unixfs-importer": "^15.2.4",
"it-all": "^3.0.4",
"it-glob": "^2.0.6",
"it-last": "^3.0.4",
"it-pipe": "^3.0.1",
"merge-options": "^3.0.4",
"multiformats": "^13.1.0",
"progress-events": "^1.0.0",
"sparse-array": "^1.3.2",
"uint8arrays": "^5.0.2"
},
"dependencies": {
"@helia/interface": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@helia/interface/-/interface-4.0.1.tgz",
"integrity": "sha512-tp9dLlog9x5C/+gE4FF452slemnTQtpS3RneGOatx51nDaE76/HHOmW1hIAASuFtjPHeg/R9BAM8UIX4DEffsg==",
"requires": {
"@libp2p/interface": "^1.1.4",
"interface-blockstore": "^5.2.10",
"interface-datastore": "^8.2.11",
"interface-store": "^5.1.8",
"multiformats": "^13.1.0",
"progress-events": "^1.0.0"
}
},
"@libp2p/logger": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.7.tgz",
"integrity": "sha512-oyICns7G18S4eDhbFHUwZ7gLQnZTBVQtUMmMgEmrs8LnQu2GvXADxmQAPPkKtLNSCvRudg4hN3hP04Y+vNvlBQ==",
"requires": {
"@libp2p/interface": "^1.1.4",
"@multiformats/multiaddr": "^12.1.14",
"debug": "^4.3.4",
"interface-datastore": "^8.2.11",
"multiformats": "^13.1.0"
}
},
"multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"requires": {
"multiformats": "^13.0.0"
}
}
}
},
"@humanwhocodes/config-array": { "@humanwhocodes/config-array": {
"version": "0.11.14", "version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
@@ -26477,17 +26801,17 @@
} }
}, },
"@ipld/dag-pb": { "@ipld/dag-pb": {
"version": "4.0.8", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.0.8.tgz", "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.1.0.tgz",
"integrity": "sha512-693AqMY2jvhe+w4jSwjnDrbhxIu39gm1H4f6/KD5gG+6VFMM6EXV7vq85BvEf8CRsnA0+auWfA29/S8gbWI0Ew==", "integrity": "sha512-LJU451Drqs5zjFm7jI4Hs3kHlilOqkjcSfPiQgVsZnWaYb2C7YdfhnclrVn/X+ucKejlU9BL3+gXFCZUXkMuCg==",
"requires": { "requires": {
"multiformats": "^13.0.0" "multiformats": "^13.1.0"
}, },
"dependencies": { "dependencies": {
"multiformats": { "multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
} }
} }
}, },
@@ -26744,22 +27068,22 @@
} }
}, },
"@libp2p/interface": { "@libp2p/interface": {
"version": "1.1.2", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.4.tgz",
"integrity": "sha512-uC4hxtEJuWiDiZfokkSNEEbCzdyZrqb5kp67Wc5PjZsySZ2IoImdIfie003yQXlB1xBp/XUJzdC6kVu4M7LUmg==", "integrity": "sha512-gJXQycTF50tI02X/IlReAav4XoGPs3Yr917vNXsTUsZQRzQaPjbvKfXqA5hkLFpZ1lnxQ8wto/EVw4ca4XaL1A==",
"requires": { "requires": {
"@multiformats/multiaddr": "^12.1.10", "@multiformats/multiaddr": "^12.1.14",
"it-pushable": "^3.2.3", "it-pushable": "^3.2.3",
"it-stream-types": "^2.0.1", "it-stream-types": "^2.0.1",
"multiformats": "^13.0.0", "multiformats": "^13.1.0",
"progress-events": "^1.0.0", "progress-events": "^1.0.0",
"uint8arraylist": "^2.4.7" "uint8arraylist": "^2.4.8"
}, },
"dependencies": { "dependencies": {
"multiformats": { "multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
} }
} }
}, },
@@ -27687,6 +28011,22 @@
"@multiformats/multiaddr": "^12.0.0" "@multiformats/multiaddr": "^12.0.0"
} }
}, },
"@multiformats/murmur3": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/@multiformats/murmur3/-/murmur3-2.1.8.tgz",
"integrity": "sha512-6vId1C46ra3R1sbJUOFCZnsUIveR9oF20yhPmAFxPm0JfrX3/ZRCgP3YDrBzlGoEppOXnA9czHeYc0T9mB6hbA==",
"requires": {
"multiformats": "^13.0.0",
"murmurhash3js-revisited": "^3.0.0"
},
"dependencies": {
"multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}
}
},
"@noble/ciphers": { "@noble/ciphers": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz", "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz",
@@ -33029,6 +33369,30 @@
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
"dev": true "dev": true
}, },
"hamt-sharding": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-3.0.6.tgz",
"integrity": "sha512-nZeamxfymIWLpVcAN0CRrb7uVq3hCOGj9IcL6NMA6VVCVWqj+h9Jo/SmaWuS92AEDf1thmHsM5D5c70hM3j2Tg==",
"requires": {
"sparse-array": "^1.3.1",
"uint8arrays": "^5.0.1"
},
"dependencies": {
"multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"requires": {
"multiformats": "^13.0.0"
}
}
}
},
"handlebars": { "handlebars": {
"version": "4.7.8", "version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
@@ -33907,12 +34271,12 @@
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
}, },
"interface-blockstore": { "interface-blockstore": {
"version": "5.2.9", "version": "5.2.10",
"resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.9.tgz", "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.10.tgz",
"integrity": "sha512-2nyiiOcmGSE5Z0K/Dck5Ayp2a51g1CEG1JyasqNYU/y+n0ykrT9sxuq+Dtc2w3qGpPuBBUirC4HwfGgBT4Z5lA==", "integrity": "sha512-9K48hTvBCGsKVD3pF4ILgDcf+W2P/gq0oxLcsHGB6E6W6nDutYkzR+7k7bCs9REHrBEfKzcVDEKieiuNM9WRZg==",
"requires": { "requires": {
"interface-store": "^5.0.0", "interface-store": "^5.0.0",
"multiformats": "^13.0.0" "multiformats": "^13.0.1"
}, },
"dependencies": { "dependencies": {
"multiformats": { "multiformats": {
@@ -33923,23 +34287,23 @@
} }
}, },
"interface-datastore": { "interface-datastore": {
"version": "8.2.10", "version": "8.2.11",
"resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz", "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.11.tgz",
"integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==", "integrity": "sha512-9E0iXehfp/j0UbZ2mvlYB4K9pP7uQBCppfuy8WHs1EHF6wLQrM9+zwyX+8Qt6HnH4GKZRyXX/CNXm6oD4+QYgA==",
"requires": { "requires": {
"interface-store": "^5.0.0", "interface-store": "^5.0.0",
"uint8arrays": "^5.0.0" "uint8arrays": "^5.0.2"
}, },
"dependencies": { "dependencies": {
"multiformats": { "multiformats": {
"version": "13.0.1", "version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}, },
"uint8arrays": { "uint8arrays": {
"version": "5.0.1", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", "integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"requires": { "requires": {
"multiformats": "^13.0.0" "multiformats": "^13.0.0"
} }
@@ -33947,9 +34311,9 @@
} }
}, },
"interface-store": { "interface-store": {
"version": "5.1.7", "version": "5.1.8",
"resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz", "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.8.tgz",
"integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg==" "integrity": "sha512-7na81Uxkl0vqk0CBPO5PvyTkdaJBaezwUJGsMOz7riPOq0rJt+7W31iaopaMICWea/iykUsvNlPx/Tc+MxC3/w=="
}, },
"internal-slot": { "internal-slot": {
"version": "1.0.6", "version": "1.0.6",
@@ -34060,6 +34424,85 @@
} }
} }
}, },
"ipfs-unixfs": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-11.1.3.tgz",
"integrity": "sha512-sy6Koojwm/EcM8yvDlycRYA89C8wIcLcGTMMpqnCPUtqTCdl+JxsuPNCBgAu7tmO8Nipm7Tv7f0g/erxTGKKRA==",
"requires": {
"err-code": "^3.0.1",
"protons-runtime": "^5.0.0",
"uint8arraylist": "^2.4.3"
}
},
"ipfs-unixfs-exporter": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/ipfs-unixfs-exporter/-/ipfs-unixfs-exporter-13.5.0.tgz",
"integrity": "sha512-s1eWXzoyhQFNEAB1p+QE3adjhW+lBdgpORmmjiCLiruHs5z7T5zsAgRVcWpM8LWYhq2flRtJHObb7Hg73J+oLQ==",
"requires": {
"@ipld/dag-cbor": "^9.0.0",
"@ipld/dag-json": "^10.1.7",
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"ipfs-unixfs": "^11.0.0",
"it-filter": "^3.0.2",
"it-last": "^3.0.2",
"it-map": "^3.0.3",
"it-parallel": "^3.0.0",
"it-pipe": "^3.0.1",
"it-pushable": "^3.1.0",
"multiformats": "^13.0.0",
"p-queue": "^8.0.1",
"progress-events": "^1.0.0"
},
"dependencies": {
"multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
}
}
},
"ipfs-unixfs-importer": {
"version": "15.2.4",
"resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-15.2.4.tgz",
"integrity": "sha512-3b7d/pLPwGvAEXvpJ0WyYlbn2pb2j7qY6FayuMSzbZNdFxdJ82l6VkJ9vK1d/G/AHx+0ZfB06eSdGKjX0GVCAg==",
"requires": {
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"interface-store": "^5.0.1",
"ipfs-unixfs": "^11.0.0",
"it-all": "^3.0.2",
"it-batch": "^3.0.2",
"it-first": "^3.0.2",
"it-parallel-batch": "^3.0.1",
"multiformats": "^13.0.0",
"progress-events": "^1.0.0",
"rabin-wasm": "^0.1.4",
"uint8arraylist": "^2.4.3",
"uint8arrays": "^5.0.0"
},
"dependencies": {
"multiformats": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz",
"integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ=="
},
"uint8arrays": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.2.tgz",
"integrity": "sha512-S0GaeR+orZt7LaqzTRs4ZP8QqzAauJ+0d4xvP2lJTA99jIkKsE2FgDs4tGF/K/z5O9I/2W5Yvrh7IuqNeYH+0Q==",
"requires": {
"multiformats": "^13.0.0"
}
}
}
},
"ipns": { "ipns": {
"version": "7.0.2", "version": "7.0.2",
"resolved": "https://registry.npmjs.org/ipns/-/ipns-7.0.2.tgz", "resolved": "https://registry.npmjs.org/ipns/-/ipns-7.0.2.tgz",
@@ -34636,6 +35079,11 @@
"uint8arraylist": "^2.0.0" "uint8arraylist": "^2.0.0"
} }
}, },
"it-last": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/it-last/-/it-last-3.0.4.tgz",
"integrity": "sha512-Ns+KTsQWhs0KCvfv5X3Ck3lpoYxHcp4zUp4d+AOdmC8cXXqDuoZqAjfWhgCbxJubXyIYWdfE2nRcfWqgvZHP8Q=="
},
"it-length": { "it-length": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.4.tgz", "resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.4.tgz",
@@ -37110,6 +37558,11 @@
} }
} }
}, },
"murmurhash3js-revisited": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz",
"integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g=="
},
"nan": { "nan": {
"version": "2.18.0", "version": "2.18.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
@@ -39957,6 +40410,40 @@
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="
}, },
"rabin-wasm": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz",
"integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==",
"requires": {
"@assemblyscript/loader": "^0.9.4",
"bl": "^5.0.0",
"debug": "^4.3.1",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"readable-stream": "^3.6.0"
},
"dependencies": {
"bl": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
"integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
"requires": {
"buffer": "^6.0.3",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
}
}
},
"race-event": { "race-event": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/race-event/-/race-event-1.1.0.tgz", "resolved": "https://registry.npmjs.org/race-event/-/race-event-1.1.0.tgz",
@@ -41394,6 +41881,11 @@
"source-map": "^0.6.0" "source-map": "^0.6.0"
} }
}, },
"sparse-array": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz",
"integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg=="
},
"sparse-bitfield": { "sparse-bitfield": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+2
View File
@@ -27,6 +27,7 @@
"@chainsafe/libp2p-gossipsub": "11.0.1", "@chainsafe/libp2p-gossipsub": "11.0.1",
"@chainsafe/libp2p-noise": "14.1.0", "@chainsafe/libp2p-noise": "14.1.0",
"@chainsafe/libp2p-yamux": "6.0.1", "@chainsafe/libp2p-yamux": "6.0.1",
"@helia/unixfs": "3.0.1",
"@libp2p/bootstrap": "10.0.7", "@libp2p/bootstrap": "10.0.7",
"@libp2p/circuit-relay-v2": "1.0.13", "@libp2p/circuit-relay-v2": "1.0.13",
"@libp2p/identify": "1.0.6", "@libp2p/identify": "1.0.6",
@@ -41,6 +42,7 @@
"glob": "7.1.6", "glob": "7.1.6",
"helia": "2.1.0", "helia": "2.1.0",
"helia-coord": "1.5.4", "helia-coord": "1.5.4",
"ipfs-unixfs-exporter": "13.5.0",
"jsonrpc-lite": "2.2.0", "jsonrpc-lite": "2.2.0",
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"jwt-bch-lib": "1.3.0", "jwt-bch-lib": "1.3.0",
+5
View File
@@ -29,6 +29,7 @@ import { multiaddr } from '@multiformats/multiaddr'
import { webRTC } from '@libp2p/webrtc' import { webRTC } from '@libp2p/webrtc'
import { keychain } from '@libp2p/keychain' import { keychain } from '@libp2p/keychain'
import { defaultLogger } from '@libp2p/logger' import { defaultLogger } from '@libp2p/logger'
import { unixfs } from '@helia/unixfs'
// Local libraries // Local libraries
import config from '../../../config/index.js' import config from '../../../config/index.js'
@@ -223,6 +224,10 @@ class IpfsAdapter {
libp2p libp2p
}) })
// Attach IPFS file system.
const fs = unixfs(helia)
helia.fs = fs
return helia return helia
} catch (err) { } catch (err) {
console.error('Error creating Helia node: ', err) console.error('Error creating Helia node: ', err)
+68 -3
View File
@@ -2,6 +2,11 @@
REST API Controller library for the /ipfs route REST API Controller library for the /ipfs route
*/ */
// Global npm libraries
import { exporter } from 'ipfs-unixfs-exporter'
import fs from 'fs'
// Local libraries
import wlogger from '../../../adapters/wlogger.js' import wlogger from '../../../adapters/wlogger.js'
class IpfsRESTControllerLib { class IpfsRESTControllerLib {
@@ -23,6 +28,7 @@ class IpfsRESTControllerLib {
// Encapsulate dependencies // Encapsulate dependencies
// this.UserModel = this.adapters.localdb.Users // this.UserModel = this.adapters.localdb.Users
// this.userUseCases = this.useCases.user // this.userUseCases = this.useCases.user
this.fs = fs
// Bind 'this' object to all subfunctions // Bind 'this' object to all subfunctions
this.getStatus = this.getStatus.bind(this) this.getStatus = this.getStatus.bind(this)
@@ -125,10 +131,69 @@ class IpfsRESTControllerLib {
async downloadFile (ctx) { async downloadFile (ctx) {
try { try {
const { cid } = ctx.params // const { cid } = ctx.params
const file = await this.adapters.ipfs.ipfs.blockstore.get(cid) // const multiaddr = ctx.request.body.multiaddr
return file // const getDetails = ctx.request.body.getDetails
const { cid, fileName, path } = ctx.request.body
console.log(`downloadFile() retrieving this CID: ${cid}, with fileName: ${fileName}, and path: ${path}`)
// const file = await this.adapters.ipfs.ipfs.blockstore.get(cid)
// console.log('file: ', file)
// return file
// const ipfsFs = this.adapters.ipfs.ipfs.fs
// console.log('ipfsFs: ', ipfsFs)
//
// const buf = []
// for await (const chunk of ipfsFs.cat(cid)) {
// // text += decoder.decode(chunk, {
// // stream: true
// // })
//
// buf.push(chunk)
// }
// console.log(`buf: `, buf)
const blockstore = this.adapters.ipfs.ipfs.blockstore
const entry = await exporter(cid, blockstore)
console.info(entry.cid) // Qmqux
console.info(entry.path) // Qmbaz/foo/bar.txt
console.info(entry.name) // bar.txt
console.log('entry: ', entry)
// console.info(entry.unixfs.fileSize()) // 4
// stream content from unixfs node
// const bytes = new Uint8Array(Number(entry.size))
// let offset = 0
const filePath = `${path}/${fileName}`
const writableStream = fs.createWriteStream(filePath)
writableStream.on('error', (error) => {
console.log(`An error occured while writing to the file. Error: ${error.message}`)
})
writableStream.on('finish', () => {
console.log(`CID ${cid} downloaded to ${filePath}`)
})
for await (const buf of entry.content()) {
// bytes.set(buf, offset)
// offset += buf.length
writableStream.write(buf)
}
writableStream.end()
// console.info(bytes) // 0, 1, 2, 3
ctx.body = {
success: true
}
} catch (err) { } catch (err) {
wlogger.error('Error in ipfs/controller.js/downloadFile(): ', err) wlogger.error('Error in ipfs/controller.js/downloadFile(): ', err)
this.handleError(ctx, err) this.handleError(ctx, err)
+2 -1
View File
@@ -56,7 +56,8 @@ class IpfsRouter {
this.router.post('/relays', this.ipfsRESTController.getRelays) this.router.post('/relays', this.ipfsRESTController.getRelays)
this.router.post('/connect', this.ipfsRESTController.connect) this.router.post('/connect', this.ipfsRESTController.connect)
this.router.get('/node', this.ipfsRESTController.getThisNode) this.router.get('/node', this.ipfsRESTController.getThisNode)
this.router.get('/download/:cid', this.ipfsRESTController.downloadFile) // this.router.get('/download/:cid', this.ipfsRESTController.downloadFile)
this.router.post('/download', this.ipfsRESTController.downloadFile)
// Attach the Controller routes to the Koa app. // Attach the Controller routes to the Koa app.
app.use(this.router.routes()) app.use(this.router.routes())