Active contribution and maintenance of Composer project has been discontinued by IBM. Online playground for testing composer solutions is also unavailable as of now. This repo has references to both :-(
A bare minimum stock-exchange application written as a POC for Hyperledger Fabric Composer.
- Clone the repo
- Navigate to stock-exchange folder
- Execute
composer archive create -t dir -n .
- Step 3 will create the .bna file
- Deploy the .bna file on online playground for testing or on your peer network
Here are the few sample models that will be useful in playing with the business network.
{
"$class": "org.se.exchange.Trader",
"balance": 10000,
"email": "[email protected]",
"name": "Owner ABC"
}
{
"$class": "org.se.exchange.Trader",
"balance": 50000,
"email": "[email protected]",
"name": "Owner XYZ"
}
{
"$class": "org.se.exchange.Company",
"issuedShareCount": 0,
"owner": "resource:org.se.exchange.Trader#[email protected]",
"email": "[email protected]",
"name": "ABC Corporation"
}
{
"$class": "org.se.exchange.Company",
"issuedShareCount": 0,
"owner": "resource:org.se.exchange.Trader#[email protected]",
"email": "[email protected]",
"name": "XYZ"
}
{
"$class": "org.se.exchange.ShareIssue",
"detail": "First Share Issue of ABC",
"count": 3,
"price": 10,
"company": "resource:org.se.exchange.Company#[email protected]"
}
{
"$class": "org.se.exchange.ShareIssue",
"detail": "First Share Issue of XYZ",
"count": 3,
"price": 10,
"company": "resource:org.se.exchange.Company#[email protected]"
}
{
"$class": "org.se.exchange.Propose",
"proposalType": "FOR_BUY",
"count": 2,
"price": 20,
"company": "resource:org.se.exchange.Company#[email protected]"
}
{
"$class": "org.se.exchange.Propose",
"proposalType": "FOR_SALE",
"count": 3,
"price": 20,
"company": "resource:org.se.exchange.Company#[email protected]"
}
- Take a look at ACL
- Company owner can only issue share on behalf of company
- Network Admin has only the provision to create Trader and Company
- Assets (Share, Proposal and Trade) can only be created through transactions