# Accounts

## Get Accounts

Get all accounts for addresses owned by address.Copy

```
dsa.getAccounts(authority) // an ethereum address
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })
```

## Returns

`Array` of `Object` with all the DSA where address is authorised.Copy

```
[
  {
      id: 52, // DSA ID
      address: "0x...", // DSA Address
      version: 1 // DSA version
  },
  ...
]
```

## Get Auth by Address

Get all the authorised address(es) of a DSA by address.Copy

```
dsa.getAuthByAddress(address) // an ethereum address
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })
```

## Returns

`Array` of address(es) authorised to make calls to the DSA.Copy

```
[
  "0x...",
  "0x...",
  "0x...",
  ...
]
```

## Get Auth by ID

Get all the authorised address(es) of a DSA by ID.Copy

```
dsa.getAuthById(dsaID) // the DSA ID
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })
```

## Returns

`Array` of address(es) authorised to make calls to the DSA.Copy

```
[
  "0x...",
  "0x...",
  "0x...",
  ...
]
```

## Get Count

Get global number of DSAs.Copy

```
dsa.count()
  .then(data => {
    return data
  })
  .catch(error => {
    return error
  })
```

## Returns

`Number` of DSA accounts created globally.
