diff --git a/proofs.proto b/proofs.proto index 272ee8f..c748d23 100644 --- a/proofs.proto +++ b/proofs.proto @@ -2,10 +2,26 @@ syntax = "proto3"; package cashu.v1; option go_package = "gen/go/cashurpc"; +/* +A proof can be in one of the following states + +A proof is UNSPENT if it has not been spent yet +A proof is PENDING if it is being processed in a transaction (in an ongoing payment). A PENDING proof cannot be used in another transaction until it is live again. +A proof is SPENT if it has been redeemed and its secret is in the list of spent secrets of the mint. + + */ + +enum ProofState { + unspecified = 0; + UNSPENT = 1; + PENDING = 2; + SPENT = 3; +} message Proof { uint64 amount = 1; string id = 2; string secret = 3; string C = 4; + ProofState state = 5; }