• Given a private CryptoKey and a Uint8Array of bytes, this method will return the 64-byte Ed25519 signature of that data as a Uint8Array.

    Parameters

    • key: CryptoKey
    • data: ReadonlyUint8Array<ArrayBufferLike>

    Returns Promise<SignatureBytes>

    import { signBytes } from '@solana/keys';

    const data = new Uint8Array([1, 2, 3]);
    const signature = await signBytes(privateKey, data);