Comment on page
A player profile is an account with a header and then a list of
ProfileKeys. The header contains meta-information such as the key-threshold (lite-multi-sig for auth keys) and the number of keys in the profile. Following this fixed size header are a number of
ProfileKeys. The same key may appear more than once in a given profile to allow for different scopes and permissions to be added to a given key.
The permissions the player profile program defines for itself are as follows:
The only valid scope for the player profile program is the program id.
AUTHpermissions are the super-user of the player profile. There must always be at least
AUTHkeys in the profile.
AUTHkeys count as the super-set of all possible permissions. The only ways to add/remove auth keys is to call the
adjust_authinstruction. This instruction requires the signatures of at least
key_threshold(max of old and new)
AUTHkeys. The key threshold is only used to determine the number of signatures required to change the auth keys. It is not used when an
AUTHkey is signing a usage transaction, each auth key is a super-set on its own.
ADD_KEYSpermissions allow a key to add new keys to the profile. The new keys must have at most the permissions of the key adding them. This is checked by bitflag comparison between another entry with the same key.
REMOVE_KEYSpermissions allow a key to remove keys from the profile. This is only allowed for non-
AUTHkeys can only be removed by the
Player profiles includes a profile name that is arbitrary bytes (intended for utf-8 bytes). This name can be changed by any key with
CHANGE_NAMEpermissions. These names are non-unique and not even verfied for valid utf-8-ness.
Player profiles adds 1 account to each transaction as well as 2 instruction bytes and ~2k compute to each instruction. Using player profiles requires direct implementation into your program (or into a middleware program). Player profiles is a wallet replacement so does not require major shifts in each instruction. Player profiles can also be supported alongside normal wallets in programs with a simple ownership check for the signing key.