Hierarchy

  • PlayerProfile

Implements

  • Account

Constructors

Properties

ACCOUNT_NAME: "profile" | "role" | "playerName" | "profileRoleMembership" = 'profile'
MIN_DATA_SIZE: number = ...

Accessors

  • get data(): Readonly<AnchorTypeDef<Object, AnchorDefined<PlayerProfileIDL, Record<string, never>>>>
  • Returns Readonly<AnchorTypeDef<Object, AnchorDefined<PlayerProfileIDL, Record<string, never>>>>

  • get key(): Readonly<PublicKey>
  • Returns Readonly<PublicKey>

Methods

  • Add keys to a profile's permissions list

    Type Parameters

    Parameters

    • program: PlayerProfileIDLProgram

      the player profile program

    • key: AsyncSigner<unknown>

      The key to use to sign the transaction

    • profile: PlayerProfile

      the player profile

    • permissionsClass: T

      the permissions class

    • scope: PublicKey

      the permissions scope

    • keys: {
          expireTime: null | BN;
          key: PublicKey;
          permissions: U;
      }[]

      the keys to add

    • Optional optionalProfileOrRoleInput: OptionalProfileOrRoleInput[]

      optional profiles or roles

    Returns InstructionReturn

    InstructionReturn

  • Adjust authorized keys on a player profile

    Parameters

    • program: PlayerProfileIDLProgram

      the player profile program

    • keyInputs: ProfileKeyInput<ProfilePermissions, AsyncSigner<unknown>>[]

      they keys that will sign the transaction

    • addKeys: (<R>(cont) => R)[]

      keys to be added

    • removeRange: [number, number]

      the range of keys to remove (these are indices)

    • newKeyThreshold: number

      new key threshold

    • Optional optionalProfileOrRoleInput: OptionalProfileOrRoleInput[]

      optional profiles or roles

    Returns InstructionReturn

    InstructionReturn

  • Create a new player profile

    Parameters

    • program: PlayerProfileIDLProgram

      the player profile program

    • profile: AsyncSigner<unknown>

      the player profile account address

    • keys: KeyEntry<unknown>[]

      the keys to add to the player profile

    • keyThreshold: number

      the ey thresh hold

    Returns InstructionReturn

    InstructionReturn

  • Creates a new role for the associated Profile

    Parameters

    Returns {
        instructions: InstructionReturn;
        role: [PublicKey, number];
    }

    InstructionReturn & newRoleAccount

    • instructions: InstructionReturn
    • role: [PublicKey, number]
  • Removes a set of non-auth keys to a profile.

    Parameters

    Returns InstructionReturn

    InstructionReturn

  • Removes a role from the associated Profile

    Parameters

    Returns InstructionReturn

    InstructionReturn

  • Sets the name of the profile.

    Parameters

    Returns {
        instructions: InstructionReturn;
        name: [PublicKey, number];
    }

    InstructionReturn

    • instructions: InstructionReturn
    • name: [PublicKey, number]

Generated using TypeDoc