### Table of Contents - [constructor](#constructor) - [send](#send) - [getActor](#getactor) - [createActor](#createactor) - [createStateRoot](#createstateroot) - [registerContainer](#registercontainer) ## constructor [index.js:10-15](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L10-L15 "Source code on GitHub") The Hypervisor manages the container instances by instantiating them and destorying them when possible. It also facilitates localating Containers **Parameters** - `tree` **Tree** a [radix tree](https://github.com/dfinity/js-dfinity-radix-tree) to store the state - `nonce` (optional, default `0`) ## send [index.js:23-27](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L23-L27 "Source code on GitHub") sends a message **Parameters** - `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the [message](https://github.com/primea/js-primea-message) to send - `cap` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the capabilitly used to send the message Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** a promise that resolves once the receiving container is loaded ## getActor [index.js:55-63](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L55-L63 "Source code on GitHub") gets an existsing actor **Parameters** - `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the actor's ID Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## createActor [index.js:71-85](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L71-L85 "Source code on GitHub") creates an instance of an Actor **Parameters** - `type` **Integer** the type id for the container - `code` - `id` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the id for the actor (optional, default `{nonce:this.nonce++,parent:null}`) - `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor ## createStateRoot [index.js:98-101](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L98-L101 "Source code on GitHub") creates a state root starting from a given container and a given number of ticks **Parameters** - `ticks` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks at which to create the state root (optional, default `Infinity`) Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## registerContainer [index.js:109-111](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L109-L111 "Source code on GitHub") regirsters a container with the hypervisor **Parameters** - `Constructor` **Class** a Class for instantiating the container - `args` **any** any args that the contructor takes - `typeId` **Integer** the container's type identification ID