### Table of Contents - [constructor](#constructor) - [queue](#queue) - [nextMessage](#nextmessage) ## constructor [inbox.js:24-31](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L24-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/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.state` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.hypervisor` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** ## queue [inbox.js:41-51](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L41-L51 "Source code on GitHub") queues a message **Parameters** - `message` **Message** ## nextMessage [inbox.js:58-91](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L58-L91 "Source code on GitHub") Waits for the the next message if any **Parameters** - `timeout` **Integer** Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)**