A Commit without its signature, signer and timestamp

Hierarchy

  • CommitBuilder

Constructors

Properties

_destroy?: boolean
_previousCommit?: string
_push: Map<string, Set<JSONValue>>
_remove: Set<string>
_set: Map<string, JSONValue>
_subject: string

Accessors

  • get destroy(): undefined | boolean
  • Returns undefined | boolean

  • get previousCommit(): undefined | string
  • Returns undefined | string

  • get push(): Map<string, Set<JSONValue>>
  • Returns Map<string, Set<JSONValue>>

  • get remove(): Set<string>
  • Returns Set<string>

  • get set(): Map<string, JSONValue>
  • Returns Map<string, JSONValue>

  • get subject(): string
  • Returns string

Methods

  • Parameters

    • property: string

    Returns CommitBuilder

  • Creates a clone of the CommitBuilder. This is required, because I want to prevent any adjustments to the CommitBuilder while signing, as this could cause race conditions with wrong signatures

    Returns CommitBuilder

  • Returns true if the CommitBuilder has non-empty changes (set, remove, destroy)

    Returns boolean

  • Parameters

    • property: string

    Returns CommitBuilder

  • Set the URL of the Commit that was previously (last) applied. The value of this should probably be the lastCommit of the Resource.

    Parameters

    • prev: string

    Returns CommitBuilder

  • Signs the commit using the privateKey of the Agent, and returns a full Commit which is ready to be sent to an Atomic-Server /commit endpoint.

    Parameters

    • privateKey: string
    • agentSubject: string

    Returns Promise<Commit>

  • Creates a signature for a Commit using the private Key of some Agent.

    Parameters

    • agent: string

      Subject URL of the Agent signing the Commit

    • privateKey: string

      Base64 serialized private key matching the public key of the agent

    • createdAt: number

      Time of signing in millisecons since unix epoch

    Returns Promise<Commit>

Generated using TypeDoc