feat: add cat method

This commit is contained in:
Derrick Hammer 2023-11-17 09:07:32 -05:00
parent c4f0b930ee
commit 5805dabe27
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,7 @@
import { factory, NetworkClient } from "@lumeweb/libkernel/module";
import type { SignedRegistryEntry } from "@lumeweb/libs5";
export const MODULE =
"zrjLjKVByzt233rfcjWvTQXrMfGFa11oBLydPaUk7gwnC2d";
export const MODULE = "zrjLjKVByzt233rfcjWvTQXrMfGFa11oBLydPaUk7gwnC2d";
export interface RegistryEntry {
key: Uint8Array;
@ -47,6 +46,10 @@ export class S5Client extends NetworkClient {
end();
};
}
public async cat(cid: string) {
return this.callModuleReturn("cat", { cid });
}
}
export const createClient = factory<S5Client>(S5Client, MODULE);