git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: aa1510bda0bef9b7d7261249e14f2f553ca0ed32

Files: aa1510bda0bef9b7d7261249e14f2f553ca0ed32 / defaultAgent.js

300 bytesRaw
1exports.run = async (message, kernel) => {
2 const to = message.payload.to
3 const next = to.split('/')[message.hops - 1]
4 if (next !== undefined) {
5 return kernel.send(next, message)
6 } else if (message.payload.getValue) {
7 return (await kernel.state.get(message.data.getValue)).value
8 }
9}
10

Built with git-ssb-web