From 6acc140671ff73361d00ae2080f61c2395d33e8b Mon Sep 17 00:00:00 2001 From: nikhil550 Date: Mon, 20 Jul 2020 18:33:21 -0400 Subject: [PATCH] Add asset transfer series documentation to Fabric samples README (#251) Signed-off-by: NIKHIL E GUPTA Co-authored-by: NIKHIL E GUPTA --- README.md | 13 +++++++++++++ .../chaincode-go/README.md | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1acc2672..5483167e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,19 @@ You can use the following table to learn more about each sample, and find the co | [High throughput](high-throughput) | Learn how you can design your smart contracts to process a large volume of transactions. | | | [Chaincode](chaincode) | A set of sample smart contracts used by other samples and the tutorials in the Fabric documentation. | [Fabric tutorials](https://hyperledger-fabric.readthedocs.io/en/master/tutorials.html) | +### Asset transfer smart contract series + +The asset transfer series provides a series of smart contracts and applications that you can use to create and transfer a generic asset using Hyperledger Fabric. However, each sample is built with different smart contract and application APIs in order to demonstrate different Fabric features. The **Basic** sample provides an introduction on how to write smart contracts and how to interact with a Fabric network using the Fabric SDKs. The **Secured agreement** sample demonstrates how to use more advanced capabilities to develop a more realistic transfer scenario. + +| **Smart Contract** | **Description** | **Tutorial** | **Smart contract languages** | **Application languages** | +| -----------|------------------------------|----------|---------|---------| +| [Basic](asset-transfer-basic) | The Basic sample smart contract that allows you to create and transfer an asset by putting data on the ledger and retrieving it. This sample is recommended for new Fabric users. | **Coming soon** | Go, JavaScript, Typescript | JavaScript, Typescript | +| [Ledger queries](asset-transfer-ledger-queries) | The ledger queries sample demonstrates how to deploy an index with your chaincode and issue rich queries when you are using CouchDB as your state database. | **Coming soon** | Go | **Coming soon** | +| [Private data](asset-transfer-private-data) | This sample demonstrates the use of private data collections and how the private data hash can be used to verify an agreement before executing a transfer | **Coming soon** | Go | **Coming soon** | +| [Secured agreement](asset-transfer-secured-agreement) | Smart contract that uses private data, state based endorsement, and access control to establish the ownership of an asset, guarantee immutability, and securely transfer an asset with the consent of both the buyer and the owner, while keeping the asset details private. | **Coming soon** | Go | **Coming soon** | + +The asset transfer series is still a work in progress. Additional smart contract and application languages are being developed. The series will also be integrated with other Fabric samples and the documentation in the near future. For more information, see the public plan for [Fabric samples improvements](https://docs.google.com/presentation/d/1UxK2HH8SrQyZU58MnuDb9hr1nmekst8b/edit#slide=id.g776cdbfb06_0_51). + ## License Hyperledger Project source code files are made available under the Apache diff --git a/asset-transfer-secured-agreement/chaincode-go/README.md b/asset-transfer-secured-agreement/chaincode-go/README.md index a2559f6b..36c39ed8 100644 --- a/asset-transfer-secured-agreement/chaincode-go/README.md +++ b/asset-transfer-secured-agreement/chaincode-go/README.md @@ -7,13 +7,13 @@ Each on-chain asset is a non-fungible token (NFT) that represents a specific ass The private asset transfer scenario is bound by the following requirements: -- A asset may be issued by the first owner's organization (in the real world issuance may be restricted to some authority that certifies a asset's properties). +- An asset may be issued by the first owner's organization (in the real world issuance may be restricted to some authority that certifies an asset's properties). - Ownership is managed at the organization level (the Fabric permissioning scheme would equally support ownership at an individual identity level within an organization). - The asset identifier and owner is stored as public channel data for all channel members to see. - The asset metadata properties however are private information known only to the asset owner (and prior owners). -- An interested buyer will want to verify a asset's private properties. -- An interested buyer will want to verify a asset's provenance, specifically the asset's origin and chain of custody. They will also want to verify that the asset has not changed since issuance, and that all prior transfers have been legitimate. -- To transfer a asset, a buyer and seller must first agree on a sales price. +- An interested buyer will want to verify an asset's private properties. +- An interested buyer will want to verify an asset's provenance, specifically the asset's origin and chain of custody. They will also want to verify that the asset has not changed since issuance, and that all prior transfers have been legitimate. +- To transfer an asset, the buyer and the seller must first agree on a sales price. - Only the current owner may transfer their asset to another organization. - The actual private asset transfer must verify that the legitimate asset is being transferred, and verify that the price has been agreed to. Both buyer and seller must endorse the transfer.