Tools, FAQ, Tutorials:
Hyperledger Composer Model File
What Is Hyperledger Composer Model File (*.cto)?
✍: FYIcenter.com
A Hyperledger Composer model file
is a source code file that define business object types used
in a business network:
Participants, Assets, Transactions and Events.
A model file uses the CTO modeling language and the .cto file extension. Here is an example of a model file from the Basic Sample Business Network, ./models/sample.cto:
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Sample business network definition.
*/
namespace org.example.basic
asset SampleAsset identified by assetId {
o String assetId
--> SampleParticipant owner
o String value
o String name
}
participant SampleParticipant identified by participantId {
o String participantId
o String firstName
o String lastName
}
transaction SampleTransaction {
--> SampleAsset asset
o String newValue
}
event SampleEvent {
--> SampleAsset asset
o String oldValue
o String newValue
}
Â
⇒ Hyperledger Composer Script File
⇠Business Network Source Code Architecture
2020-11-22, ∼1656🔥, 0💬
Popular Posts:
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
What is Fabric CA (Certificate Authority)? Fabric CA (Certificate Authority) is a component of Hyper...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
What Happens If One Row Has Missing Columns? What happens if one row has missing columns? Most brows...