Holochain Forum

Using holonix/vagrant code from Barcelona hackathon

Hi there -

In another recent thread, @hedayat kindly pointed me to this repo as an example of using capabilities for sharing/access control. I’m trying to get it working, but hitting an issue.

What I’ve done:

  • Clone the repo
  • Installed vagrant-nixos-plugin
  • run nix-shell --run hc-test in main dir (as indicated at line 17 of the Vagrantfie)

But this produces the error -
error: getting status of '/nix/store/7akyyfk87szikb25axmwafnn5yfkvhs8-source': No such file or directory

I confirm I can run nix-shell https://holochain.love and work with the tutorial material so I’m not sure how to diagnose this error. Does anyone have an idea?

Thank you very much -

1 Like

Hi @robot5x, don’t know the exact issue you are hitting, just beware that that repository is based on holochain redux, not holochain rsm - and capabilities have been majorly revamped in rsm.

Here is an explanation of how capabilities work in rsm and here is an example.

By all means, do continue to try to setup that repository if it is of interest to you.

1 Like

thank you @guillemcordoba I really appreciate the information! so it makes sense for me to work with RSM if there is such a difference…

My short-term goal is to do a simple proof of concept, where I can set up 3-5 users who can share data but can also control access to it. I do not need to think about a UI of any kind.

@thedavidmeister also linked me to that lib.rs file in another thread, but to be honest I just have no idea where to start with it!

I come from python and am really new to rust, but have worked through the Rust book and done some basic things of my own. When I’m learning I like to have a well-formed example I can play around with (don’t we all!). But I don’t know about any RSM tutorials or examples I can really play with to understand it.

Are there any? Or is there some other reading I can do to help a beginner build a basic capabilities example in RSM?

thank you - alex

ps. I also tried the beginner task at holochain gym but have an error - I will make a new post about that to try and keep the forum tidy!

capabilities are either unrestricted, unassigned or assigned

the grantor commits a capability and then sends the associated secret to anyone who wants to call one of the functions specified in the grant

ok thanks - but, as a beginner looking at a blank page in VSCode or Atom, how do I turn this concept into actual code that does something?

The only working examples I’ve had to practically learn from so far, are the tutorials and LEAP from devcamp - both I presume are now outdated with RSM, and neither has examples of using capabilities.

Is there something tangible I can pick up and edit or tweak that will help me learn about this? sorry, this must seem like a needlessly basic question to you, but I’m obviously not competent enough yet to just go ahead and do something without some kind of working example or other detail.
Thanks for your help - alex.

cc: @lucas