Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

271
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda