Transaction Schema¶
Transaction¶
This is the outer transaction wrapper. It contains the ID, version and the body of the transaction, which is also called transaction
.
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 Body¶
See: Transaction Body.
Transaction.operation¶
type: string
Type of the transaction:
A CREATE
transaction creates an asset in BigchainDB. This
transaction has outputs (conditions) but no inputs (fulfillments),
so a dummy fulfillment is used.
A TRANSFER
transaction transfers ownership of an asset, by providing
fulfillments to conditions of earlier transactions.
A GENESIS
transaction is a special case transaction used as the
sole member of the first block in a BigchainDB ledger.
Transaction.fulfillments¶
type: array (object)
Array of the fulfillments (inputs) of a transaction.
See: Fulfillment.
Condition¶
An output of a transaction. A condition describes a quantity of an asset and what conditions must be met in order for it to be fulfilled. See also: fulfillment.
Condition.cid¶
type: integer
Index of this condition’s appearance in the Transaction.conditions array. In a transaction with 2 conditions, the ``cid``s will be 0 and 1.
Condition.condition¶
type: object
Body of the condition. Has the properties:
- details: Details of the condition.
- uri: Condition encoded as an ASCII string.
Condition.owners_after¶
type: array (string) or null
List of public keys associated with asset ownership at the time of the transaction.
Condition.amount¶
type: integer
Integral amount of the asset represented by this condition. In the case of a non divisible asset, this will always be 1.
Fulfillment¶
A fulfillment is an input to a transaction, named as such because it fulfills a condition of a previous transaction. In the case of a CREATE
transaction, a fulfillment may provide no input
.
Fulfillment.owners_before¶
type: array (string) or null
List of public keys of the previous owners of the asset.
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 may contain properties:
Asset.updatable¶
type: boolean
Whether or not the description of the asset may be updated. Defaults to false.
Asset.refillable¶
type: boolean
Whether the amount of the asset can change after its creation. Defaults to false.
Asset.data¶
type: object or null
User provided metadata associated with the asset. May also be null
.