### Table of Contents - [constructor](#constructor) - [queue](#queue) - [nextTaggedMessage](#nexttaggedmessage) - [nextMessage](#nextmessage) ## constructor [inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L23-L31 "Source code on GitHub") The inbox manages and sorts incoming messages and provides functions to wait on messages **Parameters** - `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** ## queue [inbox.js:37-47](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L37-L47 "Source code on GitHub") queues a message **Parameters** - `message` **Message** ## nextTaggedMessage [inbox.js:55-66](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L55-L66 "Source code on GitHub") Waits for a message sent with a capablitly that has one of the given tags **Parameters** - `tags` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any>** - `timeout` **Integer** Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## nextMessage [inbox.js:73-109](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L73-L109 "Source code on GitHub") Waits for the the next message if any **Parameters** - `timeout` **Integer** (optional, default `0`) Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**