This field contains the mongo collection name for entries
that are stored using TransactionDocument or the model
TransactionModel.
Note that this field is not part of document properties
and used only internally to perform queries that refer to
an individual collection name, e.g. $unionWith
.
The document's creation timestamp. This field does not reflect the
date of update of a transaction but rather the date of creation of the
cached database entry.
This field is added for consistency with the other database schema.
This field is required and indexed.
The document's creation block number. This field does reflect the
time of creation of a transaction. You can use the dHealth Network API
to find out exact timestamp by block height.
This field is required and not indexed.
The document's discovery timestamp. This field does not reflect the
date of creation of a transaction but rather the date of creation of the
cached database entry.
This field is required and indexed.
This is the transaction body as defined by the dApps Framework. This
field contains only a subset of the binary payload that represents
this transaction.
Notably, following transaction header applies on dHealth Network:
size | r1 | sig | pub | r2 | ver | net | type
4b | 4b | 64b | 32b | 4b | 1b | 1b | 2b
This field does not contain the above transaction header as it is
always the same network-wide, depending on the transaction type. It
permits to save 112 bytes
of data, that is easily reproduced using
the other fields of this document.
This field is required and not indexed.
This is the recipient address. The recipient corresponds to the
destination of said transaction.
This field is required and indexed.
This is the transaction signature as defined by dHealth Network. It
contains an immutable sha3-512 hash created from some of the data
stored in the transaction body.
Due to the usage of sha3-512, this hash is always a 64 bytes
transaction hash (128 characters in hexadecimal notation).
This field is required and not indexed.
This is the signer's address. The signer corresponds to the
issuer of said transaction ("owner"). It is not to be confused
with the discovery source address.
This field is required and indexed.
This is the signer's public key. The signer corresponds to
the issuer of said transaction ("owner").
This field is required and indexed.
This is the discovery source's address, not to be confused
with the signer address. A discovery source is an address
owned by the dApp itself and from/to which transactions
are issued.
This field is required and indexed.
This is the transaction mosaics as defined by dHealth Network. It
contains an array of ObjectLiteral
objects that consist of both
a mosaicId and amount field.
This field is optional and not indexed.
This is the transaction hash as defined by dHealth Network. It
contains an immutable sha3-256 hash created from the transaction
body.
Due to the usage of sha3-256, this hash is always a 32 bytes
transaction hash (64 characters in hexadecimal notation).
This field is required, indexed and values are expected
to be unique.
This is the transaction message as defined by dHealth Network. It
contains a plain text or encrypted message that in turn may be
processed as an operation, or ignored.
Due to some end-users preferring to encrypt their messages,
the content of this field may be highly variable, reaching from
plain text content over to hexadecimal payloads of encrypted text.
This field is optional and not indexed.
This is the transaction mode and may contain one of the following values:
"incoming"
: This transaction is an incoming transaction
of the sourceAddress discovery source account. i.e.
this transaction was sent to the discovery source account."outgoing"
: This transaction is an outgoing transaction
of the sourceAddress discovery source account. i.e.
this transaction was sent from the discovery source account.
This is the transaction type as defined in dApps. Typically,
this field will contain "transfer"
, as for now dApps always
use transfer transactions to perform operations.
This field is required and indexed.
The document's update timestamp. This field does not reflect the
date of update of a transaction but rather the date of update of the
cached database entry.
This field is optional and not indexed.
This method implements a specialized query format to query items
individually, as documents, in the collection: transactions
.
The individual document data that is used in a query.
Converts this class' instance to a {@link SdkTransaction} instance.
The SdkTransaction
object with payload set.
This static method populates a TransactionDTO object from the values of a TransactionDocument as presented by mongoose queries.
The document as received from mongoose.
The DTO object that will be populated with values.
The dto
object with fields set.
Generated using TypeDoc
This class defines the exact fields that are stored in the corresponding MongoDB documents. It should be used whenever database documents are being handled or read for the
transactions
collection.Note that this class uses the generic Transferable trait to enable a
toDTO()
method on the model.v0.2.0