diff --git a/cardano-rpc/proto/utxorpc/v1alpha/cardano/cardano.proto b/cardano-rpc/proto/utxorpc/v1alpha/cardano/cardano.proto index 7a7a5e1bab..d893bc72f0 100644 --- a/cardano-rpc/proto/utxorpc/v1alpha/cardano/cardano.proto +++ b/cardano-rpc/proto/utxorpc/v1alpha/cardano/cardano.proto @@ -11,6 +11,11 @@ message TxOutput { Script script = 5; // Script associated with the output. } +// TODO u5c: new type - https://github.com/utxorpc/spec/pull/167 +message AddressArray { + repeated bytes items = 1; +} + // TODO u5c: replaced plutus_data with just bytes message Datum { bytes hash = 1; // Hash of this datum as seen on-chain diff --git a/cardano-rpc/proto/utxorpc/v1alpha/query/query.proto b/cardano-rpc/proto/utxorpc/v1alpha/query/query.proto index a64c6afdbc..7ecaa10c78 100644 --- a/cardano-rpc/proto/utxorpc/v1alpha/query/query.proto +++ b/cardano-rpc/proto/utxorpc/v1alpha/query/query.proto @@ -22,7 +22,7 @@ message TxoRef { } message TxoRefArray { - // TODO u5c: changed to repeated + // TODO u5c: changed to repeated - https://github.com/utxorpc/spec/pull/167 repeated TxoRef items = 1; } @@ -44,11 +44,6 @@ message ReadParamsResponse { ChainPoint ledger_tip = 2; // The chain point that represent the ledger current position. } -// TODO u5c: new type -message AddressArray { - repeated bytes items = 1; -} - // An evenlope that holds an UTxO from any of compatible chains message AnyUtxoData { bytes native_bytes = 1; // Original bytes as defined by the chain @@ -60,10 +55,10 @@ message AnyUtxoData { // Request to get specific UTxOs message ReadUtxosRequest { - // TODO u5c: new oneof + // TODO u5c: new oneof - https://github.com/utxorpc/spec/pull/167 oneof query_args { TxoRefArray txoRefs = 1; // Array of Tx Output references - AddressArray addresses = 2; // Array of addresses + utxorpc.v1alpha.cardano.AddressArray cardano_addresses = 2; // Array of addresses } google.protobuf.FieldMask field_mask = 3; // Field mask to selectively return fields. } diff --git a/cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto b/cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto index b9ceb10163..2730908c55 100644 --- a/cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto +++ b/cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto @@ -14,7 +14,7 @@ message SubmitTxRequest { repeated AnyChainTx tx = 1; // List of transactions to submit. } -// TODO u5c: new type +// TODO u5c: new type - https://github.com/utxorpc/spec/pull/163 message TxSubmitResult { oneof result { bytes ref = 1; // Transaction references. @@ -23,7 +23,7 @@ message TxSubmitResult { } // Response containing references to the submitted transactions. -// TODO u5c: changed type +// TODO u5c: changed type - https://github.com/utxorpc/spec/pull/163 message SubmitTxResponse { repeated TxSubmitResult results = 1; // List of either transaction references or error messages. } diff --git a/cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Query.hs b/cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Query.hs index c4c6d12779..3a53b2adb8 100644 --- a/cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Query.hs +++ b/cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Query.hs @@ -15,7 +15,9 @@ import Network.GRPC.Common.Protobuf import Proto.Utxorpc.V1alpha.Cardano.Cardano import Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields hiding ( hash + , items , values + , vec'items , vec'values ) import Proto.Utxorpc.V1alpha.Query.Query diff --git a/cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Query.hs b/cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Query.hs index 646ddd999e..c046fa40ab 100644 --- a/cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Query.hs +++ b/cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Query.hs @@ -65,7 +65,7 @@ readUtxosMethod req = do if | Just txoRefs <- req ^. #maybe'txoRefs -> QueryUTxOByTxIn . fromList <$> mapM txoRefToTxIn (txoRefs ^. #items) - | Just addressesProto <- req ^. #maybe'addresses -> + | Just addressesProto <- req ^. #maybe'cardanoAddresses -> QueryUTxOByAddress . fromList <$> mapM readAddress (addressesProto ^. #items) | otherwise -> pure QueryUTxOWhole