From 0a33e2acc7df904a46a7560eb3a39ce4da8ba50f Mon Sep 17 00:00:00 2001 From: Hermi Date: Wed, 3 Sep 2025 01:39:03 +0800 Subject: [PATCH] fix: add missing Cardano types and resolve broken cross-references --- pages/cardano.mdx | 206 ++++++++++++++++++++++++++++++++++++++++++ pages/query/spec.mdx | 16 ++-- pages/submit/spec.mdx | 8 +- pages/sync/spec.mdx | 8 +- pages/watch/spec.mdx | 6 +- 5 files changed, 225 insertions(+), 19 deletions(-) diff --git a/pages/cardano.mdx b/pages/cardano.mdx index 2f1e7b3..f82f61e 100644 --- a/pages/cardano.mdx +++ b/pages/cardano.mdx @@ -1,5 +1,205 @@ # Cardano Module + + +## TxEval + +Represents a transaction evaluation report in the Cardano blockchain. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| fee | [uint64](#uint64) | | Transaction fee in ADA. | +| ex_units | [ExUnits](#utxorpc-v1alpha-cardano-ExUnits) | | Execution units (steps and memory) consumed. | +| errors | [EvalError](#utxorpc-v1alpha-cardano-EvalError) | repeated | List of evaluation errors. | +| traces | [EvalTrace](#utxorpc-v1alpha-cardano-EvalTrace) | repeated | List of evaluation traces. | +| redeemers | [Redeemer](#utxorpc-cardano-v1-Redeemer) | repeated | List of redeemers used in evaluation. | + + + +## ExUnits + +Represents execution units for Plutus script evaluation. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| steps | [uint64](#uint64) | | Number of execution steps. | +| memory | [uint64](#uint64) | | Amount of memory used. | + + + +## EvalError + +Represents an evaluation error during transaction evaluation. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| msg | [string](#string) | | Error message. | + + + +## EvalTrace + +Represents an evaluation trace during transaction evaluation. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| msg | [string](#string) | | Trace message. | + + + +## TxPattern + +Represents a transaction pattern for matching in the Cardano blockchain. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| consumes | [TxOutputPattern](#utxorpc-v1alpha-cardano-TxOutputPattern) | | Pattern for outputs consumed by the transaction. | +| produces | [TxOutputPattern](#utxorpc-v1alpha-cardano-TxOutputPattern) | | Pattern for outputs produced by the transaction. | +| has_address | [AddressPattern](#utxorpc-v1alpha-cardano-AddressPattern) | | Pattern for addresses involved in the transaction. | +| moves_asset | [AssetPattern](#utxorpc-v1alpha-cardano-AssetPattern) | | Pattern for assets moved by the transaction. | +| mints_asset | [AssetPattern](#utxorpc-v1alpha-cardano-AssetPattern) | | Pattern for assets minted by the transaction. | + + + +## TxOutputPattern + +Represents a pattern for matching transaction outputs. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [AddressPattern](#utxorpc-v1alpha-cardano-AddressPattern) | | Match any address in the output that exhibits this pattern. | +| asset | [AssetPattern](#utxorpc-v1alpha-cardano-AssetPattern) | | Match any asset in the output that exhibits this pattern. | + + + +## AddressPattern + +Represents a pattern for matching addresses. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| exact_address | [bytes](#bytes) | | The address should match this exact address value. | +| payment_part | [bytes](#bytes) | | The payment part of the address should match this value. | +| delegation_part | [bytes](#bytes) | | The delegation part of the address should match this value. | + + + +## AssetPattern + +Represents a pattern for matching assets. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| policy_id | [bytes](#bytes) | | The asset should belong to this policy id. | +| asset_name | [bytes](#bytes) | | The asset should present this name. | + + + +## Block + +Represents a block in the Cardano blockchain. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| header | [BlockHeader](#utxorpc-v1alpha-cardano-BlockHeader) | | Block header information. | +| body | [BlockBody](#utxorpc-v1alpha-cardano-BlockBody) | | Block body containing transactions. | +| timestamp | [uint64](#uint64) | | Block timestamp. | + + + +## BlockHeader + +Represents a block header in the Cardano blockchain. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| slot | [uint64](#uint64) | | Slot number. | +| hash | [bytes](#bytes) | | Block hash. | +| height | [uint64](#uint64) | | Block height. | + + + +## BlockBody + +Represents a block body containing transactions. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tx | [Tx](#utxorpc-cardano-v1-Tx) | repeated | List of transactions. | + + + +## PParams + +Represents protocol parameters in the Cardano blockchain. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| coins_per_utxo_byte | [uint64](#uint64) | | Cost per UTxO byte in ADA. | +| max_tx_size | [uint64](#uint64) | | Maximum transaction size in bytes. | +| min_fee_coefficient | [uint64](#uint64) | | Minimum fee coefficient. | +| min_fee_constant | [uint64](#uint64) | | Minimum fee constant. | +| max_block_body_size | [uint64](#uint64) | | Maximum block body size. | +| max_block_header_size | [uint64](#uint64) | | Maximum block header size. | +| stake_key_deposit | [uint64](#uint64) | | Stake key deposit amount. | +| pool_deposit | [uint64](#uint64) | | Pool registration deposit. | +| pool_retirement_epoch_bound | [uint64](#uint64) | | Pool retirement epoch bound. | +| desired_number_of_pools | [uint64](#uint64) | | Desired number of stake pools. | +| pool_influence | [RationalNumber](#utxorpc-v1alpha-cardano-RationalNumber) | | Pool influence parameter. | +| monetary_expansion | [RationalNumber](#utxorpc-v1alpha-cardano-RationalNumber) | | Monetary expansion rate. | +| treasury_expansion | [RationalNumber](#utxorpc-v1alpha-cardano-RationalNumber) | | Treasury expansion rate. | +| min_pool_cost | [uint64](#uint64) | | Minimum pool cost. | +| protocol_version | [ProtocolVersion](#utxorpc-v1alpha-cardano-ProtocolVersion) | | Protocol version. | +| max_value_size | [uint64](#uint64) | | Maximum value size. | +| collateral_percentage | [uint64](#uint64) | | Collateral percentage. | +| max_collateral_inputs | [uint64](#uint64) | | Maximum collateral inputs. | +| cost_models | [CostModels](#utxorpc-v1alpha-cardano-CostModels) | | Plutus cost models. | +| prices | [ExPrices](#utxorpc-v1alpha-cardano-ExPrices) | | Execution unit prices. | + + + +## RationalNumber + +Represents a rational number (fraction). + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| numerator | [int32](#int32) | | Numerator of the fraction. | +| denominator | [uint32](#uint32) | | Denominator of the fraction. | + + + +## ProtocolVersion + +Represents a protocol version. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| major | [uint32](#uint32) | | Major version number. | +| minor | [uint32](#uint32) | | Minor version number. | + + + +## CostModels + +Represents Plutus cost models for script execution. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| plutus_v1 | [bytes](#bytes) | | Cost model for Plutus V1 scripts. | +| plutus_v2 | [bytes](#bytes) | | Cost model for Plutus V2 scripts. | + + + +## ExPrices + +Represents execution unit prices. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| steps | [RationalNumber](#utxorpc-v1alpha-cardano-RationalNumber) | | Price per execution step. | +| memory | [RationalNumber](#utxorpc-v1alpha-cardano-RationalNumber) | | Price per memory unit. | + ## Asset @@ -176,6 +376,8 @@ Represents a list of native scripts. | ----- | ------------------------------------------------ | -------- | ----------------------- | | items | [NativeScript](#utxorpc-cardano-v1-NativeScript) | repeated | List of native scripts. | + + ## PlutusData @@ -322,6 +524,8 @@ Represents a stake delegation certificate in Cardano. | stake_credential | [StakeCredential](#utxorpc-cardano-v1-StakeCredential) | | Stake credential. | | pool_keyhash | [bytes](#bytes) | | Pool key hash. | + + ## Tx @@ -355,6 +559,8 @@ Represents a transaction input in the Cardano blockchain. | output_index | [uint32](#uint32) | | Index of the output in the previous transaction. | | as_output | [TxOutput](#utxorpc-cardano-v1-TxOutput) | | Content of the input represented as output of the related transaction | + + ## TxOutput diff --git a/pages/query/spec.mdx b/pages/query/spec.mdx index eecdba3..aa61388 100644 --- a/pages/query/spec.mdx +++ b/pages/query/spec.mdx @@ -10,7 +10,7 @@ An evenlope that holds a datum for any of the compatible chains | ----- | ---- | ----- | ----------- | | native_bytes | [bytes](#bytes) | | Original bytes as defined by the chain | | key | [bytes](#bytes) | | | -| cardano | [utxorpc.v1alpha.cardano.PlutusData](#utxorpc-v1alpha-cardano-PlutusData) | | A cardano UTxO | +| cardano | [utxorpc.v1alpha.cardano.PlutusData](/cardano#utxorpc-v1alpha-cardano-PlutusData) | | A cardano UTxO | @@ -25,7 +25,7 @@ An evenlope that holds parameter data from any of the compatible chains | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.PParams](#utxorpc-v1alpha-cardano-PParams) | | Cardano parameters | +| cardano | [utxorpc.v1alpha.cardano.PParams](/cardano#utxorpc-v1alpha-cardano-PParams) | | Cardano parameters | @@ -42,7 +42,7 @@ An evenlope that holds an UTxO from any of compatible chains | ----- | ---- | ----- | ----------- | | native_bytes | [bytes](#bytes) | | Original bytes as defined by the chain | | txo_ref | [TxoRef](#utxorpc-v1alpha-query-TxoRef) | | Hash of the previous transaction. | -| cardano | [utxorpc.v1alpha.cardano.TxOutput](#utxorpc-v1alpha-cardano-TxOutput) | | A cardano UTxO | +| cardano | [utxorpc.v1alpha.cardano.TxOutput](/cardano#utxorpc-v1alpha-cardano-TxOutput) | | A cardano UTxO | @@ -57,7 +57,7 @@ An evenlope that holds an UTxO patterns from any of compatible chains | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.TxOutputPattern](#utxorpc-v1alpha-cardano-TxOutputPattern) | | | +| cardano | [utxorpc.v1alpha.cardano.TxOutputPattern](/cardano#utxorpc-v1alpha-cardano-TxOutputPattern) | | | @@ -89,7 +89,7 @@ Request to get data (as in plural of datum) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | keys | [bytes](#bytes) | repeated | | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields in the response. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields in the response. | @@ -120,7 +120,7 @@ Request to get the chain parameters | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields in the parsed response. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields in the parsed response. | @@ -152,7 +152,7 @@ Request to get specific UTxOs | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | keys | [TxoRef](#utxorpc-v1alpha-query-TxoRef) | repeated | List of keys UTxOs. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | @@ -184,7 +184,7 @@ Request to search for UTxO based on a pattern. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | predicate | [UtxoPredicate](#utxorpc-v1alpha-query-UtxoPredicate) | | Pattern to match UTxOs by. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | | max_items | [int32](#int32) | | The maximum number of items to return. | | start_token | [string](#string) | | The next_page_token value returned from a previous request, if any. | diff --git a/pages/submit/spec.mdx b/pages/submit/spec.mdx index 0e1485b..bfcd38b 100644 --- a/pages/submit/spec.mdx +++ b/pages/submit/spec.mdx @@ -9,7 +9,7 @@ Report containing the result of evaluating a particular transaction | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.TxEval](#utxorpc-v1alpha-cardano-TxEval) | | A Cardano tx evaluation report. | +| cardano | [utxorpc.v1alpha.cardano.TxEval](/cardano#utxorpc-v1alpha-cardano-TxEval) | | A Cardano tx evaluation report. | @@ -39,7 +39,7 @@ Represents a tx pattern from any supported blockchain. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.TxPattern](#utxorpc-v1alpha-cardano-TxPattern) | | A Cardano tx pattern. | +| cardano | [utxorpc.v1alpha.cardano.TxPattern](/cardano#utxorpc-v1alpha-cardano-TxPattern) | | A Cardano tx pattern. | @@ -142,7 +142,7 @@ Response containing references to the submitted transactions. | ref | [bytes](#bytes) | | The transaction reference. | | native_bytes | [bytes](#bytes) | | Original bytes as defined by the chain | | stage | [Stage](#utxorpc-v1alpha-submit-Stage) | | The current stage of the tx | -| cardano | [utxorpc.v1alpha.cardano.Tx](#utxorpc-v1alpha-cardano-Tx) | | A Cardano transaction. | +| cardano | [utxorpc.v1alpha.cardano.Tx](/cardano#utxorpc-v1alpha-cardano-Tx) | | A Cardano transaction. | @@ -207,7 +207,7 @@ Request to watch changes of specific mempool txs. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | predicate | [TxPredicate](#utxorpc-v1alpha-submit-TxPredicate) | | A predicate to filter transactions by. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | diff --git a/pages/sync/spec.mdx b/pages/sync/spec.mdx index a4d4a37..a34f0fa 100644 --- a/pages/sync/spec.mdx +++ b/pages/sync/spec.mdx @@ -10,7 +10,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | native_bytes | [bytes](#bytes) | | Original bytes as defined by the chain | -| cardano | [utxorpc.v1alpha.cardano.Block](#utxorpc-v1alpha-cardano-Block) | | A parsed Cardano block. | +| cardano | [utxorpc.v1alpha.cardano.Block](/cardano#utxorpc-v1alpha-cardano-Block) | | A parsed Cardano block. | @@ -43,7 +43,7 @@ Request to dump the block history. | ----- | ---- | ----- | ----------- | | start_token | [BlockRef](#utxorpc-v1alpha-sync-BlockRef) | | Starting point for the block history dump. | | max_items | [uint32](#uint32) | | Maximum number of items to return. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | @@ -75,7 +75,7 @@ Request to fetch a block by its reference. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | ref | [BlockRef](#utxorpc-v1alpha-sync-BlockRef) | repeated | List of block references. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | @@ -106,7 +106,7 @@ Request to follow the tip of the blockchain. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | intersect | [BlockRef](#utxorpc-v1alpha-sync-BlockRef) | repeated | List of block references to find the intersection. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | diff --git a/pages/watch/spec.mdx b/pages/watch/spec.mdx index eca93fe..91f257d 100644 --- a/pages/watch/spec.mdx +++ b/pages/watch/spec.mdx @@ -9,7 +9,7 @@ Represents a transaction from any supported blockchain. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.Tx](#utxorpc-v1alpha-cardano-Tx) | | A Cardano transaction. | +| cardano | [utxorpc.v1alpha.cardano.Tx](/cardano#utxorpc-v1alpha-cardano-Tx) | | A Cardano transaction. | @@ -24,7 +24,7 @@ Represents a tx pattern from any supported blockchain. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| cardano | [utxorpc.v1alpha.cardano.TxPattern](#utxorpc-v1alpha-cardano-TxPattern) | | A Cardano tx pattern. | +| cardano | [utxorpc.v1alpha.cardano.TxPattern](/cardano#utxorpc-v1alpha-cardano-TxPattern) | | A Cardano tx pattern. | @@ -74,7 +74,7 @@ Request to watch transactions from the chain based on a set of predicates. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | predicate | [TxPredicate](#utxorpc-v1alpha-watch-TxPredicate) | | Predicate to filter transactions by. | -| field_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | Field mask to selectively return fields. | +| field_mask | [google.protobuf.FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#fieldmask) | | Field mask to selectively return fields. | | intersect | [BlockRef](#utxorpc-v1alpha-watch-BlockRef) | repeated | List of block references to find the intersection. |