This is a first-class DWN protocol for managing permission grants of a given DWN.

Constructors

Properties

definition: ProtocolDefinition = ...

The definition of the Permissions protocol.

grantPath: "grant" = 'grant'

The protocol path of the grant record.

requestPath: "request" = 'request'

The protocol path of the request record.

revocationPath: "grant/revocation" = 'grant/revocation'

The protocol path of the revocation record.

uri: "https://tbd.website/dwn/permissions" = 'https://tbd.website/dwn/permissions'

The URI of the DWN Permissions protocol.

Methods

  • Fetches PermissionGrant with the specified recordID.

    Parameters

    • tenant: string
    • messageStore: MessageStore
    • permissionGrantId: string

    Returns Promise<PermissionGrant>

    the PermissionGrant matching the recordId specified.

    if PermissionGrant does not exist

  • Validates the given Permissions protocol RecordsWrite. It can be a request, grant, or revocation.

    Parameters

    Returns void