Check Unlock Protocol membership
unlock_check_membershipCheck whether a wallet has a valid, non-expired key for a specific Unlock Protocol lock. Returns status (valid, expired, no key) plus lock details, so you can verify membership before granting access.
Instructions
Check whether a wallet holds a valid (non-expired) key for a specific Unlock Protocol lock, read-only. Returns status (valid, expired, no_key, not_a_contract, or not_a_lock), lock name, tokenId, and expiration. Use this when you already know the lock address to check; use unlock_list_keys instead when you need every lock a wallet holds and don't know the addresses up front. The verdict normally comes from the lock's own getHasValidKey; on locks that predate it, the call falls back to comparing the read expiration to the local clock and reports verdictSource: "local_clock" (absent when the contract answered). Set requireContractVerdict to fail instead of accepting that fallback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Network name (defaults to "base") | base |
| lockAddress | Yes | Address of the PublicLock contract to check | |
| walletAddress | Yes | Wallet address to check for a valid key | |
| requireContractVerdict | No | When true, fail with an error instead of falling back to comparing keyExpirationTimestampFor to the local clock when the lock's own getHasValidKey can't be read (e.g. it predates getHasValidKey). That fallback is a supported valid/expired answer by default (false) — set this to require a verdict sourced from the contract itself. |