how do I assign receive only permission for an asset to an address

+2 votes
Hi , I have two nodes . 1st is root node and 2nd is connected to 1st one. 1st node granted connect permission to second address.  Now I want to create a asset from 1st node  and send to 2nd one.  2nd node can only receive  it but cant spend/send it to others.  

when I assign receive only permission to 2nd node from node one , it throws error

 

E:\blockchain\multichain2-node1>multichain-cli chain1 grant 15mMSv8GPa1BF3yJootBsDPZeP4e56iQQ7Amoy asset5.receive
{"method":"grant","params":["15mMSv8GPa1BF3yJootBsDPZeP4e56iQQ7Amoy","asset5.receive"],"id":1,"chain_name":"chain1"}

error code: -8
error message:
Invalid permission
asked Sep 25, 2018 by AMAR

1 Answer

0 votes
First, per-asset permissions are only supported in MultiChain 2.0 (alphas).

Second, you can only set a per-asset permission if that permission is set to be restricted for that asset.
answered Sep 25, 2018 by MultiChain
I am using Multichain2.0 (alphas). Permission is set on asset for a address. different addresses can have different permission for the same asset. So If I have to  set a permission for a address to asset.receive only, how do I do ?
You were doing it right, but it only works for assets which are restricted in terms of send and receive permissions. To create such an asset, use this kind of issuance (assumes Linux command line):

multichain-cli chain1 issue <address> '{"name":"asset1","open":true,"restrict":"receive"}' 1000 0.01
...