[API Reference](../README.md) > [AvatarService](../classes/AvatarService.md)

# Class: AvatarService

Methods for querying information about an Avatar. Use it by:

```
const avatarService = new AvatarService(avatarAddress);

```

## Hierarchy

**AvatarService**

## Index

### Constructors

* [constructor](AvatarService.md#constructor)

### Properties

* [controllerService](AvatarService.md#controllerService)

### Methods

* [getAvatar](AvatarService.md#getAvatar)
* [getController](AvatarService.md#getController)
* [getControllerAddress](AvatarService.md#getControllerAddress)
* [getEthBalance](AvatarService.md#getEthBalance)
* [getIsUController](AvatarService.md#getIsUController)
* [getNativeReputation](AvatarService.md#getNativeReputation)
* [getNativeReputationAddress](AvatarService.md#getNativeReputationAddress)
* [getNativeToken](AvatarService.md#getNativeToken)
* [getNativeTokenAddress](AvatarService.md#getNativeTokenAddress)
* [getTokenBalance](AvatarService.md#getTokenBalance)

---

## Constructors

<a id="constructor"></a>

###  constructor

⊕ **new AvatarService**(avatarAddress: *[Address](../#Address)*): [AvatarService](AvatarService.md)

*Defined in avatarService.ts:27*

**Parameters:**

| Param | Type |
| ------ | ------ |
| avatarAddress | [Address](../#Address) |

**Returns:** [AvatarService](AvatarService.md)

___

## Properties

<a id="controllerService"></a>

###  controllerService

**● controllerService**: *[ControllerService](ControllerService.md)*

*Defined in avatarService.ts:21*

___

## Methods

<a id="getAvatar"></a>

###  getAvatar

▸ **getAvatar**(): `Promise`<`any`>

*Defined in avatarService.ts:38*

Returns promise of the Avatar Truffle contract wrapper. Returns undefined if not found.

**Returns:** `Promise`<`any`>

___
<a id="getController"></a>

###  getController

▸ **getController**(): `Promise`<`any`>

*Defined in avatarService.ts:68*

Returns promise of a Truffle contract wrapper for the controller. Could be either UController or Controller. You can know which one by called `getIsUController`.

**Returns:** `Promise`<`any`>

___
<a id="getControllerAddress"></a>

###  getControllerAddress

▸ **getControllerAddress**(): `Promise`<`string`>

*Defined in avatarService.ts:59*

Returns promise of the address of the controller

**Returns:** `Promise`<`string`>

___
<a id="getEthBalance"></a>

###  getEthBalance

▸ **getEthBalance**(): `Promise`<`BigNumber`>

*Defined in avatarService.ts:147*

Return the current ETH balance for this avatar, in Wei.

**Returns:** `Promise`<`BigNumber`>

___
<a id="getIsUController"></a>

###  getIsUController

▸ **getIsUController**(): `Promise`<`boolean`>

*Defined in avatarService.ts:52*

**Returns:** `Promise`<`boolean`>

___
<a id="getNativeReputation"></a>

###  getNativeReputation

▸ **getNativeReputation**(): `Promise`<[ReputationWrapper](ReputationWrapper.md)>

*Defined in avatarService.ts:88*

Returns promise of the avatar's native reputation Truffle contract wrapper.

**Returns:** `Promise`<[ReputationWrapper](ReputationWrapper.md)>

___
<a id="getNativeReputationAddress"></a>

###  getNativeReputationAddress

▸ **getNativeReputationAddress**(): `Promise`<`string`>

*Defined in avatarService.ts:75*

Returns promise of the address of the avatar's native reputation.

**Returns:** `Promise`<`string`>

___
<a id="getNativeToken"></a>

###  getNativeToken

▸ **getNativeToken**(): `Promise`<[DaoTokenWrapper](DaoTokenWrapper.md)>

*Defined in avatarService.ts:115*

Returns promise of the avatar's native token Truffle contract wrapper. Assumes the token is a `DAOToken`.

**Returns:** `Promise`<[DaoTokenWrapper](DaoTokenWrapper.md)>

___
<a id="getNativeTokenAddress"></a>

###  getNativeTokenAddress

▸ **getNativeTokenAddress**(): `Promise`<`string`>

*Defined in avatarService.ts:101*

Returns promise of the address of the avatar's native token.

**Returns:** `Promise`<`string`>

___
<a id="getTokenBalance"></a>

###  getTokenBalance

▸ **getTokenBalance**(tokenAddress?: *[Address](../#Address)*): `Promise`<`BigNumber`>

*Defined in avatarService.ts:129*

Return a current token balance for this avatar, in Wei. If tokenAddress is not supplied, then uses native token.

**Parameters:**

| Param | Type |
| ------ | ------ |
| `Optional` tokenAddress | [Address](../#Address) |

**Returns:** `Promise`<`BigNumber`>

___

