# Contract API reference

#### `did_registry.move` Functions

* `get_did_type_info(did_type: u8): (String, String, vector<String>, u64)`
  * Description: Retrieves the details for a given DID type for display on the frontend.
* `start_verification(registry: &mut DIDRegistry, did_type: u8, clock: &Clock, ctx: &mut TxContext): ID`
  * Description: Creates a `UserDID` object and initiates the verification process for a user.
* `update_verification_status(registry: &mut DIDRegistry, user_did: &mut UserDID, verified: bool, clock: &Clock, ctx: &TxContext)`
  * Description: Backend-only function. Updates the status of a `UserDID` object to `VERIFIED` or `REJECTED`.
* `claim_did_nft(registry: &DIDRegistry, user_did: &mut UserDID, blob_id: String, encryption_id: vector<u8>, nautilus_signature: vector<u8>, clock: &Clock, ctx: &mut TxContext): ID`
  * Description: Allows a user with a `VERIFIED` status to mint their Soul-Bound DID NFT.
* `verify_did_for_protocol(registry: &DIDRegistry, user_did: &UserDID, ctx: &TxContext): bool`
  * Description: An SDK-facing function that allows other protocols to check if a user's DID is valid and not expired.

#### `government_whitelist.move` Functions

* `add_government_address(whitelist: &mut GovWhitelist, cap: &GovCap, government_address: address)`
  * Description: Admin-only. Adds a new government address to the whitelist, granting it decryption privileges.
* `remove_government_address(whitelist: &mut GovWhitelist, cap: &GovCap, government_address: address)`
  * Description: Admin-only. Removes a government address from the whitelist.
* `seal_approve(encryption_id: vector<u8>, whitelist: &GovWhitelist, ctx: &TxContext)`
  * Description: An entry function that approves a decryption request if the caller is either the document owner or a whitelisted government address.
* `can_access_document(whitelist: &GovWhitelist, caller: address, encryption_id: vector<u8>): bool`
  * Description: Checks if a given address has permission to access a specific encrypted document.
* `is_government_address(whitelist: &GovWhitelist, address: address): bool`
  * Description: A public view function to check if an address is on the government whitelist.
