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

260
Vistas
Nami wallet and CIP-0008: signData got changed?

I have a web application which is using window.cardano.nami injection since months. Following CIP-0008, I'm trying to abstract all the source code to support ccvault and other Cardano wallets; everything works fine, but it seems the signData method has been changed.

I was using window.cardano.signData and the result was a plaintext signature like this: window.cardano.signData signature

const signedData = await window.cardano.signData(usedAddresses, hexMessage);

I switched to api.signData (where api is the new endpoint returned by window.cardano.nami.enable() and now the signature is an object like this: api.signData signature

const signedData = await wallet.signData(usedAddresses, hexMessage);

So, the type is different, but that's not enough: the signature itself (if I compare the first signature with the .signature attribute of the second signature object) is different!

Even more weird: ccvault works like a charm!

What am I missing?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The problem is there is a legacy version of nami and a new one, best is to check for both and return the correct one. Then just keep using it like normal.

   let connectNami = async () => {
    // @ts-ignore
    if (typeof window.cardano.nami !== "undefined") {
      // @ts-ignore
      return await window.cardano.nami.enable();
    } else {
      console.debug(`Using legacy nami wallet integration`);

      // @ts-ignore
      await window.cardano.enable();

      // @ts-ignore
      return window.cardano;
    }
  };
const cardano= await connectNami();
const token = await cardano.signData(address, messageToSign);
about 4 years ago · Juan Pablo Isaza Denunciar
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