Abstract
Beta
Protected
constructorConstructor is primarily for intended for internal use. For a better developer experience, consumers should use concrete classes to programmatically create and parse resources, e.g. Offering.parse and Offering.create
Optional
signature: stringPrivate
_signaturesignature that verifies that authenticity and integrity of a message
Protected
dataResource kind-specific data
Abstract
kindThe resource kind (e.g. offering)
Protected
metadataMetadata such as creator, date created, date updated, and ID
Resource creation time. Expressed as ISO8601
The sender's DID
the resource's id
the protocol version
the resource's cryptographic signature
Resource last updated time. Expressed as ISO8601
Computes a digest of the payload by:
The SHA-256 hash of the canonicalized payload, represented as a byte array.
returns the resource as a json object. Automatically used by JSON.stringify
method.
Validates the resource structure and verifies the cryptographic signature
Resource signer's DID
if the resource signature is invalid
if the signer's DID does not match Resource.metadata.from
if the resource structure is invalid
see Crypto.verify
Static
generateGenerates a unique id with the resource kind's prefix
tbDEX Resources are published by PFIs for anyone to consume and generally used as a part of the discovery process. They are not part of the message exchange, i.e Alice cannot reply to a Resource.