Compare commits
No commits in common. "4dd54a4f8bb1f6a88083b2d5178b3948edfd38b8" and "3955ff2c292379ba473ed341a8d00a51fb54d839" have entirely different histories.
4dd54a4f8b
...
3955ff2c29
11
src/index.ts
11
src/index.ts
|
@ -64,7 +64,6 @@ BigInt.prototype.toJSON = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
addHandler("presentSeed", handlePresentSeed);
|
addHandler("presentSeed", handlePresentSeed);
|
||||||
addHandler("ready", handleReady);
|
|
||||||
addHandler("stat", handleStat);
|
addHandler("stat", handleStat);
|
||||||
addHandler("ls", handleLs, { receiveUpdates: true });
|
addHandler("ls", handleLs, { receiveUpdates: true });
|
||||||
addHandler("cat", handleCat, { receiveUpdates: true });
|
addHandler("cat", handleCat, { receiveUpdates: true });
|
||||||
|
@ -221,12 +220,6 @@ async function handlePresentSeed() {
|
||||||
moduleDefer.resolve();
|
moduleDefer.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleReady(aq: ActiveQuery) {
|
|
||||||
await ready();
|
|
||||||
|
|
||||||
aq.respond();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleStat(aq: ActiveQuery) {
|
async function handleStat(aq: ActiveQuery) {
|
||||||
await ready();
|
await ready();
|
||||||
|
|
||||||
|
@ -346,10 +339,6 @@ async function handleIpnsResolve(aq: ActiveQuery) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCID(cid: string): CID {
|
function getCID(cid: string): CID {
|
||||||
try {
|
|
||||||
return CID.parse(cid);
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
const prefix = substr(cid, 0, 1);
|
const prefix = substr(cid, 0, 1);
|
||||||
|
|
||||||
if (!(prefix in basesByPrefix)) {
|
if (!(prefix in basesByPrefix)) {
|
||||||
|
|
Loading…
Reference in New Issue