syntax = "proto3";

package gradido;

message Key {
    oneof key {
        bytes ed25519 = 2; // ed25519 signature (libsodium default)
		bytes ed25519_ref10 = 3; // ed25519 ref10 signature
    }
}

message SignaturePair {
    bytes pubKey = 1;  // 32 Byte
    oneof signature {
        bytes ed25519 = 2; // ed25519 signature (libsodium default), 64 Byte
		bytes ed25519_ref10 = 3; // ed25519 ref10 signature
    }
}

message SignatureMap {
    repeated SignaturePair sigPair = 1; // Each signature pair corresponds to a unique Key required to sign the transaction.
}


/* An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) */
message Timestamp {
    int64 seconds = 1; // Number of complete seconds since the start of the epoch
    int32 nanos = 2; // Number of nanoseconds since the start of the last second
}

/* An exact date and time,  with a resolution of one second (no nanoseconds). */
message TimestampSeconds {
    int64 seconds = 1; // Number of complete seconds since the start of the epoch
}

message SenderAmount {
	bytes ed25519_sender_pubkey = 1;
	sint64 amount = 2;
	sint64 senderFinalBalance = 3; // sender balance after transaction, including perishability
}

message ReceiverAmount {
	bytes ed25519_receiver_pubkey = 1;
	sint64 amount = 2;
}