From 5ecaf18b5260eee3a5009790a722154471fb920b Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Sat, 12 Apr 2025 00:37:27 +0900 Subject: [PATCH 1/2] Close #146 --- proto/utxorpc/v1alpha/watch/watch.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/proto/utxorpc/v1alpha/watch/watch.proto b/proto/utxorpc/v1alpha/watch/watch.proto index b72809c..95fc5c0 100644 --- a/proto/utxorpc/v1alpha/watch/watch.proto +++ b/proto/utxorpc/v1alpha/watch/watch.proto @@ -37,6 +37,7 @@ message WatchTxRequest { message AnyChainTx { oneof chain { utxorpc.v1alpha.cardano.Tx cardano = 1; // A Cardano transaction. + BlockRef block = 2; // Block containing the transaction } } From 664d79a604ca11697db49e22b162cbdf8b617de4 Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Sun, 13 Apr 2025 07:40:19 +0900 Subject: [PATCH 2/2] PR feedback --- proto/utxorpc/v1alpha/query/query.proto | 8 ++++++++ proto/utxorpc/v1alpha/watch/watch.proto | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/proto/utxorpc/v1alpha/query/query.proto b/proto/utxorpc/v1alpha/query/query.proto index 89a9582..b9aa78b 100644 --- a/proto/utxorpc/v1alpha/query/query.proto +++ b/proto/utxorpc/v1alpha/query/query.proto @@ -13,6 +13,13 @@ message ChainPoint { bytes hash = 2; // Block hash. } +message AnyChainBlock { + bytes native_bytes = 1; // Original bytes as defined by the chain + oneof chain { + utxorpc.v1alpha.cardano.Block cardano = 2; // A parsed Cardano block. + } +} + // Represents a reference to a transaction output message TxoRef { bytes hash = 1; // Tx hash. @@ -121,6 +128,7 @@ message AnyChainTx { oneof chain { utxorpc.v1alpha.cardano.Tx cardano = 2; // A Cardano transaction. } + AnyChainBlock block = 3; // Block containing the transaction } // Response containing the transaction associated with the requested hash. diff --git a/proto/utxorpc/v1alpha/watch/watch.proto b/proto/utxorpc/v1alpha/watch/watch.proto index 95fc5c0..99c89ed 100644 --- a/proto/utxorpc/v1alpha/watch/watch.proto +++ b/proto/utxorpc/v1alpha/watch/watch.proto @@ -11,6 +11,13 @@ message BlockRef { bytes hash = 2; // Hash of the content of the block } +message AnyChainBlock { + bytes native_bytes = 1; // Original bytes as defined by the chain + oneof chain { + utxorpc.v1alpha.cardano.Block cardano = 2; // A parsed Cardano block. + } +} + // Represents a tx pattern from any supported blockchain. message AnyChainTxPattern { oneof chain { @@ -37,8 +44,8 @@ message WatchTxRequest { message AnyChainTx { oneof chain { utxorpc.v1alpha.cardano.Tx cardano = 1; // A Cardano transaction. - BlockRef block = 2; // Block containing the transaction } + AnyChainBlock block = 2; // Block containing the transaction } // Response containing the matching chain transactions.