*update dist
This commit is contained in:
parent
aad02e4901
commit
fe9045cf82
|
@ -1,13 +1,14 @@
|
||||||
import { Client } from "@lumeweb/libkernel-universal";
|
import { Client } from "@lumeweb/libkernel-universal";
|
||||||
|
import { CatOptions, LsOptions, StatOptions } from "@helia/unixfs";
|
||||||
interface AbortableGenerator {
|
interface AbortableGenerator {
|
||||||
abort: () => void;
|
abort: () => void;
|
||||||
iterable: AsyncGenerator<object>;
|
iterable: AsyncGenerator<object>;
|
||||||
}
|
}
|
||||||
export declare class IPFSClient extends Client {
|
export declare class IPFSClient extends Client {
|
||||||
ready(): Promise<any>;
|
ready(): Promise<any>;
|
||||||
stat(cid: string): Promise<any>;
|
stat(cid: string, options?: Partial<StatOptions>): Promise<any>;
|
||||||
ls(cid: string): AbortableGenerator;
|
ls(cid: string, options?: Partial<LsOptions>): AbortableGenerator;
|
||||||
cat(cid: string): AbortableGenerator;
|
cat(cid: string, options?: Partial<CatOptions>): AbortableGenerator;
|
||||||
ipns(cid: string): Promise<string>;
|
ipns(cid: string): Promise<string>;
|
||||||
activePeers(): Promise<number>;
|
activePeers(): Promise<number>;
|
||||||
private connectModuleGenerator;
|
private connectModuleGenerator;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAG/D,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,qBAAa,UAAW,SAAQ,MAAM;IACvB,KAAK;IAIL,IAAI,CAAC,GAAG,EAAE,MAAM;IAItB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB;IAInC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB;IAI9B,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C,OAAO,CAAC,sBAAsB;CAgC/B;AAED,eAAO,MAAM,YAAY,8BAGxB,CAAC"}
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnE,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,qBAAa,UAAW,SAAQ,MAAM;IACvB,KAAK;IAIL,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAItD,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,kBAAkB;IAIjE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,kBAAkB;IAI7D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C,OAAO,CAAC,sBAAsB;CAgC/B;AAED,eAAO,MAAM,YAAY,8BAGxB,CAAC"}
|
|
@ -4,14 +4,14 @@ export class IPFSClient extends Client {
|
||||||
async ready() {
|
async ready() {
|
||||||
return this.callModuleReturn("ready");
|
return this.callModuleReturn("ready");
|
||||||
}
|
}
|
||||||
async stat(cid) {
|
async stat(cid, options) {
|
||||||
return this.callModuleReturn("stat");
|
return this.callModuleReturn("stat", { options });
|
||||||
}
|
}
|
||||||
ls(cid) {
|
ls(cid, options) {
|
||||||
return this.connectModuleGenerator("ls", { cid });
|
return this.connectModuleGenerator("ls", { cid, options });
|
||||||
}
|
}
|
||||||
cat(cid) {
|
cat(cid, options) {
|
||||||
return this.connectModuleGenerator("cat", { cid });
|
return this.connectModuleGenerator("cat", { cid, options });
|
||||||
}
|
}
|
||||||
async ipns(cid) {
|
async ipns(cid) {
|
||||||
return this.callModuleReturn("ipnsResolve");
|
return this.callModuleReturn("ipnsResolve");
|
||||||
|
|
Loading…
Reference in New Issue