On the topic of cNFTs, there is a leaf_delegate
and leaf_owner
.
Can anyone explain what is a leaf_delegate
for cNFTs? And what is the difference between the two?
I posed this question on X: https://twitter.com/burger606/status/1700916676437369159
Essentially, having a delegate allows for partial ownership. Which means you can assign another pubkey as the delegate to e.g. burn the asset. This allows for extra functionality for instance with games or other use-cases.
Although as the owner you have full ownership of the asset and you can always remove or reassign the delegate.
Thanks to https://twitter.com/Athar__Mohammad for answering!
Delegates are more useful for TokenAccounts, where you can approve another account to give them access to an AMOUNT of tokens, e.g. token::approve(cpi_ctx, amount)
can give another account the ability to transfer, burn, etc amount
tokens, which you can use as essentially a temporary transfer.
For NFTs, you are granting owner-like privileges, the only practical difference between owner and delegate is that the owner can revoke the delegate's authority (token::revoke(cpi_ctx)
)