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



# Class: AvatarService


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

let avatarService = new AvatarService(avatarAddress);

## Index

### Constructors

* [constructor](AvatarService.md#constructor)


### Properties

* [isUController](AvatarService.md#isUController)


### Methods

* [getAvatar](AvatarService.md#getAvatar)
* [getController](AvatarService.md#getController)
* [getControllerAddress](AvatarService.md#getControllerAddress)
* [getEthBalance](AvatarService.md#getEthBalance)
* [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>


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


*Defined in avatarService.ts:24*



**Parameters:**

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





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

---


## Properties
<a id="isUController"></a>

###  isUController

**●  isUController**:  *`boolean`* 

*Defined in avatarService.ts:16*





___


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

###  getAvatar

► **getAvatar**(): `Promise`.<`any`>



*Defined in avatarService.ts:35*



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:67*



Returns promise of a Truffle contract wrapper for the controller. Could be either UController or Controller. You can know which one by checking the AvatarService instance property `isUController`.




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





___

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

###  getControllerAddress

► **getControllerAddress**(): `Promise`.<`string`>



*Defined in avatarService.ts:52*



Returns promise of the address of the controller




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





___

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

###  getEthBalance

► **getEthBalance**(): `Promise`.<`BigNumber`>



*Defined in avatarService.ts:165*



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




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





___

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

###  getNativeReputation

► **getNativeReputation**(): `Promise`.<`any`>



*Defined in avatarService.ts:104*



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




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





___

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

###  getNativeReputationAddress

► **getNativeReputationAddress**(): `Promise`.<`string`>



*Defined in avatarService.ts:91*



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




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





___

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

###  getNativeToken

► **getNativeToken**(): `Promise`.<`any`>



*Defined in avatarService.ts:132*



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




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





___

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

###  getNativeTokenAddress

► **getNativeTokenAddress**(): `Promise`.<`string`>



*Defined in avatarService.ts:118*



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:146*



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


**Parameters:**

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





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





___


