|
1 | 1 | # Schema Documentation for cardano-db-sync
|
2 | 2 |
|
| 3 | +Schema version: 13.5.0.2 (from branch **1333-new-AddressDetail-table** which may not accurately reflect the version number) |
| 4 | +**Note:** This file is auto-generated from the documentation in cardano-db/src/Cardano/Db/Schema/BaseSchema.hs by the command `cabal run -- gen-schema-docs doc/schema.md`. This document should only be updated during the release process and updated on the release branch. |
| 5 | + |
3 | 6 | ### `schema_version`
|
4 | 7 |
|
5 | 8 | The version of the database schema. Schema versioning is split into three stages as detailed below. This table should only ever have a single row.
|
@@ -122,26 +125,6 @@ A table of unique stake addresses. Can be an actual address or a script hash. T
|
122 | 125 | | `view` | string | The Bech32 encoded version of the stake address. |
|
123 | 126 | | `script_hash` | hash28type | The script hash, in case this address is locked by a script. |
|
124 | 127 |
|
125 |
| -### `tx_out` |
126 |
| - |
127 |
| -A table for transaction outputs. |
128 |
| - |
129 |
| -* Primary Id: `id` |
130 |
| - |
131 |
| -| Column name | Type | Description | |
132 |
| -|-|-|-| |
133 |
| -| `id` | integer (64) | | |
134 |
| -| `tx_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. | |
135 |
| -| `index` | txindex | The index of this transaction output with the transaction. | |
136 |
| -| `address` | string | The human readable encoding of the output address. Will be Base58 for Byron era addresses and Bech32 for Shelley era. | |
137 |
| -| `address_has_script` | boolean | Flag which shows if this address is locked by a script. | |
138 |
| -| `payment_cred` | hash28type | The payment credential part of the Shelley address. (NULL for Byron addresses). For a script-locked address, this is the script hash. | |
139 |
| -| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). | |
140 |
| -| `value` | lovelace | The output value (in Lovelace) of the transaction output. | |
141 |
| -| `data_hash` | hash32type | The hash of the transaction output datum. (NULL for Txs without scripts). | |
142 |
| -| `inline_datum_id` | integer (64) | The inline datum of the output, if it has one. New in v13. | |
143 |
| -| `reference_script_id` | integer (64) | The reference script of the output, if it has one. New in v13. | |
144 |
| - |
145 | 128 | ### `collateral_tx_out`
|
146 | 129 |
|
147 | 130 | A table for transaction collateral outputs. New in v13.
|
@@ -545,19 +528,6 @@ A table containing Multi-Asset mint events.
|
545 | 528 | | `quantity` | int65type | The amount of the Multi Asset to mint (can be negative to "burn" assets). |
|
546 | 529 | | `tx_id` | integer (64) | The Tx table index for the transaction that contains this minting event. |
|
547 | 530 |
|
548 |
| -### `ma_tx_out` |
549 |
| - |
550 |
| -A table containing Multi-Asset transaction outputs. |
551 |
| - |
552 |
| -* Primary Id: `id` |
553 |
| - |
554 |
| -| Column name | Type | Description | |
555 |
| -|-|-|-| |
556 |
| -| `id` | integer (64) | | |
557 |
| -| `ident` | integer (64) | The MultiAsset table index specifying the asset. | |
558 |
| -| `quantity` | word64type | The Multi Asset transaction output amount (denominated in the Multi Asset). | |
559 |
| -| `tx_out_id` | integer (64) | The TxOut table index for the transaction that this Multi Asset transaction output. | |
560 |
| - |
561 | 531 | ### `redeemer`
|
562 | 532 |
|
563 | 533 | A table containing redeemers. A redeemer is provided for all items that are validated by a script.
|
@@ -1196,4 +1166,89 @@ A table containing pools that have been delisted.
|
1196 | 1166 | | `id` | integer (64) | |
|
1197 | 1167 | | `hash_raw` | hash28type | The pool hash |
|
1198 | 1168 |
|
| 1169 | +### `tx_out` |
| 1170 | + |
| 1171 | +A table for transaction outputs. |
| 1172 | + |
| 1173 | +* Primary Id: `id` |
| 1174 | + |
| 1175 | +| Column name | Type | Description | |
| 1176 | +|-|-|-| |
| 1177 | +| `id` | integer (64) | | |
| 1178 | +| `address` | string | The human readable encoding of the output address. Will be Base58 for Byron era addresses and Bech32 for Shelley era. | |
| 1179 | +| `address_has_script` | boolean | Flag which shows if this address is locked by a script. | |
| 1180 | +| `data_hash` | hash32type | The hash of the transaction output datum. (NULL for Txs without scripts). | |
| 1181 | +| `consumed_by_tx_id` | integer (64) | The Tx table index of the transaction that consumes this transaction output. Not populated by default, can be activated via tx-out configs. | |
| 1182 | +| `index` | txindex | The index of this transaction output with the transaction. | |
| 1183 | +| `inline_datum_id` | integer (64) | The inline datum of the output, if it has one. New in v13. | |
| 1184 | +| `payment_cred` | hash28type | The payment credential part of the Shelley address. (NULL for Byron addresses). For a script-locked address, this is the script hash. | |
| 1185 | +| `reference_script_id` | integer (64) | The reference script of the output, if it has one. New in v13. | |
| 1186 | +| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). | |
| 1187 | +| `tx_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. | |
| 1188 | +| `value` | lovelace | The output value (in Lovelace) of the transaction output. | |
| 1189 | + |
| 1190 | +### `ma_tx_out` |
| 1191 | + |
| 1192 | +A table containing Multi-Asset transaction outputs. |
| 1193 | + |
| 1194 | +* Primary Id: `id` |
| 1195 | + |
| 1196 | +| Column name | Type | Description | |
| 1197 | +|-|-|-| |
| 1198 | +| `id` | integer (64) | | |
| 1199 | +| `ident` | integer (64) | The MultiAsset table index specifying the asset. | |
| 1200 | +| `quantity` | word64type | The Multi Asset transaction output amount (denominated in the Multi Asset). | |
| 1201 | +| `tx_out_id` | integer (64) | The TxOut table index for the transaction that this Multi Asset transaction output. | |
| 1202 | + |
| 1203 | +# Variant Schema |
| 1204 | + |
| 1205 | +When using the `use_address_table` [configuration](https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/configuration.md#tx-out), the `tx_out` table is split into two tables: `tx_out` and `address`. |
| 1206 | +Bellow are the table documentation for this variaton. |
| 1207 | + |
| 1208 | +### `tx_out` |
| 1209 | + |
| 1210 | +A table for transaction outputs. |
| 1211 | + |
| 1212 | +* Primary Id: `id` |
| 1213 | + |
| 1214 | +| Column name | Type | Description | |
| 1215 | +|-|-|-| |
| 1216 | +| `id` | integer (64) | | |
| 1217 | +| `address_id` | integer (64) | The human readable encoding of the output address. It is Base58 for Byron era addresses and Bech32 for Shelley era. | |
| 1218 | +| `consumed_by_tx_id` | integer (64) | The Tx table index of the transaction that consumes this transaction output. Not populated by default, can be activated via tx-out configs. | |
| 1219 | +| `data_hash` | hash32type | The hash of the transaction output datum. (NULL for Txs without scripts). | |
| 1220 | +| `index` | txindex | The index of this transaction output with the transaction. | |
| 1221 | +| `inline_datum_id` | integer (64) | The inline datum of the output, if it has one. New in v13. | |
| 1222 | +| `reference_script_id` | integer (64) | The reference script of the output, if it has one. New in v13. | |
| 1223 | +| `tx_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. | |
| 1224 | +| `value` | lovelace | The output value (in Lovelace) of the transaction output. | |
| 1225 | + |
| 1226 | +### `address` |
| 1227 | + |
| 1228 | +A table for addresses that appear in outputs. |
| 1229 | + |
| 1230 | +* Primary Id: `id` |
| 1231 | + |
| 1232 | +| Column name | Type | Description | |
| 1233 | +|-|-|-| |
| 1234 | +| `id` | integer (64) | | |
| 1235 | +| `address` | string | The human readable encoding of the output address. Will be Base58 for Byron era addresses and Bech32 for Shelley era. | |
| 1236 | +| `raw` | blob | The raw binary address. | |
| 1237 | +| `has_script` | boolean | Flag which shows if this address is locked by a script. | |
| 1238 | +| `payment_cred` | hash28type | The payment credential part of the Shelley address. (NULL for Byron addresses). For a script-locked address, this is the script hash. | |
| 1239 | +| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). | |
| 1240 | + |
| 1241 | +### `ma_tx_out` |
| 1242 | + |
| 1243 | +A table containing Multi-Asset transaction outputs. |
| 1244 | + |
| 1245 | +* Primary Id: `id` |
| 1246 | + |
| 1247 | +| Column name | Type | Description | |
| 1248 | +|-|-|-| |
| 1249 | +| `id` | integer (64) | | |
| 1250 | +| `ident` | integer (64) | The MultiAsset table index specifying the asset. | |
| 1251 | +| `quantity` | word64type | The Multi Asset transaction output amount (denominated in the Multi Asset). | |
| 1252 | +| `tx_out_id` | integer (64) | The TxOut table index for the transaction that this Multi Asset transaction output. | |
| 1253 | + |
1199 | 1254 |
|
0 commit comments