Type alias PlayerProfileIDL
PlayerProfileIDL: {
accounts: [{
docs: ["Stores a player's name on-chain."];
name: "playerName";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The profile this name is for."];
name: "profile";
type: "publicKey";
}, {
docs: ["The bump for this account."];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
docs: ["A player profile."];
name: "profile";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The number of auth keys on the account"];
name: "authKeyCount";
type: "u16";
}, {
docs: ["The number of auth keys needed to update the profile."];
name: "keyThreshold";
type: "u8";
}, {
docs: ["The next sequence number for a new role."];
name: "nextSeqId";
type: "u64";
}, {
docs: ["When the profile was created."];
name: "createdAt";
type: "i64";
}];
kind: "struct";
};
}, {
docs: ["A player's roles for a given profile", "Remaining data contains an unordered list of [`RoleMembership`](RoleMembership) structs"];
name: "profileRoleMembership";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The Profile this belongs to"];
name: "profile";
type: "publicKey";
}, {
docs: ["The member's profile pubkey"];
name: "member";
type: "publicKey";
}, {
docs: ["PDA bump"];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
docs: ["A Role associated with a Profile. A Role contains an unordered list of Role Members in its", "remaining data which lists all of the members who carry this role."];
name: "role";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["Profile that this role belongs to"];
name: "profile";
type: "publicKey";
}, {
docs: ["Origin authority of the account"];
name: "authorizer";
type: "publicKey";
}, {
docs: ["Role's seq_id"];
name: "roleSeqId";
type: "u64";
}, {
docs: ["Is role accepting new members"];
name: "acceptingNewMembers";
type: "u8";
}, {
docs: ["The name of the rank", "TODO: Add instruction to use `player-name` as the label", "PDA bump"];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}];
errors: [{
code: 6000;
msg: "Key index out of bounds";
name: "KeyIndexOutOfBounds";
}, {
code: 6001;
msg: "Profile did not match profile key";
name: "ProfileMismatch";
}, {
code: 6002;
msg: "Key did not match profile key";
name: "KeyMismatch";
}, {
code: 6003;
msg: "Scope did not match profile scope";
name: "ScopeMismatch";
}, {
code: 6004;
msg: "Key expired";
name: "KeyExpired";
}, {
code: 6005;
msg: "Key is missing permissions";
name: "KeyMissingPermissions";
}, {
code: 6006;
msg: "Permissions don't match available";
name: "PermissionsMismatch";
}, {
code: 6007;
msg: "Auth keys cannot expire";
name: "AuthKeyCannotExpire";
}, {
code: 6008;
msg: "New auth keys must be signers";
name: "AuthKeyMustSign";
}, {
code: 6009;
msg: "Duplicate key when adjusting auth keys";
name: "DuplicateAuthKey";
}, {
code: 6010;
msg: "Role authority has already been set";
name: "RoleAuthorityAlreadySet";
}, {
code: 6011;
msg: "Role is not accepting new members";
name: "RoleNotAcceptingMembers";
}, {
code: 6012;
msg: "Role membership is not as expected";
name: "RoleMembershipMismatch";
}, {
code: 6013;
msg: "Role limit exceeded";
name: "RoleLimitExceeded";
}, {
code: 6014;
msg: "Cannot remove role with members";
name: "RoleHasMembers";
}, {
code: 6015;
msg: "This feature is not yet support";
name: "FeatureNotImplemented";
}];
instructions: [{
accounts: [{
docs: ["The new member"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "acceptRoleInvitation";
}, {
accounts: [{
docs: ["The funder for reallocation."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile of the member to be added to the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "addExistingMemberToRole";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["Key with [`ProfilePermissions::ADD_KEYS`] permission to add keys."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The profile to add to"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyAddIndex";
type: "u16";
}, {
name: "keyPermissionsIndex";
type: "u16";
}, {
name: "keysToAdd";
type: {
vec: {
defined: "AddKeyInput";
};
};
}];
name: "addKeys";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to create"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "authIndexes";
type: {
vec: "u16";
};
}, {
name: "newKeyPermissions";
type: {
vec: {
defined: "AddKeyInput";
};
};
}, {
name: "removeRange";
type: {
array: ["u16", 2];
};
}, {
name: "newKeyThreshold";
type: "u8";
}];
name: "adjustAuth";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to create"];
isMut: true;
isSigner: true;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyPermissions";
type: {
vec: {
defined: "AddKeyInput";
};
};
}, {
name: "keyThreshold";
type: "u8";
}];
name: "createProfile";
}, {
accounts: [{
docs: ["The funder for the transaction"];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The [`Profile`] account that the role is being created for"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The role account being created"];
isMut: true;
isSigner: false;
name: "newRoleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "createRole";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile of the user to be added to the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "inviteMemberToRole";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The new member joining the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "joinRole";
}, {
accounts: [{
docs: ["The funder to receive the rent allocation."];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The member leaving the role"];
isMut: false;
isSigner: false;
name: "member";
}, {
docs: ["The role membership account for the member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is leaving"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "leaveRole";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["Key with [`ProfilePermissions::REMOVE_KEYS`] permission to add keys."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The profile to remove from"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keysToRemove";
type: {
array: ["u16", 2];
};
}];
name: "removeKeys";
}, {
accounts: [{
docs: ["The funder to receive the rent allocation"];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The profile of the user to be added to the role"];
isMut: false;
isSigner: false;
name: "member";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is being removed from"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "removeMemberFromRole";
}, {
accounts: [{
docs: ["The funder for the transaction"];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The Profile that the role is being removed from"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The role being removed"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The role name account (if it exists)"];
isMut: true;
isSigner: false;
name: "roleNameAccount";
}];
args: [{
name: "roleNameBump";
type: "u8";
}, {
name: "keyIndex";
type: "u16";
}];
name: "removeRole";
}, {
accounts: [{
docs: ["The key authorized to change the name."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to set the name for."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The name account."];
isMut: true;
isSigner: false;
name: "name";
}, {
docs: ["The system program."];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "name";
type: "bytes";
}];
name: "setName";
}, {
accounts: [{
docs: ["The profile which owns the role being modified."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set as accepting members."];
isMut: true;
isSigner: false;
name: "roleAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleAcceptingMembers";
}, {
accounts: [{
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to set the name for."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set the authorizer for."];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The authorizer account to set."];
isMut: false;
isSigner: false;
name: "authorizer";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleAuthorizer";
}, {
accounts: [{
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile which the role belongs to"];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role to set the name for."];
isMut: false;
isSigner: false;
name: "role";
}, {
docs: ["The name account."];
isMut: true;
isSigner: false;
name: "name";
}, {
docs: ["The system program."];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "name";
type: "bytes";
}];
name: "setRoleName";
}, {
accounts: [{
docs: ["The profile which owns the role being modified."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set as not accepting members."];
isMut: true;
isSigner: false;
name: "roleAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleNotAcceptingMembers";
}];
name: "player_profile";
types: [{
docs: ["Struct for adding a key"];
name: "AddKeyInput";
type: {
fields: [{
docs: ["The block of permissions"];
name: "scope";
type: "publicKey";
}, {
docs: ["The expire time of the key to add"];
name: "expireTime";
type: "i64";
}, {
docs: ["The permissions for the key"];
name: "permissions";
type: {
array: ["u8", 8];
};
}];
kind: "struct";
};
}, {
docs: ["Represents potential membership statuses for a player with a role"];
name: "MemberStatus";
type: {
kind: "enum";
variants: [{
name: "Inactive";
}, {
name: "Active";
}];
};
}, {
docs: ["A key on a profile."];
name: "ProfileKey";
type: {
fields: [{
docs: ["The key."];
name: "key";
type: "publicKey";
}, {
docs: ["The key for the permissions."];
name: "scope";
type: "publicKey";
}, {
docs: ["The expire time for this key.", "If `<0` does not expire."];
name: "expireTime";
type: "i64";
}, {
docs: ["The permissions for the key."];
name: "permissions";
type: {
array: ["u8", 8];
};
}];
kind: "struct";
};
}, {
docs: ["Represents a member's status in a role"];
name: "RoleMembership";
type: {
fields: [{
docs: ["The member or role key associated with this membership"];
name: "key";
type: "publicKey";
}, {
docs: ["The member's role status"];
name: "status";
type: "u8";
}];
kind: "struct";
};
}];
version: "0.7.3";
}
Type declaration
-
accounts: [{
docs: ["Stores a player's name on-chain."];
name: "playerName";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The profile this name is for."];
name: "profile";
type: "publicKey";
}, {
docs: ["The bump for this account."];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
docs: ["A player profile."];
name: "profile";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The number of auth keys on the account"];
name: "authKeyCount";
type: "u16";
}, {
docs: ["The number of auth keys needed to update the profile."];
name: "keyThreshold";
type: "u8";
}, {
docs: ["The next sequence number for a new role."];
name: "nextSeqId";
type: "u64";
}, {
docs: ["When the profile was created."];
name: "createdAt";
type: "i64";
}];
kind: "struct";
};
}, {
docs: ["A player's roles for a given profile", "Remaining data contains an unordered list of [`RoleMembership`](RoleMembership) structs"];
name: "profileRoleMembership";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["The Profile this belongs to"];
name: "profile";
type: "publicKey";
}, {
docs: ["The member's profile pubkey"];
name: "member";
type: "publicKey";
}, {
docs: ["PDA bump"];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
docs: ["A Role associated with a Profile. A Role contains an unordered list of Role Members in its", "remaining data which lists all of the members who carry this role."];
name: "role";
type: {
fields: [{
docs: ["The data version of this account."];
name: "version";
type: "u8";
}, {
docs: ["Profile that this role belongs to"];
name: "profile";
type: "publicKey";
}, {
docs: ["Origin authority of the account"];
name: "authorizer";
type: "publicKey";
}, {
docs: ["Role's seq_id"];
name: "roleSeqId";
type: "u64";
}, {
docs: ["Is role accepting new members"];
name: "acceptingNewMembers";
type: "u8";
}, {
docs: ["The name of the rank", "TODO: Add instruction to use `player-name` as the label", "PDA bump"];
name: "bump";
type: "u8";
}];
kind: "struct";
};
}]
-
errors: [{
code: 6000;
msg: "Key index out of bounds";
name: "KeyIndexOutOfBounds";
}, {
code: 6001;
msg: "Profile did not match profile key";
name: "ProfileMismatch";
}, {
code: 6002;
msg: "Key did not match profile key";
name: "KeyMismatch";
}, {
code: 6003;
msg: "Scope did not match profile scope";
name: "ScopeMismatch";
}, {
code: 6004;
msg: "Key expired";
name: "KeyExpired";
}, {
code: 6005;
msg: "Key is missing permissions";
name: "KeyMissingPermissions";
}, {
code: 6006;
msg: "Permissions don't match available";
name: "PermissionsMismatch";
}, {
code: 6007;
msg: "Auth keys cannot expire";
name: "AuthKeyCannotExpire";
}, {
code: 6008;
msg: "New auth keys must be signers";
name: "AuthKeyMustSign";
}, {
code: 6009;
msg: "Duplicate key when adjusting auth keys";
name: "DuplicateAuthKey";
}, {
code: 6010;
msg: "Role authority has already been set";
name: "RoleAuthorityAlreadySet";
}, {
code: 6011;
msg: "Role is not accepting new members";
name: "RoleNotAcceptingMembers";
}, {
code: 6012;
msg: "Role membership is not as expected";
name: "RoleMembershipMismatch";
}, {
code: 6013;
msg: "Role limit exceeded";
name: "RoleLimitExceeded";
}, {
code: 6014;
msg: "Cannot remove role with members";
name: "RoleHasMembers";
}, {
code: 6015;
msg: "This feature is not yet support";
name: "FeatureNotImplemented";
}]
-
instructions: [{
accounts: [{
docs: ["The new member"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "acceptRoleInvitation";
}, {
accounts: [{
docs: ["The funder for reallocation."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile of the member to be added to the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "addExistingMemberToRole";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["Key with [`ProfilePermissions::ADD_KEYS`] permission to add keys."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The profile to add to"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyAddIndex";
type: "u16";
}, {
name: "keyPermissionsIndex";
type: "u16";
}, {
name: "keysToAdd";
type: {
vec: {
defined: "AddKeyInput";
};
};
}];
name: "addKeys";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to create"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "authIndexes";
type: {
vec: "u16";
};
}, {
name: "newKeyPermissions";
type: {
vec: {
defined: "AddKeyInput";
};
};
}, {
name: "removeRange";
type: {
array: ["u16", 2];
};
}, {
name: "newKeyThreshold";
type: "u8";
}];
name: "adjustAuth";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to create"];
isMut: true;
isSigner: true;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyPermissions";
type: {
vec: {
defined: "AddKeyInput";
};
};
}, {
name: "keyThreshold";
type: "u8";
}];
name: "createProfile";
}, {
accounts: [{
docs: ["The funder for the transaction"];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The [`Profile`] account that the role is being created for"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The role account being created"];
isMut: true;
isSigner: false;
name: "newRoleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "createRole";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile of the user to be added to the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "inviteMemberToRole";
}, {
accounts: [{
docs: ["The funder for the new profile."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The new member joining the role"];
isMut: false;
isSigner: false;
name: "newMember";
}, {
docs: ["The role membership account for the new member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is joining"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "joinRole";
}, {
accounts: [{
docs: ["The funder to receive the rent allocation."];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The member leaving the role"];
isMut: false;
isSigner: false;
name: "member";
}, {
docs: ["The role membership account for the member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is leaving"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "leaveRole";
}, {
accounts: [{
docs: ["The funder for the profile."];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["Key with [`ProfilePermissions::REMOVE_KEYS`] permission to add keys."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The profile to remove from"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keysToRemove";
type: {
array: ["u16", 2];
};
}];
name: "removeKeys";
}, {
accounts: [{
docs: ["The funder to receive the rent allocation"];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The profile of the user to be added to the role"];
isMut: false;
isSigner: false;
name: "member";
}, {
docs: ["The profile which the role belongs to."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role membership account for the member"];
isMut: true;
isSigner: false;
name: "roleMembershipAccount";
}, {
docs: ["The role which the player is being removed from"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The system program"];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "keyIndexInRoleAccount";
type: "u16";
}, {
name: "keyIndexInMembershipAccount";
type: "u16";
}];
name: "removeMemberFromRole";
}, {
accounts: [{
docs: ["The funder for the transaction"];
isMut: true;
isSigner: false;
name: "funder";
}, {
docs: ["The Profile that the role is being removed from"];
isMut: true;
isSigner: false;
name: "profile";
}, {
docs: ["The role being removed"];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The role name account (if it exists)"];
isMut: true;
isSigner: false;
name: "roleNameAccount";
}];
args: [{
name: "roleNameBump";
type: "u8";
}, {
name: "keyIndex";
type: "u16";
}];
name: "removeRole";
}, {
accounts: [{
docs: ["The key authorized to change the name."];
isMut: false;
isSigner: true;
name: "key";
}, {
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to set the name for."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The name account."];
isMut: true;
isSigner: false;
name: "name";
}, {
docs: ["The system program."];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "name";
type: "bytes";
}];
name: "setName";
}, {
accounts: [{
docs: ["The profile which owns the role being modified."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set as accepting members."];
isMut: true;
isSigner: false;
name: "roleAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleAcceptingMembers";
}, {
accounts: [{
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile to set the name for."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set the authorizer for."];
isMut: true;
isSigner: false;
name: "roleAccount";
}, {
docs: ["The authorizer account to set."];
isMut: false;
isSigner: false;
name: "authorizer";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleAuthorizer";
}, {
accounts: [{
docs: ["The funder for the name size change."];
isMut: true;
isSigner: true;
name: "funder";
}, {
docs: ["The profile which the role belongs to"];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role to set the name for."];
isMut: false;
isSigner: false;
name: "role";
}, {
docs: ["The name account."];
isMut: true;
isSigner: false;
name: "name";
}, {
docs: ["The system program."];
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "keyIndex";
type: "u16";
}, {
name: "name";
type: "bytes";
}];
name: "setRoleName";
}, {
accounts: [{
docs: ["The profile which owns the role being modified."];
isMut: false;
isSigner: false;
name: "profile";
}, {
docs: ["The role account to set as not accepting members."];
isMut: true;
isSigner: false;
name: "roleAccount";
}];
args: [{
name: "keyIndex";
type: "u16";
}];
name: "setRoleNotAcceptingMembers";
}]
-
name: "player_profile"
-
types: [{
docs: ["Struct for adding a key"];
name: "AddKeyInput";
type: {
fields: [{
docs: ["The block of permissions"];
name: "scope";
type: "publicKey";
}, {
docs: ["The expire time of the key to add"];
name: "expireTime";
type: "i64";
}, {
docs: ["The permissions for the key"];
name: "permissions";
type: {
array: ["u8", 8];
};
}];
kind: "struct";
};
}, {
docs: ["Represents potential membership statuses for a player with a role"];
name: "MemberStatus";
type: {
kind: "enum";
variants: [{
name: "Inactive";
}, {
name: "Active";
}];
};
}, {
docs: ["A key on a profile."];
name: "ProfileKey";
type: {
fields: [{
docs: ["The key."];
name: "key";
type: "publicKey";
}, {
docs: ["The key for the permissions."];
name: "scope";
type: "publicKey";
}, {
docs: ["The expire time for this key.", "If `<0` does not expire."];
name: "expireTime";
type: "i64";
}, {
docs: ["The permissions for the key."];
name: "permissions";
type: {
array: ["u8", 8];
};
}];
kind: "struct";
};
}, {
docs: ["Represents a member's status in a role"];
name: "RoleMembership";
type: {
fields: [{
docs: ["The member or role key associated with this membership"];
name: "key";
type: "publicKey";
}, {
docs: ["The member's role status"];
name: "status";
type: "u8";
}];
kind: "struct";
};
}]
-
version: "0.7.3"