link permissions to asset

+1 vote

Hi!

I'm just getting into Multichain, so I'm not familiar with all features and possibilities yet. ;)

 

For my use-case it would be very useful to be able to link permissions to holding an asset. More specific: If someone has asset A he would have e.g. the permission to write to stream S.

My intention is to be able to have and write metadata of asset A (in stream S). And: If asset A is transfered the ability to write metadata is transfered to the holder of asset A, too.



Is there a (native) posibility to achieve this? If there is a more MultiChainy solution to this, please give a hint! ;)

Thanks for your answers.

 

edit: I had a look at sendwithdata where data can be passed to a stream. But I think the write permission in this case has to be assigned before, right?

asked Jun 19, 2018 by zolar
reshown Jun 19, 2018 by MultiChain

2 Answers

+1 vote
 
Best answer
So this is an interesting request. You cannot do it with MultiChain yet. But once we have implemented Smart Filters (the next and last major feature in the MultiChain 2.0 roadmap, already under development) it would be quite easy to do.

You will be able to create a rule that says that an address can only write to a stream if it also sends some units of a particular asset in the same transaction. In practice the asset units would be sent back to the same user, so they are just using this payment to themselves as a way of proving to the filter that they own the asset.
answered Jun 19, 2018 by MultiChain
selected Jul 12, 2018 by zolar
Thanks for the answer and the great job on MultiChain!

So right now it is not possible to implement this on a *native* level yet?
I would have to check the wallet of the specific user and grant the write permission on application-level.
Yes, that's right - it's not possible to do this natively yet. Come back in a few months...
I'm really looking forward to this feature! For representing the hold of real world assets in digital assets it will be very useful.
Right now I'll try a workaround with atomic exchanges. (more of an idea than a workaround though. I'm still new to MultiChain...) Or realize it on application level.
0 votes

Hi zolar,

Basically streams are completly  permission based. In your case 

  • The admin will create the stream S
  • When ever the user/node is receiving the asset A, you can make the user to subscribe stream S 
  • You can make unsubscribe too
  • There are API calls, refer the following calls
    • subscribe
    • unsubscribe
    • create (read the doc)
Hope helped. Let me know if any.
 
Shiva.P
 

 

answered Jun 19, 2018 by shivap17
Thanks for your answer!

Okay. As far as I understand it the 'subscribe' call/function is read-only..
To be able to publish to the stream you need stream-specific write-permission which is granted by the stream-admin/creator of the stream.

I think a stream-admin would have to grant the user who recieved asset A manually.
...