Skip to content

Commit a345801

Browse files
committed
cardano-rpc | Move AddressArray proto definition to cardano.proto
1 parent 891e808 commit a345801

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

cardano-rpc/proto/utxorpc/v1alpha/cardano/cardano.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ message TxOutput {
1111
Script script = 5; // Script associated with the output.
1212
}
1313

14+
// TODO u5c: new type - https://github.com/utxorpc/spec/pull/167
15+
message AddressArray {
16+
repeated bytes items = 1;
17+
}
18+
1419
// TODO u5c: replaced plutus_data with just bytes
1520
message Datum {
1621
bytes hash = 1; // Hash of this datum as seen on-chain

cardano-rpc/proto/utxorpc/v1alpha/query/query.proto

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ message TxoRef {
2222
}
2323

2424
message TxoRefArray {
25-
// TODO u5c: changed to repeated
25+
// TODO u5c: changed to repeated - https://github.com/utxorpc/spec/pull/167
2626
repeated TxoRef items = 1;
2727
}
2828

@@ -44,11 +44,6 @@ message ReadParamsResponse {
4444
ChainPoint ledger_tip = 2; // The chain point that represent the ledger current position.
4545
}
4646

47-
// TODO u5c: new type
48-
message AddressArray {
49-
repeated bytes items = 1;
50-
}
51-
5247
// An evenlope that holds an UTxO from any of compatible chains
5348
message AnyUtxoData {
5449
bytes native_bytes = 1; // Original bytes as defined by the chain
@@ -60,10 +55,10 @@ message AnyUtxoData {
6055

6156
// Request to get specific UTxOs
6257
message ReadUtxosRequest {
63-
// TODO u5c: new oneof
58+
// TODO u5c: new oneof - https://github.com/utxorpc/spec/pull/167
6459
oneof query_args {
6560
TxoRefArray txoRefs = 1; // Array of Tx Output references
66-
AddressArray addresses = 2; // Array of addresses
61+
utxorpc.v1alpha.cardano.AddressArray cardano_addresses = 2; // Array of addresses
6762
}
6863
google.protobuf.FieldMask field_mask = 3; // Field mask to selectively return fields.
6964
}

cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ message SubmitTxRequest {
1414
repeated AnyChainTx tx = 1; // List of transactions to submit.
1515
}
1616

17-
// TODO u5c: new type
17+
// TODO u5c: new type - https://github.com/utxorpc/spec/pull/163
1818
message TxSubmitResult {
1919
oneof result {
2020
bytes ref = 1; // Transaction references.
@@ -23,7 +23,7 @@ message TxSubmitResult {
2323
}
2424

2525
// Response containing references to the submitted transactions.
26-
// TODO u5c: changed type
26+
// TODO u5c: changed type - https://github.com/utxorpc/spec/pull/163
2727
message SubmitTxResponse {
2828
repeated TxSubmitResult results = 1; // List of either transaction references or error messages.
2929
}

cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Query.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import Network.GRPC.Common.Protobuf
1515
import Proto.Utxorpc.V1alpha.Cardano.Cardano
1616
import Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields hiding
1717
( hash
18+
, items
1819
, values
20+
, vec'items
1921
, vec'values
2022
)
2123
import Proto.Utxorpc.V1alpha.Query.Query

cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ readUtxosMethod req = do
6565
if
6666
| Just txoRefs <- req ^. #maybe'txoRefs ->
6767
QueryUTxOByTxIn . fromList <$> mapM txoRefToTxIn (txoRefs ^. #items)
68-
| Just addressesProto <- req ^. #maybe'addresses ->
68+
| Just addressesProto <- req ^. #maybe'cardanoAddresses ->
6969
QueryUTxOByAddress . fromList <$> mapM readAddress (addressesProto ^. #items)
7070
| otherwise -> pure QueryUTxOWhole
7171

0 commit comments

Comments
 (0)