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

269
Views
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 answers
Answer question

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 Report
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!