toAuthPayloadBytes

Returns the raw bytes to embed in the on-wire signers map of the auth payload.

The content is verifier-dependent:

Signature typeContent
WebAuthnSignatureXDR-encoded SCValXdr (Map with 3 fields)
Ed25519SignatureRaw 64-byte signature (no XDR wrapper)
PolicySignatureXDR-encoded SCValXdr (empty Map)

For Ed25519Signature the Ed25519 verifier contract expects BytesN<64> — exactly 64 raw bytes. XDR-wrapping inflates the payload beyond 64 bytes and causes the verifier to reject it.

Return

The bytes for the auth-payload signers map value.

Throws

when XDR encoding fails (WebAuthn and Policy variants only; Ed25519 never throws).