> For the complete documentation index, see [llms.txt](https://suiverify.gitbook.io/suiverify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://suiverify.gitbook.io/suiverify/audit-and-compliance/contract-api-reference.md).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://suiverify.gitbook.io/suiverify/audit-and-compliance/contract-api-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
