*update dist

This commit is contained in:
Derrick Hammer 2022-08-05 09:51:18 -04:00
parent 80f6103180
commit a4990e99ef
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 13 additions and 13 deletions

8
dist/index.d.ts vendored
View File

@ -1,7 +1,7 @@
import type { DataFn } from "libskynet";
export declare function refreshGatewayList(): Promise<any>;
export declare function fetchIpfs(hash: string, path: string | undefined, headers: {} | undefined, receiveUpdate: DataFn): Promise<any>;
export declare function statIpfs(hash: string, path?: string, headers?: {}): Promise<any>;
export declare function fetchIpns(hash: string, path: string | undefined, headers: {} | undefined, receiveUpdate: DataFn): Promise<any>;
export declare function statIpns(hash: string, path?: string, headers?: {}): Promise<any>;
export declare function fetchIpfs(hash: string, path: string | undefined, receiveUpdate: DataFn): Promise<any>;
export declare function statIpfs(hash: string, path?: string): Promise<any>;
export declare function fetchIpns(hash: string, path: string | undefined, receiveUpdate: DataFn): Promise<any>;
export declare function statIpns(hash: string, path?: string): Promise<any>;
//# sourceMappingURL=index.d.ts.map

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAsBxC,wBAAsB,kBAAkB,iBAQvC;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,oBAAK,EACT,OAAO,gBAAK,EACZ,aAAa,EAAE,MAAM,gBAMtB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,EAAE,OAAO,KAAK,gBAKnE;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,oBAAK,EACT,OAAO,gBAAK,EACZ,aAAa,EAAE,MAAM,gBAMtB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,EAAE,OAAO,KAAK,gBAKnE"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAsBxC,wBAAsB,kBAAkB,iBAQvC;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,oBAAK,EACT,aAAa,EAAE,MAAM,gBAMtB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,gBAKrD;AAED,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,oBAAK,EACT,aAAa,EAAE,MAAM,gBAMtB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,gBAKrD"}

16
dist/index.js vendored
View File

@ -23,29 +23,29 @@ export async function refreshGatewayList() {
}
return resp;
}
export async function fetchIpfs(hash, path = "", headers = {}, receiveUpdate) {
export async function fetchIpfs(hash, path = "", receiveUpdate) {
if (!ipfsPath(`/ipfs/{${hash}`)) {
throw new Error("Invalid hash");
}
return doFetch("fetchIpfs", { hash, path, headers }, receiveUpdate);
return doFetch("fetchIpfs", { hash, path }, receiveUpdate);
}
export async function statIpfs(hash, path = "", headers = {}) {
export async function statIpfs(hash, path = "") {
if (!ipfsPath(`/ipfs/{${hash}`)) {
throw new Error("Invalid hash");
}
return doFetch("statIpfs", { hash, path, headers });
return doFetch("statIpfs", { hash, path });
}
export async function fetchIpns(hash, path = "", headers = {}, receiveUpdate) {
export async function fetchIpns(hash, path = "", receiveUpdate) {
if (!ipnsPath(`/ipns/{${hash}`)) {
throw new Error("Invalid hash");
}
return doFetch("fetchIpns", { hash, path, headers }, receiveUpdate);
return doFetch("fetchIpns", { hash, path }, receiveUpdate);
}
export async function statIpns(hash, path = "", headers = {}) {
export async function statIpns(hash, path = "") {
if (!ipnsPath(`/ipns/{${hash}`)) {
throw new Error("Invalid hash");
}
return doFetch("statIpns", { hash, path, headers });
return doFetch("statIpns", { hash, path });
}
async function doFetch(method, data, receiveUpdate) {
let [resp, err] = await doCall(method, data, receiveUpdate);