Transaction Schema¶
Transaction¶
A transaction represents the creation or transfer of assets in BigchainDB.
Transaction.id¶
type: string
A sha3 digest of the transaction. The ID is calculated by removing all derived hashes and signatures from the transaction, serializing it to JSON with keys in sorted order and then hashing the resulting string with sha3.
Transaction.operation¶
type: string
Type of the transaction:
A CREATE
transaction creates an asset in BigchainDB. This
transaction has outputs but no inputs, so a dummy input is created.
A TRANSFER
transaction transfers ownership of an asset, by providing
an input that meets the conditions of an earlier transaction’s outputs.
A GENESIS
transaction is a special case transaction used as the
sole member of the first block in a BigchainDB ledger.
Transaction.outputs¶
type: array (object)
Array of outputs provided by this transaction.
See: Output.
Input¶
An input spends a previous output, by providing one or more fulfillments that fulfill the conditions of the previous output.
Input.owners_before¶
type: array (string) or null
List of public keys of the previous owners of the asset.
Input.fulfillment¶
type: object or string
Fulfillment of an Output.condition, or, put a different way, a payload that satisfies the condition of a previous output to prove that the creator(s) of this transaction have control over the listed asset.
Output¶
A transaction output. Describes the quantity of an asset and the requirements that must be met to spend the output.
See also: Input.
Output.condition¶
type: object
Describes the condition that needs to be met to spend the output. Has the properties:
- details: Details of the condition.
- uri: Condition encoded as an ASCII string.
Output.public_keys¶
type: array (string) or null
List of public keys associated with the conditions on an output.
Asset¶
Description of the asset being transacted. In the case of a TRANSFER
transaction, this field contains only the ID of asset. In the case
of a CREATE
transaction, this field contains only the user-defined
payload.
Asset.data¶
type: object or null
User provided metadata associated with the asset. May also be null
.
Metadata¶
User provided transaction metadata. This field may be null
or may
contain an non empty object with freeform metadata.