Skip to content

LockRequestLibrary

State Variables

LOCK_REQUEST_TYPE

string constant LOCK_REQUEST_TYPE = "LockRequest(ProofRequest request)";

LOCK_REQUEST_TYPEHASH

bytes32 constant LOCK_REQUEST_TYPEHASH = keccak256(
    abi.encodePacked(
        LOCK_REQUEST_TYPE,
        CallbackLibrary.CALLBACK_TYPE,
        InputLibrary.INPUT_TYPE,
        OfferLibrary.OFFER_TYPE,
        PredicateLibrary.PREDICATE_TYPE,
        ProofRequestLibrary.PROOF_REQUEST_TYPE,
        RequirementsLibrary.REQUIREMENTS_TYPE
    )
);

Functions

eip712Digest

Computes the EIP-712 digest for the given lock request.

function eip712Digest(LockRequest memory lockRequest) internal pure returns (bytes32);
Parameters
NameTypeDescription
lockRequestLockRequestThe lock request to compute the digest for.
Returns
NameTypeDescription
<none>bytes32The EIP-712 digest of the lock request.

eip712DigestFromPrecomputedDigest

Computes the EIP-712 digest for the given lock request from a precomputed EIP-712 proof request digest.

This avoids recomputing the proof request digest in the case where the proof request digest has already been computed.

function eip712DigestFromPrecomputedDigest(bytes32 proofRequestEip712Digest) internal pure returns (bytes32);
Parameters
NameTypeDescription
proofRequestEip712Digestbytes32The EIP-712 digest of the proof request.
Returns
NameTypeDescription
<none>bytes32The EIP-712 digest of the lock request.