Solana

  • We are using tweetnacl and bs58 for this particular example

import nacl from "tweetnacl"

const message = await generateMessage()

const keypair = Keypair.generate() // use user's wallet

const signature = nacl.sign.detached(Buffer.from(message), keypair.secretKey)

Wallets have exposed functions for signing message

Last updated