Ed25519Signature

data class Ed25519Signature(val publicKey: ByteArray, val signature: ByteArray) : SmartAccountSignature

Ed25519 signature from a traditional keypair.

Ed25519 signatures are 64 bytes and provide deterministic signing with strong side-channel resistance.

toScVal returns the raw 64-byte signature as SCValXdr.Bytes. The Ed25519 verifier contract expects BytesN<64> directly as sig_data. The corresponding public key is supplied separately from the smart account's on-chain External(verifier, key_data) storage and is NOT transmitted in the auth payload.

The publicKey field is retained on the data class for local Ed25519 signature verification before submission and for content-based equality.

Example:

val ed25519Sig = Ed25519Signature(
publicKey = byteArrayOf(...), // 32-byte Ed25519 public key
signature = byteArrayOf(...) // 64-byte Ed25519 signature
)
val scVal = ed25519Sig.toScVal() // SCValXdr.Bytes holding the raw 64 bytes

Constructors

Link copied to clipboard
constructor(publicKey: ByteArray, signature: ByteArray)

Properties

Link copied to clipboard

Ed25519 public key (32 bytes). Used for local signature verification before submission; not transmitted on-chain.

Link copied to clipboard

Ed25519 signature (64 bytes).

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toAuthPayloadBytes(): ByteArray

Raw 64-byte Ed25519 signature; the public key is supplied by the on-chain External(verifier, key_data) signer slot.

Link copied to clipboard
open override fun toScVal(): SCValXdr

Returns the raw 64-byte Ed25519 signature as SCValXdr.Bytes.