### Table of Contents - [constructor](#constructor) - [queue](#queue) - [nextTaggedMessage](#nexttaggedmessage) - [nextMessage](#nextmessage) ## constructor [inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/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/46c11229b2dac84739660d8242a0eaa65697f8bc/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/46c11229b2dac84739660d8242a0eaa65697f8bc/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-110](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/inbox.js#L73-L110 "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)**