From 80f61031806b68cc7b07d59ea02125cadb5153c6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 5 Aug 2022 09:50:59 -0400 Subject: [PATCH] *headers not needed --- src/index.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index 25953cb..480fc53 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,39 +33,37 @@ export async function refreshGatewayList() { export async function fetchIpfs( hash: string, path = "", - headers = {}, receiveUpdate: DataFn ) { 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: string, path = "", headers = {}) { +export async function statIpfs(hash: string, 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: string, path = "", - headers = {}, receiveUpdate: DataFn ) { 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: string, path = "", headers = {}) { +export async function statIpns(hash: string, 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: string, data: any, receiveUpdate?: DataFn) {