Interface MessageInterface<M>

An generic interface that represents a DWN message and convenience methods for working with it.

interface MessageInterface<M> {
    get author(): undefined | string;
    get message(): M;
    get signaturePayload(): undefined | GenericSignaturePayload;
    get signer(): undefined | string;
}

Type Parameters

Implemented by

Accessors

  • get author(): undefined | string
  • DID of the logical author of this message. NOTE: we say "logical" author because a message can be signed by a delegate of the actual author, in which case the author DID would not be the same as the signer/delegate DID, but be the DID of the grantor (grantedBy) of the delegated grant presented.

    Returns undefined | string

  • get signer(): undefined | string
  • Gets the signer of this message. This is not to be confused with the logical author of the message.

    Returns undefined | string