Skip to content

Commit 6e81cdb

Browse files
committed
[FAB-12788] Protobuf Messages for Token Expectation
A chaincode needs to be able to set token expectations. We need to define protobuf messages for the expectation to be stored in the proposal response Change-Id: I14594b6224f2e20f503c3838075d807f95632e60 Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent b2ea980 commit 6e81cdb

File tree

2 files changed

+391
-0
lines changed

2 files changed

+391
-0
lines changed

protos/token/expectations.pb.go

Lines changed: 351 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/token/expectations.proto

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
Copyright IBM Corp. All Rights Reserved.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
syntax = "proto3";
8+
9+
option go_package = "github.com/hyperledger/fabric/protos/token";
10+
option java_package = "org.hyperledger.fabric.protos.token";
11+
12+
package protos;
13+
14+
import "google/protobuf/timestamp.proto";
15+
import "token/transaction.proto";
16+
17+
// TokenExpectation represent the belief that someone should achieve in terms of a token action
18+
message TokenExpectation {
19+
oneof Expectation {
20+
// PlainExpectation describes a plain token expectation
21+
PlainExpectation plain_expectation = 1;
22+
}
23+
}
24+
25+
// PlainExpectation represent the plain expectation where no confidentiality is provided.
26+
message PlainExpectation {
27+
oneof payload {
28+
// ImportExpectation describes an token import expectation
29+
PlainTokenExpectation import_expectation = 1;
30+
// TransferExpectation describes a token transfer expectation
31+
PlainTokenExpectation transfer_expectation = 2;
32+
}
33+
}
34+
35+
// PlainTokenExpectation represents the expecation that
36+
// certain outputs will be matched
37+
message PlainTokenExpectation {
38+
// Outputs contains the expected outputs
39+
repeated PlainOutput outputs = 1;
40+
}

0 commit comments

Comments
 (0)