Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
TypeError: (0 , ipfs_1.uploadIpfsManifest) is not a function

My calls to uploadManifiest in MutationService keep failing with the error: info: Egg upgrade failed with error: TypeError: (0 , ipfs_1.uploadIpfsManifest) is not a function.

I'm not sure what the cause of this is, below my set up of the file causing the issue:

mutation.ts

import { uploadManifest } from '../utils/ipfs';

export class MutationService {
  public async eggUpgrade(nftAddress: string) {
    try {
      const updatedManifest = this.addExchangeAttributes(manifest);
      const mediaUri = await this.uploadManifest(updatedManifest);
      logger.info(`mediaUri: ${JSON.stringify(mediaUri)}`);
    } catch (e) {
      logger.info(`Egg upgrade failed with error: ${e}`);
      return { success: false, tx_id: null };
    }
  }

  async uploadManifest(manifest: any) {
    const manifestBuffer = Buffer.from(JSON.stringify(manifest));
    return await uploadManifest(
      {
        projectId: process.env.IPFS_INFURA_PROJECT_ID as string,
        secretKey: process.env.IPFS_INFURA_SECRET as string,
      },
      manifestBuffer,
    );
  }
}

ipfs.ts

export async function uploadManifest(
  ipfsCredentials: IIpfsCredentials,
  manifestBuffer: Buffer,
) {
  const tokenIpfs = `${ipfsCredentials.projectId}:${ipfsCredentials.secretKey}`;
  const ipfs = create(INFURA_IPFS_URI as Options);
  const authIpfs = Buffer.from(tokenIpfs).toString('base64');

  const manifestJson = JSON.parse(manifestBuffer.toString('utf8'));
  const manifestHash = await uploadToIpfs(
    ipfs,
    Buffer.from(JSON.stringify(manifestJson)),
  );
  await fetch(`${INFURA_IPFS_API_URI}/pin/add?arg=${manifestHash}`, {
    headers: {
      Authorization: `Basic ${authIpfs}`,
    },
    method: 'POST',
  });

  await sleep(500);
  const link = `https://ipfs.io/ipfs/${manifestHash}`;
  logger.debug(`uploaded manifest: ${link}`);
  return link;
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!