> For the complete documentation index, see [llms.txt](https://devmosaic.gitbook.io/devmosaic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devmosaic.gitbook.io/devmosaic/resources/devmosaic-banking/accounts.md).

# Accounts

### Account Types

```lua
Config.AccountTypes = {
    personal = true,
    job = true,
    gang = true,
    shared = true,
}
```

Internal account ids:

```
personal:<citizenid>
job:<job_name>
gang:<gang_name>
shared:<custom_name>
```

### Personal Accounts

Personal accounts are tied to the player citizen identifier.

### Job Accounts

Job account id:

```
job:<job_name>
```

Access is controlled by:

```lua
Config.DefaultJobMinGrade = 4
Config.JobAccountAccess = {}
```

Example:

```lua
Config.JobAccountAccess = {
    police = 4,
    ambulance = 3,
}
```

### Gang Accounts

Gang account id:

```
gang:<gang_name>
```

Access is controlled by:

```lua
Config.DefaultGangMinGrade = 3
Config.GangAccountAccess = {}
```

### Shared Accounts

Shared accounts use ACL roles.

Roles:

* `owner`: view, deposit, withdraw, transfer, manage
* `contributor`: view, deposit, withdraw, transfer
* `viewer`: view only

### Transactions

Transaction types:

* `deposit`
* `withdraw`
* `transfer_in`
* `transfer_out`
* `fee`

Every transaction stores:

* account id
* amount
* balance after
* title
* memo
* issuer
* receiver
* counterparty account
* time
