Given a private CryptoKey and a Uint8Array of bytes, this method will return the 64-byte Ed25519 signature of that data as a Uint8Array.
CryptoKey
Uint8Array
import { signBytes } from '@solana/keys';const data = new Uint8Array([1, 2, 3]);const signature = await signBytes(privateKey, data); Copy
import { signBytes } from '@solana/keys';const data = new Uint8Array([1, 2, 3]);const signature = await signBytes(privateKey, data);
Given a private
CryptoKeyand aUint8Arrayof bytes, this method will return the 64-byte Ed25519 signature of that data as aUint8Array.