# Vault Auth

## GET /vaults/{slug}/authority

> Get Vault Authority by slug

```json
{"openapi":"3.0.0","info":{"title":"Nest API","version":"1.0.0"},"servers":[{"url":"https://api.nest.credit/v1","description":"Nest API Server"}],"paths":{"/vaults/{slug}/authority":{"get":{"tags":["Vault Auth"],"description":"Get Vault Authority by slug","parameters":[{"schema":{"type":"string","minLength":1,"description":"Unique slug identifier for the vault."},"required":true,"description":"Unique slug identifier for the vault.","name":"slug","in":"path"}],"responses":{"200":{"description":"Vault authority","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VaultAuthority"}},"required":["data"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"components":{"schemas":{"VaultAuthority":{"type":"object","properties":{"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"accountantAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Accountant address of the vault"},"isHubAccountant":{"type":"boolean","description":"Whether the vault uses a Nest accountant with the `NestHubAccountant` ABI. For `nest` vaults, this applies to `accountantAddress`. For `boringNest` vaults, this applies to `nestAccountant.address`. For plain `boring` vaults, this is `false`."},"nestAccountant":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"chain":{"$ref":"#/components/schemas/ChainConfig"}},"required":["address","chain"],"description":"Nest accountant metadata for nest and boringNest vaults."},"authority":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Authority contract address for the vault"}},"required":["vaultAddress","accountantAddress","authority"]},"ChainConfig":{"type":"object","properties":{"mainnet":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]},"plume":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]},"plasma":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]},"arbitrum":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]},"bsc":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]},"worldchain":{"type":"object","properties":{"startBlock":{"type":"number"}},"required":["startBlock"]}}}}}}
```

## GET /vaults/{slug}/roles-assignments

> Get Vault Role Assignments by slug

```json
{"openapi":"3.0.0","info":{"title":"Nest API","version":"1.0.0"},"servers":[{"url":"https://api.nest.credit/v1","description":"Nest API Server"}],"paths":{"/vaults/{slug}/roles-assignments":{"get":{"tags":["Vault Auth"],"description":"Get Vault Role Assignments by slug","parameters":[{"schema":{"type":"string","minLength":1,"description":"Unique slug identifier for the vault."},"required":true,"description":"Unique slug identifier for the vault.","name":"slug","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":200,"default":50,"description":"Maximum number of role assignments to return"},"required":false,"description":"Maximum number of role assignments to return","name":"limit","in":"query"},{"schema":{"type":"string","description":"Cursor returned from a previous request"},"required":false,"description":"Cursor returned from a previous request","name":"cursor","in":"query"}],"responses":{"200":{"description":"Vault role assignments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VaultRoleAssignmentsPaginated"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"components":{"schemas":{"VaultRoleAssignmentsPaginated":{"type":"object","properties":{"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"},"description":"List of role assignments for the vault"},"pageInfo":{"type":"object","properties":{"endCursor":{"type":"string","nullable":true,"description":"Cursor to fetch the next page of results"},"hasNextPage":{"type":"boolean","description":"Whether another page of results is available"}},"required":["endCursor","hasNextPage"]}},"required":["vaultAddress","roleAssignments","pageInfo"]},"RoleAssignment":{"type":"object","properties":{"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"user":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"User address with the role assignment"},"role":{"type":"string","enum":["STRATEGIST","MANAGER","TELLER","UPDATE_EXCHANGE_RATE","SOLVER","PAUSER"],"description":"Role assigned to the user"},"enabled":{"type":"boolean","description":"Whether the role assignment is enabled"},"chainId":{"type":"number","description":"Chain ID where the role assignment exists"}},"required":["vaultAddress","user","role","enabled","chainId"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.nest.credit/developers/api/vault-auth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
