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.
If this message is signed by an author-delegate.
If this message is signed by an owner-delegate.
Valid JSON message representing this RecordsWrite.
The owner DID of the message if owner signature is present in the message; undefined
otherwise.
This is the logical owner of the message, not to be confused with the actual signer of the owner signature,
this is because the signer of the owner signature may not be the actual DWN owner, but a delegate authorized by the owner.
Decoded owner signature payload.
Gets the signer of owner signature; undefined
if owner signature is not present in the message.
This is not to be confused with the logical owner #owner of the message,
this is because the signer of the owner signature may not be the actual DWN owner, but a delegate authorized by the owner.
In the case that the owner signature is signed by the actual DWN owner, this value will be the same as #owner.
Decoded payload of the signature of this message.
Gets the signer of this message. This is not to be confused with the logical author of the message.
Authorizes the author-delegate who signed this message.
Used to check if the grant has been revoked.
Authorizes the owner-delegate who signed this message.
Used to check if the grant has been revoked.
Encrypts the symmetric encryption key using the public keys given and attach the resulting encryption
property to the RecordsWrite.
Signs the RecordsWrite, the signer is commonly the author, but can also be a delegate.
Optional
delegatedOptional
permissionOptional
protocolSigns the RecordsWrite
as the DWN owner.
This is used when the DWN owner wants to retain a copy of a message that the owner did not author.
NOTE: requires the RecordsWrite
to already have the author's signature.
Signs the RecordsWrite
as the DWN owner-delegate.
This is used when a DWN owner-delegate wants to retain a copy of a message that the owner did not author.
NOTE: requires the RecordsWrite
to already have the author's signature.
Called by JSON.stringify(...)
automatically.
Static
createCreates a RecordsWrite message.
Static
createCreates the attestation
property of a RecordsWrite message if given signature inputs; returns undefined
otherwise.
Optional
signers: Signer[]Static
createConvenience method that creates a message by:
Static
createCreates the signature
property in the authorization
of a RecordsWrite
message.
Optional
delegatedOptional
permissionOptional
protocolStatic
fetchFetches the initial RecordsWrite of a record.
The initial RecordsWrite if found; undefined
otherwise.
Static
fetchFetches the initial RecordsWrite message of a record.
The initial RecordsWriteMessage if found; undefined
otherwise.
Static
fetchStatic
getGets the DID of the attesters of the given message.
Static
getComputes the deterministic Entry ID of this message.
Static
getGets the initial write from the given list of RecordsWrite
.
Static
isChecks if the given message is the initial entry of a record.
Static
parseParses a RecordsWrite message and returns a {RecordsWrite} instance.
Static
verifyVerifies that immutable properties of the two given messages are identical.
A class representing a RecordsWrite DWN message. NOTE: Unable to extend
AbstractMessage
directly because the incompatible_message
type, which is not just a generic<M>
type.