Skip to content

signEd25519WithScalar()

SIP Protocol API Reference v0.12.0


SIP Protocol API Reference / signEd25519WithScalar

signEd25519WithScalar(message, scalar): Uint8Array

Defined in: @sip-protocol/sdk/dist/index-rqQpCeVM.d.ts:17601

Produce an RFC 8032 Ed25519 signature from a raw little-endian scalar.

Unlike Keypair/tweetnacl signing (which expects a 32-byte seed and re-derives the scalar via SHA-512 + clamp), this signs directly with the provided scalar a whose public key is A = a·G. The per-signature nonce is derived deterministically from a hash of the scalar and the message (RFC 8032 structure): unique per message, never reused across distinct messages.

Uint8Array

Exact bytes to sign (e.g. a compiled transaction message)

Uint8Array

32-byte little-endian ed25519 scalar (the stealth private key)

Uint8Array

64-byte signature (R ‖ S)

If the scalar reduces to zero