buildAuthDigest

suspend fun buildAuthDigest(signaturePayload: ByteArray, contextRuleIds: List<UInt>): ByteArray

Computes the auth digest that binds context rule IDs to the signature payload.

The digest is computed as:

auth_digest = SHA-256(signaturePayload || contextRuleIds.toXDR())

Where contextRuleIds.toXDR() is the XDR encoding of ScVal::Vec([ScVal::U32(id), ...]).

Return

The 32-byte SHA-256 auth digest

Parameters

signaturePayload

The 32-byte signature payload hash from buildAuthPayloadHash

contextRuleIds

The context rule IDs to bind into the digest

Throws