I’d like to list entries along with their adresses, is there a utility function for doing that? Or can someone point me to an example? (My Rust knowledge is unfortunately … very basic)
hdk::utils::get_links_and_load_type produces something like this:
{
Ok: [
{
name: 'Foot',
some_data: 'Sits at the end of the leg',
},
{
name: 'Hand',
some_data: 'Useful for picking up stuff',
},
]
}
I’m interested in something like this:
{
Ok: [
{
address: 'QmZNaXogq8jaCGmRvuGNAeowqDXgQPhMiyQcxEVzZR4e6z',
name: 'Foot',
some_data: 'Sits at the end of the leg',
},
{
address: 'QmQ95DgYyXqVto9fe9sBx95cwxHWgyx34UxYZ3baH9n7Ar',
name: 'Hand',
some_data: 'Useful for picking up stuff',
},
]
}
Hello Kristofer! Nice to see you here in the forum; I’ve seen you around (are you part of the Currency Design Workshop? or you a Twitter acquaintance?)
Wow, you know, there doesn’t seem to be an option for that. Fortunately, though, you can derive an address from an entry, so if you’re using get_links_and_load() you can iterate over the result like so:
Great, thanks, that’s just what I was looking for. [team poke] A generic function similar to this sounds like a potential future addition to hdk::utils.
And no, not the currency design workshop. Twitter, yes. I work with @ViktorZaunders and Food Shift. We have done a lot of exploring and modelling together for Shiro and did some Holochain testing a while back.
Now with the alpha net coming online, the Holoports shipping and everything, I’m eager to start prototyping again. Will hopefully have some simple little thing running in a week or two that I would love to try all the way in Holoscape.