codama-idl / codama

Generate clients, CLIs, documentation and more from your Solana programs
MIT License
73 stars 16 forks source link

Delete `IdentityValueNode`? #86

Open lorisleiva opened 3 months ago

lorisleiva commented 3 months ago

Since we already have a PayerValueNode, do we also need a IdentityValueNode?

Both of these aim to refer to the "main wallet" we are using. For instance, if you are inside an app, that's the connected wallet. If you are inside a terminal, that's whoever solana address is, etc.

Since Codama was initially created to render Umi packages and Umi distinguishes between the "main wallet that pays for things" (i.e. the payer) and the "main wallet that gets things" (i.e. the identity), there was a need for both nodes.

However, since Codama is now aiming to be a framework agnostic standard that describe programs, does it make sense to still have that distinction regardless of Umi (we can always add that information on the Umi renderer itself to avoid breaking changes).

Personally, I'm on the fence with this one. I still think the distinction makes sense but I'm not sure if having two "main wallet" pointer is more confusing than helping.