Skip to content

Commit

Permalink
[FAB-12788] Protobuf Messages for Token Expectation
Browse files Browse the repository at this point in the history
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
adecaro committed Nov 14, 2018
1 parent b2ea980 commit 6e81cdb
Show file tree
Hide file tree
Showing 2 changed files with 391 additions and 0 deletions.
351 changes: 351 additions & 0 deletions protos/token/expectations.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions protos/token/expectations.proto
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;
}

0 comments on commit 6e81cdb

Please sign in to comment.