Knowing who acted with what parties

If I have a token letting me act as p1 and p2 , using which I exercise a choice where p1 is the controller, is it recorded or observable via the ledger API that I acted as p1 and p2.

A potential use case is a company and employee situation. A company issues to employee a JWT with the ability to act as two parties; their personal (for example seeing tasks that the employee has to do) and the company token so that they can do things on their behalf. Can the company then build some off-ledger solution that would record which employee did what. For example, was it Alice or Bob that purchased 100 staplers for the office?

I am aware that one could have explicit delegation contracts that would model this on the ledger.

1 Like

You cannot observe the actAs parties via the ledger API directly at the moment. In general, it is stored on the submitting participant and you can observe it indirectly via command completions (which are filtered by the submitters) and command deduplication which happens by submitter.
But if you need direct access, storing it in some kind of middleware is your best option.

1 Like

The company can create an application where they subscribe as employee E and if they notice that an action that company is completed on this stream then they know that E performed it on their behalf?

1 Like

If they subscribe to the completion stream as party E and application ID A then they should receive completions for all for all commands submitted on this participant with application ID A where E is one of the submitters.

2 Likes

Thank you!

1 Like