Skip to content

Commit

Permalink
Added "Spender" message/field to TxO
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCheatham committed Feb 15, 2024
1 parent 781edf7 commit 066694a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions proto/genus/genus_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ syntax = "proto3";
import 'brambl/models/address.proto';
import 'brambl/models/transaction/io_transaction.proto';
import 'brambl/models/transaction/unspent_transaction_output.proto';
import 'brambl/models/transaction/spent_transaction_output.proto';
import 'consensus/models/block_id.proto';
import 'consensus/models/block_header.proto';
import 'node/models/block.proto';
Expand All @@ -28,6 +29,14 @@ message Txo {
brambl.models.transaction.UnspentTransactionOutput transactionOutput = 1 [(validate.rules).message.required = true];
TxoState state = 2;
brambl.models.TransactionOutputAddress outputAddress = 3 [(validate.rules).message.required = true];
// When 'state' is "SPENT", this field points to the transaction (input) that spent it.
// Otherwise, this field is empty.
Spender spender = 4;

message Spender {
brambl.models.TransactionInputAddress inputAddress = 1 [(validate.rules).message.required = true];
brambl.models.transaction.SpentTransactionOutput input = 2 [(validate.rules).message.required = true];
}
}

// Specify the order of data for indexes.
Expand Down

0 comments on commit 066694a

Please sign in to comment.