-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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>
- Loading branch information
Showing
2 changed files
with
391 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/hyperledger/fabric/protos/token"; | ||
option java_package = "org.hyperledger.fabric.protos.token"; | ||
|
||
package protos; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "token/transaction.proto"; | ||
|
||
// TokenExpectation represent the belief that someone should achieve in terms of a token action | ||
message TokenExpectation { | ||
oneof Expectation { | ||
// PlainExpectation describes a plain token expectation | ||
PlainExpectation plain_expectation = 1; | ||
} | ||
} | ||
|
||
// PlainExpectation represent the plain expectation where no confidentiality is provided. | ||
message PlainExpectation { | ||
oneof payload { | ||
// ImportExpectation describes an token import expectation | ||
PlainTokenExpectation import_expectation = 1; | ||
// TransferExpectation describes a token transfer expectation | ||
PlainTokenExpectation transfer_expectation = 2; | ||
} | ||
} | ||
|
||
// PlainTokenExpectation represents the expecation that | ||
// certain outputs will be matched | ||
message PlainTokenExpectation { | ||
// Outputs contains the expected outputs | ||
repeated PlainOutput outputs = 1; | ||
} |