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



# Class: UtilsInternal


Utils not meant to be exported to the public

## Index

### Methods

* [ensureArray](UtilsInternal.md#ensureArray)
* [getRandomNumber](UtilsInternal.md#getRandomNumber)
* [getWeb3Sync](UtilsInternal.md#getWeb3Sync)
* [lastBlock](UtilsInternal.md#lastBlock)
* [sleep](UtilsInternal.md#sleep)
* [stopWatchingAsync](UtilsInternal.md#stopWatchingAsync)



---
## Methods
<a id="ensureArray"></a>

### «Static» ensureArray

► **ensureArray**T(arr: *`Array`.<`T`>⎮`T`*): `Array`.<`T`>



*Defined in [utilsInternal.ts:15](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L15)*



**Type parameters:**

#### T 
**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| arr | `Array`.<`T`>⎮`T`   |  - |





**Returns:** `Array`.<`T`>





___

<a id="getRandomNumber"></a>

### «Static» getRandomNumber

► **getRandomNumber**(): `number`



*Defined in [utilsInternal.ts:38](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L38)*





**Returns:** `number`





___

<a id="getWeb3Sync"></a>

### «Static» getWeb3Sync

► **getWeb3Sync**(): `Web3`



*Defined in [utilsInternal.ts:42](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L42)*





**Returns:** `Web3`





___

<a id="lastBlock"></a>

### «Static» lastBlock

► **lastBlock**(): `Promise`.<`number`>



*Defined in [utilsInternal.ts:25](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L25)*



Returns the last mined block in the chain.




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





___

<a id="sleep"></a>

### «Static» sleep

► **sleep**(milliseconds: *`number`*): `Promise`.<`any`>



*Defined in [utilsInternal.ts:11](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L11)*



**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| milliseconds | `number`   |  - |





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





___

<a id="stopWatchingAsync"></a>

### «Static» stopWatchingAsync

► **stopWatchingAsync**(filter: *`FilterResult`*): `Promise`.<`any`>



*Defined in [utilsInternal.ts:34](https://github.com/daostack/arc.js/blob/9063ecdf/lib/utilsInternal.ts#L34)*



For environments that don't allow synchronous functions


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| filter | `FilterResult`   |  - |





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





___


