*update dist
This commit is contained in:
parent
80f6103180
commit
a4990e99ef
|
@ -1,7 +1,7 @@
|
||||||
import type { DataFn } from "libskynet";
|
import type { DataFn } from "libskynet";
|
||||||
export declare function refreshGatewayList(): Promise<any>;
|
export declare function refreshGatewayList(): Promise<any>;
|
||||||
export declare function fetchIpfs(hash: string, path: string | undefined, headers: {} | undefined, receiveUpdate: DataFn): Promise<any>;
|
export declare function fetchIpfs(hash: string, path: string | undefined, receiveUpdate: DataFn): Promise<any>;
|
||||||
export declare function statIpfs(hash: string, path?: string, headers?: {}): Promise<any>;
|
export declare function statIpfs(hash: string, path?: string): Promise<any>;
|
||||||
export declare function fetchIpns(hash: string, path: string | undefined, headers: {} | undefined, receiveUpdate: DataFn): Promise<any>;
|
export declare function fetchIpns(hash: string, path: string | undefined, receiveUpdate: DataFn): Promise<any>;
|
||||||
export declare function statIpns(hash: string, path?: string, headers?: {}): Promise<any>;
|
export declare function statIpns(hash: string, path?: string): Promise<any>;
|
||||||
//# sourceMappingURL=index.d.ts.map
|
//# sourceMappingURL=index.d.ts.map
|
|
@ -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"}
|
|
@ -23,29 +23,29 @@ export async function refreshGatewayList() {
|
||||||
}
|
}
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
export async function fetchIpfs(hash, path = "", headers = {}, receiveUpdate) {
|
export async function fetchIpfs(hash, path = "", receiveUpdate) {
|
||||||
if (!ipfsPath(`/ipfs/{${hash}`)) {
|
if (!ipfsPath(`/ipfs/{${hash}`)) {
|
||||||
throw new Error("Invalid 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}`)) {
|
if (!ipfsPath(`/ipfs/{${hash}`)) {
|
||||||
throw new Error("Invalid 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}`)) {
|
if (!ipnsPath(`/ipns/{${hash}`)) {
|
||||||
throw new Error("Invalid 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}`)) {
|
if (!ipnsPath(`/ipns/{${hash}`)) {
|
||||||
throw new Error("Invalid hash");
|
throw new Error("Invalid hash");
|
||||||
}
|
}
|
||||||
return doFetch("statIpns", { hash, path, headers });
|
return doFetch("statIpns", { hash, path });
|
||||||
}
|
}
|
||||||
async function doFetch(method, data, receiveUpdate) {
|
async function doFetch(method, data, receiveUpdate) {
|
||||||
let [resp, err] = await doCall(method, data, receiveUpdate);
|
let [resp, err] = await doCall(method, data, receiveUpdate);
|
||||||
|
|
Loading…
Reference in New Issue