OZAuthDigestScheme

public enum OZAuthDigestScheme : String, Sendable, Hashable

The digest that the __check_auth of an OpenZeppelin smart account build checks.

Every signer of one auth entry commits to the same digest. Its form depends on the code the smart account runs, so the kit reads the wallet’s WASM hash before each signing operation and selects the scheme through authDigestSchemes.

  • The digest of stellar-accounts 0.7: auth_digest = SHA-256(signature_payload || XDR(ScVal::Vec([ScVal::U32(id), ...]))). Delegated signers authorize __check_auth(Bytes(auth_digest)).

    Declaration

    Swift

    case legacyConcat
  • The digest of stellar-accounts 0.8.0: auth_digest = SHA-256(XDR(AuthDigestPreimage)), where AuthDigestPreimage is the ScVal::Map with the Symbol keys account (the smart account address), context_rule_ids (Vec of U32) and signature_payload (32 Bytes). Delegated signers authorize __check_auth(AuthDigestPreimage).

    Declaration

    Swift

    case preimageV1