Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Commit

Represents a new (i.e pending, unsigned) commit which will create, update, or delete an object in a user's Identity Hub.

Hierarchy

  • Commit

Index

Constructors

constructor

Properties

Private fields

Methods

getPayload

  • getPayload(): any
  • Returns the application-specific payload for this commit.

    Returns any

getProtectedHeaders

  • getProtectedHeaders(): Partial<ICommitProtectedHeaders>
  • Returns the headers which will be signed/encrypted.

    Returns Partial<ICommitProtectedHeaders>

getUnprotectedHeaders

  • getUnprotectedHeaders(): object
  • Returns the (optional) headers which will not be signed/encrypted.

    Returns object

    • [key: string]: any

isValid

  • isValid(): boolean
  • Returns true if the validate() method would pass without error.

    Returns boolean

sign

validate

  • validate(): void
  • Verifies whether the currently set fields constitute a valid commit which can be signed/encrypted and stored in an Identity Hub.

    Throws an error if the commit is not valid.

    TODO: Move validation logic to hub-common-js repository to be shared with hub-node-core.

    Returns void

Generated using TypeDoc