Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions cardano-rpc/proto/utxorpc/v1alpha/submit/submit.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";

package utxorpc.v1alpha.submit;

// Represents a transaction from any supported blockchain.
message AnyChainTx {
oneof type {
bytes raw = 1; // Raw transaction data.
}
}

// Request to submit transactions to the blockchain.
message SubmitTxRequest {
repeated AnyChainTx tx = 1; // List of transactions to submit.
}

// TODO u5c: new type
Copy link
Contributor

@Jimbo4350 Jimbo4350 Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you implemented something that deviates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a new "sum type" isomorphic to Either. Original proto file had just successful txIds without errors. https://github.com/utxorpc/spec/blob/main/proto/utxorpc/v1alpha/submit/submit.proto#L38

message TxSubmitResult {
oneof result {
bytes ref = 1; // Transaction references.
string error_message = 2; // The error message
}
}

// Response containing references to the submitted transactions.
// TODO u5c: changed type
message SubmitTxResponse {
repeated TxSubmitResult results = 1; // List of either transaction references or error messages.
}

// Service definition for submitting transactions and checking their status.
service SubmitService {
rpc SubmitTx(SubmitTxRequest) returns (SubmitTxResponse); // Submit transactions to the blockchain.
}