Merge pull request #142 from Permissionless-Software-Foundation/ct-unstable

Back to 100% unit test coverage
This commit is contained in:
Chris Troutner
2024-03-10 07:44:19 -07:00
committed by GitHub
9 changed files with 712 additions and 93 deletions
+557 -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",
@@ -113,6 +114,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 +3180,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 +3314,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 +3326,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 +3605,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 +3629,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 +4544,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 +11288,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 +12396,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 +12410,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 +12564,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 +13410,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 +16443,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 +20461,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 +22354,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 +24565,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 +26678,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 +26800,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 +27067,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 +28010,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 +33368,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 +34270,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 +34286,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 +34310,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 +34423,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 +35078,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 +37557,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 +40409,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 +41880,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",
+1
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",
+1
View File
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=ipfs-service-provider
+32 -11
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'
@@ -52,6 +53,8 @@ class IpfsAdapter {
this.publicIp = publicIpv4 this.publicIp = publicIpv4
this.multiaddr = multiaddr this.multiaddr = multiaddr
this.jsonFiles = new JsonFiles() this.jsonFiles = new JsonFiles()
this.keychain = keychain
this.createHelia = createHelia
// Properties of this class instance. // Properties of this class instance.
this.isReady = false this.isReady = false
@@ -62,6 +65,7 @@ class IpfsAdapter {
this.stop = this.stop.bind(this) this.stop = this.stop.bind(this)
this.ensureBlocksDir = this.ensureBlocksDir.bind(this) this.ensureBlocksDir = this.ensureBlocksDir.bind(this)
this.getSeed = this.getSeed.bind(this) this.getSeed = this.getSeed.bind(this)
this.getKeychain = this.getKeychain.bind(this)
} }
// Start an IPFS node. // Start an IPFS node.
@@ -107,6 +111,19 @@ class IpfsAdapter {
} }
} }
async getKeychain (datastore) {
const keychainInit = {
pass: await this.getSeed()
}
const chain = this.keychain(keychainInit)({
datastore,
logger: defaultLogger()
})
return chain
}
// This function creates an IPFS node using Helia. // This function creates an IPFS node using Helia.
// It returns the node as an object. // It returns the node as an object.
async createNode () { async createNode () {
@@ -115,18 +132,18 @@ class IpfsAdapter {
const blockstore = new FsBlockstore(`${IPFS_DIR}/blockstore`) const blockstore = new FsBlockstore(`${IPFS_DIR}/blockstore`)
const datastore = new FsDatastore(`${IPFS_DIR}/datastore`) const datastore = new FsDatastore(`${IPFS_DIR}/datastore`)
// TODO: Replace this with a random string generator. // const keychainInit = {
// const keychainInit = await this.getSeed() // pass: await this.getSeed()
const keychainInit = { // }
pass: await this.getSeed()
}
// Create an identity // Create an identity
let peerId let peerId
const chain = keychain(keychainInit)({ // console.log('this.keychain: ', this.keychain)
datastore, // const chain = this.keychain(keychainInit)({
logger: defaultLogger() // datastore,
}) // logger: defaultLogger()
// })
const chain = await this.getKeychain(datastore)
try { try {
peerId = await chain.exportPeerId('myKey') peerId = await chain.exportPeerId('myKey')
} catch (err) { } catch (err) {
@@ -201,12 +218,16 @@ class IpfsAdapter {
}) })
// create a Helia node // create a Helia node
const helia = await createHelia({ const helia = await this.createHelia({
blockstore, blockstore,
datastore, datastore,
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)
@@ -263,7 +284,7 @@ class IpfsAdapter {
return seed return seed
} catch (err) { } catch (err) {
console.error('Error in getSeed()') console.error('Error in adapters/ipfs/ipfs.js/getSeed()')
throw err throw err
} }
} }
+3 -14
View File
@@ -2,6 +2,9 @@
REST API Controller library for the /ipfs route REST API Controller library for the /ipfs route
*/ */
// Global npm libraries
// Local libraries
import wlogger from '../../../adapters/wlogger.js' import wlogger from '../../../adapters/wlogger.js'
class IpfsRESTControllerLib { class IpfsRESTControllerLib {
@@ -31,7 +34,6 @@ class IpfsRESTControllerLib {
this.handleError = this.handleError.bind(this) this.handleError = this.handleError.bind(this)
this.connect = this.connect.bind(this) this.connect = this.connect.bind(this)
this.getThisNode = this.getThisNode.bind(this) this.getThisNode = this.getThisNode.bind(this)
this.downloadFile = this.downloadFile.bind(this)
} }
/** /**
@@ -113,7 +115,6 @@ class IpfsRESTControllerLib {
*/ */
async getThisNode (ctx) { async getThisNode (ctx) {
try { try {
// const status = await this.adapters.ipfs.getStatus()
const thisNode = this.adapters.ipfs.ipfsCoordAdapter.ipfsCoord.thisNode const thisNode = this.adapters.ipfs.ipfsCoordAdapter.ipfsCoord.thisNode
ctx.body = { thisNode } ctx.body = { thisNode }
@@ -124,18 +125,6 @@ class IpfsRESTControllerLib {
} }
} }
async downloadFile (ctx) {
try {
const { cid } = ctx.params
const file = await this.adapters.ipfs.ipfs.blockstore.get(cid)
return file
} catch (err) {
wlogger.error('Error in ipfs/controller.js/downloadFile(): ', err)
this.handleError(ctx, err)
}
}
// DRY error handler // DRY error handler
handleError (ctx, err) { handleError (ctx, err) {
// If an HTTP status is specified by the buisiness logic, use that. // If an HTTP status is specified by the buisiness logic, use that.
-1
View File
@@ -56,7 +56,6 @@ 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)
// 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())
+79
View File
@@ -6,6 +6,7 @@
import { assert } from 'chai' import { assert } from 'chai'
import sinon from 'sinon' import sinon from 'sinon'
import cloneDeep from 'lodash.clonedeep' import cloneDeep from 'lodash.clonedeep'
import { peerIdFromString } from '@libp2p/peer-id'
// Local libraries // Local libraries
import IPFSLib from '../../../src/adapters/ipfs/ipfs.js' import IPFSLib from '../../../src/adapters/ipfs/ipfs.js'
@@ -159,5 +160,83 @@ describe('#IPFS-adapter', () => {
// Stop the IPFS node // Stop the IPFS node
await result.stop() await result.stop()
}) })
it('should create a new private key on first run', async () => {
uut.config.isCircuitRelay = false
// Mock dependencies and force desired code path.
let beenCalled = false
sandbox.stub(uut, 'getKeychain').resolves({
exportPeerId: async () => {
if (!beenCalled) {
beenCalled = true
throw new Error('test error')
}
return peerIdFromString('12D3KooWSXF1PnEfiA8bCG8SJduCvzdwHtvhVPK4WC6zzDoto2XP')
},
createKey: async () => {}
})
sandbox.stub(uut, 'createLibp2p').resolves()
sandbox.stub(uut, 'createHelia').resolves({})
const result = await uut.createNode()
// console.log('result: ', result)
assert.property(result, 'fs')
})
it('should not use circuit relay when CONNECT_PREF is set to direct', async () => {
process.env.CONNECT_PREF = 'direct'
uut.config.isCircuitRelay = false
const result = await uut.createNode()
// console.log('result: ', result)
delete process.env.CONNECT_PREF
// Assert the returned IPFS node has expected properties
assert.property(result, 'libp2p')
assert.property(result, 'blockstore')
// Stop the IPFS node
await result.stop()
})
})
describe('#getSeed', () => {
it('should read the seed from the JSON file', async () => {
// Mock dependencies and force desired code path
sandbox.stub(uut.jsonFiles, 'readJSON').resolves('12345678')
const result = await uut.getSeed()
// console.log('result: ', result)
assert.isString(result)
})
it('should generate a new seed if the JSON file is not found', async () => {
// Mock dependencies and force desired code path
sandbox.stub(uut.jsonFiles, 'readJSON').rejects(new Error('test error'))
sandbox.stub(uut.jsonFiles, 'writeJSON').resolves()
const result = await uut.getSeed()
// console.log('result: ', result)
assert.isString(result)
})
it('should catch, report, and throw errors', async () => {
try {
// Force an error
sandbox.stub(uut.jsonFiles, 'readJSON').rejects(new Error('test error'))
sandbox.stub(uut.jsonFiles, 'writeJSON').rejects(new Error('test error'))
await uut.getSeed()
assert.fail('Unexpected code path')
} catch (err) {
assert.include(err.message, 'test error')
}
})
}) })
}) })
@@ -211,4 +211,41 @@ describe('#IPFS REST API', () => {
} }
}) })
}) })
describe('#getThisNode', () => {
it('should return 422 status on biz logic error', async () => {
try {
// Force an error
// sandbox.stub(uut.adapters.ipfs.ipfsCoordAdapter.ipfsCoord, 'thisNode').rejects(new Error('test error'))
uut.adapters.ipfs.ipfsCoordAdapter = {}
ctx.request.body = {}
await uut.getThisNode(ctx)
assert.fail('Unexpected result')
} catch (err) {
// console.log('err: ', err)
assert.equal(err.status, 422)
assert.include(err.message, 'Cannot read')
}
})
it('should return 200 status on success', async () => {
// Mock dependencies
// sandbox.stub(uut.adapters.ipfs.ipfsCoordAdapter.ipfsCoord.adapters.ipfs, 'connectToPeer').resolves({ success: true })
uut.adapters.ipfs.ipfsCoordAdapter = {
ipfsCoord: {
thisNode: {}
}
}
ctx.request.body = {}
await uut.getThisNode(ctx)
assert.property(ctx.body, 'thisNode')
})
})
}) })
+2 -1
View File
@@ -24,7 +24,8 @@ class IpfsCoordAdapter {
peer: { peer: {
sendPrivateMessage: () => {} sendPrivateMessage: () => {}
} }
} },
thisNode: {}
} }
} }
} }