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

562
Views
como verificar la firma de un mensaje en phantom solana?

Estoy tratando de autenticar la billetera fantasma al firmarla con un mensaje que usé debajo del código para firmar el mensaje y me devuelve una firma, ¿cómo puedo verificar esa firma en el backend?

 const encodedMessage = new TextEncoder().encode("Message to sign"); const signedMessage = await window.solana.request({ method: "signMessage", params: { message: encodedMessage, display: "utf8", //hex,utf8 }, });

Aquí el mensaje firmado responde con esta respuesta con clave pública y una firma.

 { "publicKey": "Gy4xSKsLHXScRMVZgKt5f6BvDawp1JW8PrenA3GbakCK", "signature": "5BoNFSoV9WEafBnXon2ujPzH5zgjwZkXHL9vkHuUHEnc1AqLSN38LEx5XtAz68JFEt9RhvuhmPL3GkMPdMcQPuzN" }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si desea verificar una firma, también necesitará los datos firmados y usar el verificador subyacente como:

 nacl.sign.detached.verify(signData, signature, publicKey.toBuffer())

En general, es posible que desee verificar directamente una transacción firmada en lugar de pedirle a un usuario que firme otro mensaje utilizando el método verifySignatures en Transaction : https://github.com/solana-labs/solana/blob/d4e7ebf4f8821dfa59a1f278898cf9a7ad70ebd9/web3.js /src/transacción.ts#L673

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!