0

I read about the identity-tp CLI commands to set permissions. Is it possible to do the same with JavaScript code? Like create policy, roles and send a transaction to identity-tp using JavaScript?

My use case is to set a permissioned network to store sensitive data. Only the users registered with the app will get permission to do the transaction.

Nowhere
  • 11
  • 4
  • Yes you can write client in js. Example is available here https://github.com/askmish/sawtooth-simplewallet/tree/master/jsclient – Arun May 03 '21 at 12:24
  • Thanks @Arun..but my question is not about writing js client..its about writing a identity-tp transaction in js. Instead of using the CLI commands to set permission keys, sending a transaction to identity-tp to do so. – Nowhere May 03 '21 at 13:01
  • It depends on how you would like to operate a Sawtooth network. Ideally you would retain permissions access to a set of administrators. However if your application demands are such that you would like to dynamically change permissions, change in permissions can be done by distributed set of administrators, then having a js client is better than automating via scripts in the backend. – Arun May 03 '21 at 18:08
  • Continuing on the previous comment, are you expecting your app users client to have direct access to your Sawtooth network? – Arun May 03 '21 at 18:09
  • Yeah, the preference is to set permission through admins..the other option is an experimental one. Thanks @ Arun – Nowhere May 04 '21 at 02:06

0 Answers0