How to extend default Party interface?

If you want to associate data with a Party, define a template containing that party and whatever data you want associated with the party. Then, you will probably want the key of that template to be the party, so you can lookup by key in order to fetch the data when you need it.

Intuitively, it is best not to think of these kinds of things as “properties of the Party”. I am not born with a bank account number, but I have one by virtue of contracts into which I’ve entered, and that account number is properly part of those contracts, not intrinsic to my being.

The big remaining question is, what party or parties are the signatory and observers of this template. Is the party itself responsible for the associated values, able to revoke or update that data at any time? What parties can access the associated data? These are all highly dependent on your use case. Even if the answer is “everyone should be able to access it”, other discussions here break down the nuances even further.

1 Like