Represents the IdentityProfileEntity class providing methods to interact with profile entity data.

Type Parameters

Hierarchy

  • IdentityProfileEntity

Constructors

  • Constructs a new instance of the IdentityProfileEntity class.

    Type Parameters

    Parameters

    • _profile: IdentityProfile

      The parent IdentityProfile instance.

    • _label: string

      The label associated with the entity data.

    • _merkleTreeAddress: PublicKey

      The account address of the Merkle tree for entity data.

    Returns IdentityProfileEntity<E>

Accessors

  • get address(): PublicKey
  • Gets the account address of the Merkle tree for entity data.

    Returns PublicKey

    The account address of the Merkle tree.

  • get label(): string
  • Gets the label associated with the entity data.

    Returns string

    The label associated with the entity data.

  • get leaves(): {
        [key: string]: E;
    }
  • Gets the leaves (entity data nodes) of the Merkle tree.

    Returns {
        [key: string]: E;
    }

    The leaves of the Merkle tree.

    • [key: string]: E
  • get tree(): MerkleTree
  • Gets the Merkle tree instance associated with the entity data.

    Returns MerkleTree

    The Merkle tree instance.

  • get values(): E[]
  • Gets the values of the entity data.

    Returns E[]

    The values of the entity data.

Methods

  • Adds new entity data to the Merkle tree.

    Parameters

    • data: E

      The entity data to be added.

    • Optional confirmOptions: ConfirmOptions

      The confirmation options for the transaction.

    Returns Promise<ConfirmedContext>

    A promise that resolves with the transaction context.

  • Gets the on-chain Merkle tree instance associated with the entity data.

    Returns Promise<ConcurrentMerkleTreeAccount>

    The on-chain Merkle tree instance.

  • Gets a pretty representation of the entity data.

    Returns {
        _id: string;
        label: string;
        nodes: E[];
        profile: PublicKey;
    }

    A pretty representation of the entity data.

    • _id: string
    • label: string
    • nodes: E[]
    • profile: PublicKey
  • Removes entity data from the Merkle tree.

    Parameters

    • index: number

      The index of the entity data to be removed.

    • Optional confirmOptions: ConfirmOptions

      The confirmation options for the transaction.

    Returns Promise<ConfirmedContext>

    A promise that resolves with the transaction context.

  • Updates entity data in the Merkle tree.

    Parameters

    • index: number

      The index of the entity data to be updated.

    • data: E

      The updated entity data.

    • Optional confirmOptions: ConfirmOptions

      The confirmation options for the transaction.

    Returns Promise<ConfirmedContext>

    A promise that resolves with the transaction context.

  • Sets the leaves (entity data nodes) of the Merkle tree.

    Parameters

    • data: E[]

      The array of entity data to set as leaves.

    Returns void

  • Verifies entity data in the Merkle tree.

    Parameters

    • index: number

      The index of the entity data to be verified.

    • Optional confirmOptions: ConfirmOptions

      The confirmation options for the transaction.

    Returns Promise<ConfirmedContext>

    A promise that resolves with the transaction context.

Generated using TypeDoc