rchain-api
rchain-api copied to clipboard
How to get value from registry ?
In another contract I stored a value in the registry:
new
uriChan,
insertArbitrary(`rho:registry:insertArbitrary`),
stdout(`rho:io:stdout`) in {
// Tell the registry that we want to register
// give URI back on uriChan
insertArbitrary!(bundle+{"coucou"} , *uriChan) |
// Wait for URI response
for(@uri <- uriChan) {
stdout!(uri)
}
}
The returned address is rho:id:pmc1cn6zff1pk5sf3purwby4zuqmwdiaj5xd7mu55usk88q5be9and
How can I get this value back in a node JS / web browser context using the rchain-api.js library ?
Is it by using the listenForDataAtPublicName
or listenForDataAtPrivateName
api ? Or something else ?